Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/mage 725 - category versioning #1434

Open
wants to merge 52 commits into
base: develop
Choose a base branch
from
Open

Conversation

cammonro
Copy link
Contributor

@cammonro cammonro commented Nov 1, 2023

This PR is a work in progress - and there are missing use cases I'm still working through - but this does achieve a bridge between the state when product category assignments are made in Magento but have not yet synced into the Algolia index.

This intermediary state normally is highly disruptive and causes category pages to break until all impacted products have fully synced.

The essence of this feature is to piggy back off of the new flattened categoryPageId format used for visual merchandising of categories. This pattern is used to generate hierarchies flattened as "snapshots" of possible category paths for a moment in time (before ever syncing to Algolia). The versioning is maintained in Magento (scoped by affected store) to generate filters for InstantSearch to preserve connectivity with the data as it is loaded asynchronously into Algolia.

A sample of the change log may look as follows:
image

This feature also addresses the missing handling of category move operations in Magento which have not been captured to date without intervention through manual indexing.

Some key improvements that are still needed:

  • The CategoryVersionLogger needs to also handle the impact of changes to parent categories that can trickle down to products assigned to child categories.
  • The product indexer needs to be modified to track the state at which updates begin to reach Algolia
  • A new change state monitor process that can run via cron to perform housekeeping on the category version change log (without this filters can unwieldy if many changes are made to an indexed category)
  • Reevaluation of how we currently process products affected by category changes in the indexing queue

mohitalgolia and others added 30 commits August 4, 2023 16:39
…nt premature truncation of available categories while determining root path
… this scenario). This is instead handled separately by the move plugin.
# Conflicts resolved:
#	Model/Indexer/CategoryObserver.php
# Conflicts resolved:
#	Block/Algolia.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants