You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module provides a Search Service admin on which you can do a full reindex on a single index - this is the blue button within the gridfield labelled Trigger Full Index.
Clicking on this button adds a new Reindex job to the queued jobs labelled something like 'Search service reindex all documents in index andrew-dev-content', but when this is run it completes without error, but it does not index anything, even though there are documents to be indexed.
The yml configuration used is followed from the read me documentation but looks something like ...
SilverStripe\Core\Injector\Injector:
SilverStripe\SearchService\Service\IndexConfiguration:
constructor:
index_variant: '`ENTERPRISE_SEARCH_ENGINE_PREFIX`'SilverStripe\SearchService\Service\IndexConfiguration:
crawl_page_content: falseindexes:
# This key is the name of the Elastic App Search 'engine' (prefixed with index_variant that we override above and set in .env)content:
Reproducing the issue
Once the elastic service is up and running, log into the CMS and ensure you have some pages that should be indexed, but ensure that you have cleared the index so that we can verify that the reindex all button does not work.
Go to the Search Service admin and click on the blue reindex all button for the single index.
This should create a job for doing a full reindex
Run the job
Go back to the search service admin and for the index, verify that the document count is still 0.
If you log into the elastic dashboard you can also check the api log and verify that no documents were sent.
When filtering out the indexes for indexing, the code checks iterates through all the defined indexes (eg main) and checks if this is equal to the index passed in by the button (eg andrew-dev-main). Because of the inlusion on the index variant, this is not going to match any indexes to return.
A possible solution here, within the code that checks for matching indexes, to append the index variant so that we are matching like for like, for example ...
foreach (array_keys($indexes) as$index) {
// note onlyIndexes includes the index variant, so append that when checking for matching keyif (!in_array(sprintf('%s-%s', $this->indexVariant, $index), $this->onlyIndexes)) {
unset($indexes[$index]);
}
}
Additional Context
No response
Validations
Check that there isn't already an issue that reports the same bug
Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)
The text was updated successfully, but these errors were encountered:
Module version(s) affected
3.0.4
Description
This module provides a Search Service admin on which you can do a full reindex on a single index - this is the blue button within the gridfield labelled
Trigger Full Index
.Clicking on this button adds a new Reindex job to the queued jobs labelled something like 'Search service reindex all documents in index andrew-dev-content', but when this is run it completes without error, but it does not index anything, even though there are documents to be indexed.
How to reproduce
Added dependencies (to silverstripe installer)
YML configuration
The yml configuration used is followed from the read me documentation but looks something like ...
Reproducing the issue
Once the elastic service is up and running, log into the CMS and ensure you have some pages that should be indexed, but ensure that you have cleared the index so that we can verify that the reindex all button does not work.
Go to the Search Service admin and click on the blue reindex all button for the single index.
This should create a job for doing a full reindex
Run the job
Go back to the search service admin and for the index, verify that the document count is still 0.
If you log into the elastic dashboard you can also check the api log and verify that no documents were sent.
Possible Solution
The reason this is not working appears to be how the relevant indexes for indexing is resolved, referring to https://github.com/silverstripe/silverstripe-search-service/blob/3/src/Service/IndexConfiguration.php#L108-L114 where, having debugged this, seen that
$indexes
is returned as an empty array, and therefore the reason for not indexing anything.Relevant things to note here is that:
A possible solution here, within the code that checks for matching indexes, to append the index variant so that we are matching like for like, for example ...
Additional Context
No response
Validations
silverstripe/installer
(with any code examples you've provided)The text was updated successfully, but these errors were encountered: