This commit is contained in:
philipp lang 2024-12-11 22:36:25 +01:00
parent 54c37fccd1
commit 36466420f6
2 changed files with 13 additions and 3 deletions

View File

@ -14,10 +14,10 @@ class UpdateParticipantSearchIndexAction
$form->searchableUsing()->updateIndexSettings(
$form->participantsSearchableAs(),
[
'filterableAttributes' => $form->getFields()->getKeys(),
'searchableAttributes' => $form->getFields()->getKeys(),
'filterableAttributes' => $form->getFields()->filterables()->getKeys(),
'searchableAttributes' => $form->getFields()->searchables()->getKeys(),
'sortableAttributes' => [],
'displayedAttributes' => [...$form->getFields()->getKeys(), 'id'],
'displayedAttributes' => [...$form->getFields()->filterables()->getKeys(), ...$form->getFields()->searchables()->getKeys(), 'id'],
'pagination' => [
'maxTotalHits' => 1000000,
]

View File

@ -118,6 +118,16 @@ class FieldCollection extends Collection
return $this->first(fn ($field) => $field->specialType === $specialType);
}
public function searchables(): self
{
return $this;
}
public function filterables(): self
{
return $this;
}
/**
* @return array<int, string>
*/