User tests: Successful: Unsuccessful:
At present, purging the index then re-indexing will result in the configuration of any search filters being lost. This is because the search filters link to the relevant taxonomies using taxonomy ids and these are inevitably changed during a purge/index cycle. This PR addresses the issue by adding a --purge argument to the CLI indexer which, unlike its UI equivalent, completes a full purge/index cycle while preserving the filter configurations.
This change is fully backwards-compatible as running it without the --purge argument results in exactly the same behaviour as before. Some minor code-style improvements on the original code have also been done.
\repos\joomla-cms\cli>php finder_indexer.php --purge
Smart Search INDEXER
============================
Saving filters
- number of saved filters: 2
Purging index
- index purge successful
Starting Indexer
Setting up Finder plugins
Setup 179 items in 13.679 seconds.
* Processed batch 1 in 16.946 seconds.
* Processed batch 2 in 23.741 seconds.
* Processed batch 3 in 37.647 seconds.
* Processed batch 4 in 17.057 seconds.
Restoring filters
- number of filters restored: 2
Total Processing Time: 109.12 seconds.
Search filters are still set up the same as I left them.
@test successful on 3.3.3
P.S.
Setting up 2.5 to test.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-07-27 12:13:26 |
Tracker item: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33500&start=0