Merge pull request #273 from adrexia/fix/queuedreindex

FIX: allow update processor to be overridden by existing yml
This commit is contained in:
Ingo Schommer 2020-04-07 13:12:19 +12:00 committed by GitHub
commit 4be5de76a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,8 @@ use SilverStripe\ORM\DB;
use SilverStripe\FullTextSearch\Search\FullTextSearch; use SilverStripe\FullTextSearch\Search\FullTextSearch;
use SilverStripe\FullTextSearch\Search\SearchIntrospection; use SilverStripe\FullTextSearch\Search\SearchIntrospection;
use SilverStripe\FullTextSearch\Search\Variants\SearchVariant; use SilverStripe\FullTextSearch\Search\Variants\SearchVariant;
use SilverStripe\FullTextSearch\Search\Processors\SearchUpdateImmediateProcessor; use SilverStripe\FullTextSearch\Search\Processors\SearchUpdateProcessor;
use ReflectionClass; use ReflectionClass;
/** /**
@ -151,7 +152,7 @@ class SearchUpdater
foreach ($dirtyids as $dirtyclass => $ids) { foreach ($dirtyids as $dirtyclass => $ids) {
if ($ids) { if ($ids) {
if (!self::$processor) { if (!self::$processor) {
self::$processor = Injector::inst()->create(SearchUpdateImmediateProcessor::class); self::$processor = Injector::inst()->create(SearchUpdateProcessor::class);
} }
self::$processor->addDirtyIDs($dirtyclass, $ids, $index); self::$processor->addDirtyIDs($dirtyclass, $ids, $index);
} }