Open
Description
Description
I'm using laravel scout to help me get a product list.
When building my search i wanted to provide a distinct attribute. i noticed meilisearch-php added that feature:
#648
Error:
Unknown field distinct: expected one of q, vector, offset, limit,
page, hitsPerPage, attributesToRetrieve, attributesToCrop, cropLength,
attributesToHighlight, showMatchesPosition, showRankingScore, showRankingScoreDetails,
filter, sort, facets, highlightPreTag, highlightPostTag, cropMarker, matchingStrategy, attributesToSearchOn
Code is use to build the search query, when i want to add 'distinct' to the options i get the error.
Product::search($this->search)
->options([
'filter' => $this->buildFilter(),
'sort' => $this->buildSort(),
'facets' => $this->buildFacets(),
'limit' => $this->limit,
// 'distinct' => $this->distinct,
], fn ($value) => !is_null($value))
->$method(...$arguments);
I do notice the toArray() function in SearchQuery.php is missing distinct. Maybe that has something to do with it?
Environment (please complete the following information):
- OS: [e.g. Debian GNU/Linux]
- Meilisearch version: v1.12.3
- meilisearch-php version: v1.12.0