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
{{ message }}
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
This issue is based on this specification: https://github.com/meilisearch/specifications/blob/main/text/0055-sort.md
The specification gathers all the information related to this feature: the motivation, the API and technical changes, the future possibilities... ⚠️ For anything that is not clear or deeply detailed in this issue, please refer to this specification.
The sort feature introduces the possibility to quickly sort the search results as an end-user during the search time.
TODO
The core engine should support the sort on String in lexicographic order. If the dataset contains values in String and number for the same field, the search engine first sorts the numbers and then the strings. asc/desc should now work on strings with the same behavior
Add the sort ranking rule at the third position by default. It means the core-engine will apply the sort after the ranking rules words and typo. If the end-user does not request any search at the query time, the ranking rule sort is ignored.
The sort ranking rule can be removed or set at a different place in the rankingRules setting, so that the users can adjust their relevancy.
Add sort query/request parameter during search time. It supports strings and numbers. Strings can be sorted in lexicographical order.
The end-users must indicate the order of the expected sort (asc/desc). Multiple fields can be passed to be sorted:
ex: ["price:asc", "author:desc"]
The error message when the end-users try to sort on an attributes non-declared as sortableAttributes:
Attribute `title` is not sortable, available sortable attributes are: ..., ...
The search engine needs to know what are the attributes to sort via sortableAttributes settings.
The behavior of this setting is similar to filterableAttributes: the default value is [] and the core engine expects an array of strings. If an unknown field is passed to sortableAttributes, no error is raised.
Refer to the spec for more details and the error behaviors.
New syntax for the custom ranking rules: desc(X) becomes X:desc and asc(Y) becomes Y:asc. This syntax is also available for sorting during query time.
Add tests for the sort relevancy
The text was updated successfully, but these errors were encountered:
320: Sort at query time r=Kerollmops a=Kerollmops
Re-introduce the Sort at the query time (#305)
Co-authored-by: Clément Renault <renault.cle@gmail.com>
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Important
This issue is based on this specification: https://github.com/meilisearch/specifications/blob/main/text/0055-sort.md
⚠️ For anything that is not clear or deeply detailed in this issue, please refer to this specification.
The specification gathers all the information related to this feature: the motivation, the API and technical changes, the future possibilities...
This issue is a sub-issue of the tracking issue on MeiliSearch's side: Sort during query time meilisearch#1581
Feature purpose
The sort feature introduces the possibility to quickly sort the search results as an end-user during the search time.
TODO
The core engine should support the sort on
String
in lexicographic order. If the dataset contains values inString
andnumber
for the same field, the search engine first sorts the numbers and then the strings.asc
/desc
should now work on strings with the same behaviorAdd the
sort
ranking rule at the third position by default. It means the core-engine will apply the sort after the ranking ruleswords
andtypo
. If the end-user does not request any search at the query time, the ranking rulesort
is ignored.The
sort
ranking rule can be removed or set at a different place in therankingRules
setting, so that the users can adjust their relevancy.Add
sort
query/request parameter during search time. It supports strings and numbers. Strings can be sorted in lexicographical order.The end-users must indicate the order of the expected sort (asc/desc). Multiple fields can be passed to be sorted:
ex:
["price:asc", "author:desc"]
The error message when the end-users try to sort on an attributes non-declared as
sortableAttributes
:The search engine needs to know what are the attributes to sort via
sortableAttributes
settings.The behavior of this setting is similar to
filterableAttributes
: the default value is[]
and the core engine expects an array of strings. If an unknown field is passed tosortableAttributes
, no error is raised.Refer to the spec for more details and the error behaviors.
New syntax for the custom ranking rules:
desc(X)
becomesX:desc
andasc(Y)
becomesY:asc
. This syntax is also available for sorting during query time.Add tests for the sort relevancy
The text was updated successfully, but these errors were encountered: