Merge branch '3.9' into 3

This commit is contained in:
Steve Boyd 2022-03-23 17:23:42 +13:00
commit 1d9e98cd3b

View File

@ -5,6 +5,7 @@ namespace SilverStripe\FullTextSearch\Search\Processors;
use SilverStripe\FullTextSearch\Search\Services\SearchableService; use SilverStripe\FullTextSearch\Search\Services\SearchableService;
use SilverStripe\FullTextSearch\Search\Variants\SearchVariantVersioned; use SilverStripe\FullTextSearch\Search\Variants\SearchVariantVersioned;
use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DB;
use SilverStripe\FullTextSearch\Search\Variants\SearchVariant; use SilverStripe\FullTextSearch\Search\Variants\SearchVariant;
use SilverStripe\FullTextSearch\Search\FullTextSearch; use SilverStripe\FullTextSearch\Search\FullTextSearch;
use SilverStripe\Versioned\Versioned; use SilverStripe\Versioned\Versioned;
@ -154,6 +155,9 @@ abstract class SearchUpdateProcessor
*/ */
public function process() public function process()
{ {
if (!DB::is_active()) {
return false;
}
// Generate and commit all instances // Generate and commit all instances
$indexes = $this->prepareIndexes(); $indexes = $this->prepareIndexes();
foreach ($indexes as $index) { foreach ($indexes as $index) {