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

Remove orphaned terms after updating documents #120

Merged
merged 1 commit into from
Nov 30, 2024

Conversation

daun
Copy link
Contributor

@daun daun commented Nov 30, 2024

  • Fix an issue where updating a document won't remove orphaned terms from the index
  • The suggested solution is rather crude: delete documents before (re-)indexing them
  • There's probably a more elegant solution using upsert, but I can't think of one :)
  • Made sure to disable storage revision when making those types of deletions
  • Opted for single deletion instead of batching to play nice with transactions and allow rollback
  • Fixes Orphaned terms are not removed after updating a document #119

@daun daun marked this pull request as ready for review November 30, 2024 14:54
Copy link
Contributor

@Toflar Toflar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would've done exactly the same 😊 I don't think this is a bad approach. But can you target that at main please because this affects 0.8 (aka current stable) as well so we should fix it there. I'll merge it into develop after.

@daun daun changed the base branch from develop to main November 30, 2024 15:32
@daun daun changed the base branch from main to develop November 30, 2024 15:32
Signed-off-by: Philipp Daun <post@philippdaun.net>
@daun daun force-pushed the fix/orphaned-terms-on-update branch from 58329c9 to 4e4c1b8 Compare November 30, 2024 15:37
@daun daun changed the base branch from develop to main November 30, 2024 15:37
@daun daun requested a review from Toflar November 30, 2024 15:38
@daun
Copy link
Contributor Author

daun commented Nov 30, 2024

@Toflar Rebased on main :) Can't see if the tests are passing. They do locally, anyway.

@Toflar Toflar merged commit c76635a into loupe-php:main Nov 30, 2024
@daun daun deleted the fix/orphaned-terms-on-update branch November 30, 2024 16:14
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.

Orphaned terms are not removed after updating a document
2 participants