You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dataobjects with $many_many fields can be easily added to a search index by adding the field in the init() method of a search index
e.g.
public function init()
{
$this->addClass(MyClass::class);
$this->addFilterField('MyManyManyField.ID');
}
It would be handy if this also worked with $belongs_many_many fields.
I've had a look into this and one way to support this would be to make the following change to the fieldData() method in SilverStripe\FullTextSearch\Search\Indexes\SearchIndex:
Dataobjects with $many_many fields can be easily added to a search index by adding the field in the init() method of a search index
e.g.
It would be handy if this also worked with $belongs_many_many fields.
I've had a look into this and one way to support this would be to make the following change to the fieldData() method in
SilverStripe\FullTextSearch\Search\Indexes\SearchIndex
:Replace
with
I'm happy to create a pull request for this if it sounds reasonable.
The text was updated successfully, but these errors were encountered: