ReindexNextBatch method works incorrectly with searchableIf script
Ilya-c opened this issue · 1 comments
Ilya-c commented
Environment
- Platform version: 7.2.10
Description of the bug or enhancement
- For example we have 5600 entities to reindex
- In the first iteration we trying to enqueue 5000 entities according to the propert fts.reindexBatchSize
- If we have script and script conditions for some of the entities aren't satisfied next batch (next 600 entities) won't be processed because of incorrect "if" in the FtsManager#reindexNextBatch method:
if (ids.size() < ftsConfig.getReindexBatchSize()) {
reindexEntitiesQueue.remove();
ftsSender.emptyFakeQueue(metaClass.getName());
}
Here ids contains only ids of the entities with satisfied "searchableIf" script. Here we should compare count of the objects, returned by the collector.loadResults()
method as it was in previous version (checked in version 5.9).