#OpenSearch/ElasticSearch
7 messages · Page 1 of 1 (latest)
possible somehow like with this?
applySearchToTableQuery
protected function applyFiltersToTableQuery
protected function applyFiltersToTableQuery(Builder $query): Builder
{
$filters = $this->getTable()->getFilters();
// search in elastic and return ids
// $query->whereIn
return $query;
}
protected function applySearchToTableQuery(Builder $query): Builder
{
$search = $this->getTableSearch();
// search in elastic and return ids
// $query->whereIn
return $query;
}
is there better way? like method where i can do all at once?
There is a modifyQueryUsing function have you tried that?
I haven’t used elasticsearch personally, but as long as you are using an eloquent driver for it I would expect it to work in the same way as scout. https://filamentphp.com/docs/3.x/tables/advanced#searching-records-with-laravel-scout
not sure if its the best way, its looks like my idea working (part of it is same as from documentation @swift nymph , but its not documented well), anyway thank you