This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 82
Facets and filters behavior #152
Comments
|
bors bot
added a commit
that referenced
this issue
May 31, 2021
184: Transfer numbers and strings facets into the appropriate facet databases r=Kerollmops a=Kerollmops This pull request is related to #152 and changes the layout of the facets values, numbers and strings are now in dedicated databases and the user no more needs to define the type of the fields. No more conversion between the two types is done, numbers (floats and integers converted to f64) go to the facet float database and strings go to the strings facet database. There is one related issue that I found regarding CSVs, the values in a CSV are always considered to be strings, [meilisearch/specifications#28](https://github.com/meilisearch/specifications/blob/d916b57d748628c3b45500e9dfa46b50dfa2ad3f/text/0028-indexing-csv.md) fixes this issue by allowing the user to define the fields types using `:` in the "CSV Formatting Rules" section. All previous tests on facets have been modified to pass again and I have also done hand-driven tests with the 115m songs dataset. Everything seems to be good! Fixes #192. Co-authored-by: Clément Renault <clement@meilisearch.com> Co-authored-by: Kerollmops <clement@meilisearch.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Implement behavior in this spec: https://github.com/meilisearch/specifications/blob/main/text/0027-filter-and-facet-behavior.md
facetFilters
parameter during the search is removed. Onlyfilter
can be used.attributesForFaceting
to use the filters during the search via thefilter
parameter. But they don't have to specify the type. Milli must accept onlyattributesForFaceting
in an array like this:=> this is the current MeiliSearch v0.20.0 behavior: https://docs.meilisearch.com/reference/api/attributes_for_faceting.html#attributes-for-faceting
=> this means milli has to create two data structures: one for the strings and one for the numbers. No conversions are done in the user documents:
"price": "12"
is not considered as a numeric field and should be in the string data structure.filter
with a numeric operator, milli should search into the number data structure only. Otherwise in both data structures. More detail in the spec.filter
parameter can accept both syntaxes: string (withOR
/AND
/NOT
) and array. An element of an array syntax can accept the string syntax. The first depth of the array syntax is combined withAND
s, the second depth is combined withOR
s.Feel free to complete my issue @Kerollmops with all the technical parts we need to implement these and if some parts need to be implemented on the transplant side 🙂
The text was updated successfully, but these errors were encountered: