collective / Products.PloneKeywordManager

Change, merge and delete keywords (AKA tags or subjects) in Plone.
https://pypi.org/project/Products.PloneKeywordManager/
4 stars 8 forks source link

Consistently handle reindexing Comments on AT and DX objects #36

Closed alecpm closed 3 years ago

alecpm commented 3 years ago

The existing implementation assumes that Comments are children of AT content and have access to the parent's getField method. To handle Comments on both AT and DX content, this change returns a no-op mutator for all IComment objects. That should ensure that they are always reindexed when they match the query and any acquired values are reindexed.

The prior implementation used the parent's AT mutator to ensure the ordering in which the Comment and its Parent were mutated/indexed didn't matter. This implementation ignores the parent mutator and relies implicitly on the deferred indexing from collective.indexing to handle such ordering concerns.