mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 12:05:29 +00:00
FIX: allow update processor to be overriden by existing yml
One of the update commits (6066af5841fd1df21ef32ff3fa089c6e48ea4f26) replaced SearchUpdateProcessor with SearchUpdateImmediateProcessor, but that means that the existing processor yml fails to replace the SearchUpdateImmediateProcessor with SearchUpdateQueuedJobProcessor as I think is intended? c.f https://github.com/silverstripe/silverstripe-fulltextsearch/blob/3/_config/processor.yml#L19
This commit is contained in:
parent
43f92c74f7
commit
d759a78182
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user