? Language Change NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
20 Jan 2022

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

  1. Apply the PR
  2. Click on "Optimise" in the backend
  3. Afterwards see, that searching still works properly.

Notes

  1. Since 4.1 is in RC, this will have to go into 4.2. Since there is no 4.2-dev branch yet, I'm pointing this towards 4.1-dev for now.
avatar Hackwar Hackwar - open - 20 Jan 2022
avatar Hackwar Hackwar - change - 20 Jan 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 Jan 2022
Category Administration com_finder Language & Strings Repository NPM Change JavaScript
avatar Hackwar Hackwar - change - 20 Jan 2022
Labels Added: Language Change NPM Resource Changed ?
avatar sakiss
sakiss - comment - 21 Jan 2022

Would it be possible to add that task to the new com_scheduler ?
Removing that responsibility from the admin would be great.

avatar Hackwar
Hackwar - comment - 21 Jan 2022

This task is not something that you should execute regularly.

avatar Hackwar Hackwar - change - 24 Jan 2022
Labels Added: ?
Removed: ?
avatar nadjak77
nadjak77 - comment - 20 May 2022

I have tested this item ? unsuccessfully on 7a4097b

After applieing the patch I get an error in seachrindex - indes:
There is no "table.columns" asset of a "script" type in the registry.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36751.

avatar nadjak77 nadjak77 - test_item - 20 May 2022 - Tested unsuccessfully
avatar Hackwar
Hackwar - comment - 20 May 2022

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?

avatar webnet-assmann
webnet-assmann - comment - 20 May 2022

I have tested this item successfully on 7a4097b

I've tested it with the prebuilt package and sample data. Searching was working before and after click on "Optimise".


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36751.

avatar webnet-assmann webnet-assmann - test_item - 20 May 2022 - Tested successfully
avatar joomdonation joomdonation - alter_testresult - 22 May 2022 - webnet-assmann: Tested successfully
avatar joomdonation
joomdonation - comment - 22 May 2022

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.

avatar joomdonation joomdonation - test_item - 22 May 2022 - Tested successfully
avatar joomdonation joomdonation - change - 22 May 2022
Status Pending Ready to Commit
avatar joomdonation
joomdonation - comment - 22 May 2022

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.

avatar Hackwar Hackwar - change - 24 May 2022
Labels Added: ?
avatar Hackwar
Hackwar - comment - 25 May 2022

I'm investigating why the api tests are failing. Please don't merge this right now. I want to check that first.

avatar Hackwar
Hackwar - comment - 25 May 2022

I found the issue and fixed it. This could be merged now.

avatar fancyFranci fancyFranci - change - 27 May 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-05-27 13:32:33
Closed_By fancyFranci
avatar fancyFranci fancyFranci - close - 27 May 2022
avatar fancyFranci fancyFranci - merge - 27 May 2022
avatar fancyFranci
fancyFranci - comment - 27 May 2022

Thank you Hannes!

Add a Comment

Login with GitHub to post a comment