Skip to content

Align with upstream CMFCore#161: contextless_indexes + install profile - #2

Merged
mamico merged 3 commits into
mainfrom
feature/contextless-indexes
Oct 2, 2026
Merged

mamico merged 3 commits into
mainfrom
feature/contextless-indexes

Conversation

@mamico

@mamico mamico commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Port the changes made to Products.CMFCore#161 since the first backport, and add an install profile.

  • Every index is reindexed on move, except the ones listed in the contextless_indexes lines property of portal_catalog.
  • IContextAwareIndexProvider and the built-in providers are removed (breaking).
  • CatalogTool.moveObject(object, old_path) no longer takes idxs, updates the modification date, drops a stale entry at the new path and returns True/False.
  • The indexing queue is flushed before a move, so a pending reindex cannot create a second catalog entry.
  • Catalogs without moveObject keep the stock unindex + index flow (checked with aq_base).
  • New experimental.catalogmoveopt:default profile sets contextless_indexes to SearchableText; uninstall sets it empty.

Difference from upstream

To ease adoption, a missing contextless_indexes property defaults to SearchableText, so no profile is required. An empty property opts out. Upstream treats a missing property as "reindex everything".

Test plan

  • pytest: 27 passed
  • CI

mamico added 3 commits October 2, 2026 12:15
Port the changes made to Products.CMFCore#161 after the first backport:

- Reindex every index on move, except those listed in the
  contextless_indexes property of portal_catalog.  SearchableText is the
  default when the property does not exist; an empty property opts out.
- Remove IContextAwareIndexProvider and the built-in providers.
- moveObject(object, old_path) returns True/False, updates the
  modification date and drops a stale entry at the new path.
- Flush the indexing queue before a move.
- Keep the stock unindex + index flow for catalogs without moveObject.
- Add default and uninstall GenericSetup profiles.
@mamico
mamico merged commit d6251a0 into main Oct 2, 2026
17 checks passed
@mamico
mamico deleted the feature/contextless-indexes branch October 2, 2026 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant