silverstripe-fulltextsearch/tests/SolrIndexTest/SolrIndexTest_AmbiguousRelationIndex.php

27 lines
815 B
PHP
Raw Permalink Normal View History

<?php
namespace SilverStripe\FullTextSearch\Tests\SolrIndexTest;
use SilverStripe\FullTextSearch\Solr\SolrIndex;
use SilverStripe\FullTextSearch\Tests\SearchUpdaterTest\SearchUpdaterTest_Container;
use SilverStripe\FullTextSearch\Tests\SearchUpdaterTest\SearchUpdaterTest_OtherContainer;
class SolrIndexTest_AmbiguousRelationIndex extends SolrIndex
{
protected function getStoredDefault()
{
// Override isDev defaulting to stored
return 'false';
}
public function init()
{
$this->addClass(SearchUpdaterTest_Container::class);
$this->addClass(SearchUpdaterTest_OtherContainer::class);
// These relationships exist on both classes
$this->addFilterField('HasManyObjects.Field1');
$this->addFilterField('ManyManyObjects.Field1');
}
}