-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[4.2] Smart Search: Add optimisations & garbage collection #36751
Conversation
Would it be possible to add that task to the new com_scheduler ? |
This task is not something that you should execute regularly. |
I have tested this item 🔴 unsuccessfully on 7a4097b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36751. |
Can you please check if you need to do a composer install and/or npm i? This PR actually does not change anything in that regard, but maybe a previous change introduced a problem here? |
I have tested this item ✅ successfully on 7a4097b This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36751. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and it worked OK. Just minor things with the code and I will mark my test result.
administrator/components/com_finder/src/Controller/IndexController.php
Outdated
Show resolved
Hide resolved
I have tested this item ✅ successfully on 49576c6 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36751. |
The last change was a minor change, so I restored test result of @webnet-assmann. This PR is now RTC. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36751. |
I'm investigating why the api tests are failing. Please don't merge this right now. I want to check that first. |
…nto 4.2-finder-optimise # Conflicts: # package-lock.json
I found the issue and fixed it. This could be merged now. |
Thank you Hannes! |
joomla/joomla-cms#36591 + joomla/joomla-cms#37362 + joomla/joomla-cms#37404 - (позже был Revert PR) joomla/joomla-cms#37453 + joomla/joomla-cms#37583 + joomla/joomla-cms#37459 + joomla/joomla-cms#36751 + joomla/joomla-cms#36752 + joomla/joomla-cms#37912 + joomla/joomla-cms#37838 + joomla/joomla-cms#38002 + joomla/joomla-cms#38036 - (только для en-GB, у нас давно исправлено) joomla/joomla-cms#38009 + joomla/joomla-cms#38064 + joomla/joomla-cms#37911 + joomla/joomla-cms#38065 + joomla/joomla-cms#38075 + joomla/joomla-cms#38071 + joomla/joomla-cms#38080 + joomla/joomla-cms#38082 + joomla/joomla-cms#38092 + joomla/joomla-cms#38113 + joomla/joomla-cms#38121 + joomla/joomla-cms#37910 + joomla/joomla-cms#38165 + joomla/joomla-cms#37747 +
Summary of Changes
There are situations where the index of Smart Search can get poluted with old data (unused terms and taxonomies, already deleted content items) and where the only solution so far has been to clear the reindex and start indexing all over again. This is not something that you really want to do in a live scenario with a large site, so this attempts some different solutions.
First of all, it runs a garbage collection, which by default deletes all entries, which aren't present in the base table of the base component. We then delete all orphaned term and taxonomy mappings as well as all then orphaned taxonomies and terms. In the end, we then execute the already previously present optimisation queries. To trigger all of this, a new dropdown button was added in the backend named "Maintenance", where you can choose between purging the index and doing the optimisation.
Note: The garbage collection has been added as a default to the Adapter base class and there could be situations where this results in a fail. I'm open for ideas here.
Testing Instructions
Notes