Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Conversation

@gmourier
Copy link
Member

  • In the case where an attribute is specified as a sort criterion at search time and if this attribute is of a different type between several documents, the numeric type will always be favored first by the engine. This means that documents with numeric values for this attribute will be sorted before those with string values. This can lead to awkward sorting behavior, so the user should make sure to have the same type on the attribute he wants to sort on for all these documents.

  • In the case where an attribute is specified as a sort criterion at search time and does not exist on a document, the document will be placed at the end of the ranking rule sort.

@gmourier gmourier requested a review from Kerollmops August 16, 2021 21:53
@gmourier gmourier changed the title Added the definitions of the missing behaviors for the sort specification Add definitions of the missing behaviors for the sort specification Aug 16, 2021
@meilisearch meilisearch deleted a comment from github-actions bot Aug 17, 2021
@github-actions
Copy link

🤖 API change detected:

Updated: GET /indexes/{indexUid}/search
  Query parameter added: sort
Updated: POST /indexes/{indexUid}/search
  Body attribute added: sort
Updated: GET /indexes/{indexUid}/updates
  Response modified: 200
Updated: GET /indexes/{indexUid}/updates/{updateId}
  Response modified: 200
Updated: GET /indexes/{indexUid}/settings
  Response modified: 200
    Body attribute added: sortableAttributes
Updated: POST /indexes/{indexUid}/settings
  Body attribute added: sortableAttributes
Added: GET /indexes/{indexUid}/settings/sortable-attributes
Added: POST /indexes/{indexUid}/settings/sortable-attributes
Added: DELETE /indexes/{indexUid}/settings/sortable-attributes

View documentation diff

Powered by Bump

@gmourier gmourier changed the base branch from main to develop August 17, 2021 13:00
Copy link
Member

@Kerollmops Kerollmops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing to say, that's good to me! You can see the advancement of this feature on milli.

@gmourier gmourier merged commit 28507cb into develop Aug 17, 2021
@gmourier gmourier deleted the patch-sort-spec-1 branch August 17, 2021 16:24
gmourier added a commit that referenced this pull request Aug 25, 2021
* Initialize draft specification for geo-search feature

* add future possibilities

* Update specification

* mention errors and aspects about filterableAttributes and sortableAttributes

* Add measure and finalized key changes

* Add description in OpenApi

* remove old falsy sentence

* Add definition and explanation for  error

* fix rebase on develop

* Specify missing edge cases (#63)

* Initialize draft specification for geo-search feature

* add future possibilities

* Update specification

* mention errors and aspects about filterableAttributes and sortableAttributes

* Add measure and finalized key changes

* Add description in OpenApi

* remove old falsy sentence

* Add definition and explanation for  error

* fix rebase on develop

* update open-api.yml with description on _geoPoint built-in sort rule and _geo field

* Apply suggestions from code review

Co-authored-by: gui machiavelli <[email protected]>

* remove - char in geo-search

* update invalid_geo_field error definition

Co-authored-by: gui machiavelli <[email protected]>
gmourier added a commit that referenced this pull request Sep 7, 2021
gmourier added a commit that referenced this pull request Sep 13, 2021
* Sort (#55)

* initialize sort specification

* wip specification body

* fix typos and details

* Add OpenAPI changes

* Rename API routes

* fix typo

* add a part about measuring success

* specify metrics to send on Amplitude

* add lexicographical order for string type

* Typos, invalid_sort error definition

* Apply suggestions from code review

Co-authored-by: Clémentine Urquizar <[email protected]>

* remove non correct information about mistyped ranking rule that do not raise error

* fix typos from reviews

* Update text/0055-sort.md

Co-authored-by: gui machiavelli <[email protected]>

Co-authored-by: Clémentine Urquizar <[email protected]>
Co-authored-by: gui machiavelli <[email protected]>

* add root docs domain to fix broken links (#62)

* Specify missing edge cases (#63)

* Add error at search time if ranking rule sort is not specified in the ranking rules settings (#68)

* update oas to match sort feature

* update custom ranking rule examples

* Put sort ranking rule in a position that promote relevancy by default (#71)

* propagate default sort ranking rule position on oas file

* bump version number

Co-authored-by: Clémentine Urquizar <[email protected]>
Co-authored-by: gui machiavelli <[email protected]>
gmourier added a commit that referenced this pull request Sep 13, 2021
* Initialize draft specification for geo-search feature

* add future possibilities

* Update specification

* mention errors and aspects about filterableAttributes and sortableAttributes

* Add measure and finalized key changes

* Add description in OpenApi

* remove old falsy sentence

* Add definition and explanation for  error

* fix rebase on develop

* Specify missing edge cases (#63)

* Initialize draft specification for geo-search feature

* add future possibilities

* Update specification

* mention errors and aspects about filterableAttributes and sortableAttributes

* Add measure and finalized key changes

* Add description in OpenApi

* remove old falsy sentence

* Add definition and explanation for  error

* fix rebase on develop

* update open-api.yml with description on _geoPoint built-in sort rule and _geo field

* Apply suggestions from code review

Co-authored-by: gui machiavelli <[email protected]>

* remove - char in geo-search

* update invalid_geo_field error definition

Co-authored-by: gui machiavelli <[email protected]>
gmourier added a commit that referenced this pull request Oct 11, 2021
* Initialize draft specification for geo-search feature

* add future possibilities

* Update specification

* mention errors and aspects about filterableAttributes and sortableAttributes

* Add measure and finalized key changes

* Add description in OpenApi

* remove old falsy sentence

* Add definition and explanation for  error

* fix rebase on develop

* Specify missing edge cases (#63)

* Initialize draft specification for geo-search feature

* add future possibilities

* Update specification

* mention errors and aspects about filterableAttributes and sortableAttributes

* Add measure and finalized key changes

* Add description in OpenApi

* remove old falsy sentence

* Add definition and explanation for  error

* fix rebase on develop

* update open-api.yml with description on _geoPoint built-in sort rule and _geo field

* Apply suggestions from code review

Co-authored-by: gui machiavelli <[email protected]>

* remove - char in geo-search

* update invalid_geo_field error definition

Co-authored-by: gui machiavelli <[email protected]>
gmourier added a commit that referenced this pull request Oct 12, 2021
* Indexing NDJSONs (#29)

* initialize a draft for json lines indexation support specification

* update filename number to match related pull-request

* update specs

* update link to CSV spec

* update spec name

* Apply typos correction from code review

Co-authored-by: cvermand <[email protected]>

* fix typo

* update impact on documentation part

* replace file by data

* add information about giving application/json content-type or not for a json payload

* updates error codes, curl instructions

* moved behavior about missing content-type in explanation part

Co-authored-by: cvermand <[email protected]>

* Indexing CSVs (#28)

* Initiate csv indexation support specification

* update spec file name to match pull request id

* update csv indexation spec

* fix code examples and typos

* fix typos

* update spec name

* Update header part to match MeiliSearch Tracking-Issues

* update spec from the equivalent ndjson spec reviews

* update --data sample examples

* add information about giving application/json content-type or not for a json payload

* Apply suggestions from code review

Co-authored-by: Clément Renault <[email protected]>

* Change curl --data param to --binary-data in examples

Co-authored-by: Clément Renault <[email protected]>

* updates error codes

* moved behavior about missing content-type in explanation part

* Apply suggestions from code review

Co-authored-by: Clément Renault <[email protected]>

Co-authored-by: Clément Renault <[email protected]>

* Geosearch (#59)

* Initialize draft specification for geo-search feature

* add future possibilities

* Update specification

* mention errors and aspects about filterableAttributes and sortableAttributes

* Add measure and finalized key changes

* Add description in OpenApi

* remove old falsy sentence

* Add definition and explanation for  error

* fix rebase on develop

* Specify missing edge cases (#63)

* Initialize draft specification for geo-search feature

* add future possibilities

* Update specification

* mention errors and aspects about filterableAttributes and sortableAttributes

* Add measure and finalized key changes

* Add description in OpenApi

* remove old falsy sentence

* Add definition and explanation for  error

* fix rebase on develop

* update open-api.yml with description on _geoPoint built-in sort rule and _geo field

* Apply suggestions from code review

Co-authored-by: gui machiavelli <[email protected]>

* remove - char in geo-search

* update invalid_geo_field error definition

Co-authored-by: gui machiavelli <[email protected]>

* Patch GeoSearch specification to mention technical limit on `desc` ordering around a _geoPoint (#66)

* mention decision and expected behavior for a desc ordering around a geoPoint

* add desc ordering around a geoPoint as a future possibility

* Patch error codes for csv and ndjson formats specs (#64)

* specify error codes dedicated to payload format for post/put documents endpoints

* Udpdate error codes naming

* Add errors definition

* update errors and cURL examples

* Add alternative message for reserved keyword and update invalid_criterion error definition (#67)

* add alternative message for reserved keyword and update invalid_criterion error

* update error name in link field for invalid_ranking_rule error

* update invalid_geo_field error message

* fix typo

* Add future possibilities from irevoire to geosearch spec file (#74)

* add descending order capability for _geoPoint built-in sort (#77)

* Add variant message to ensure _geoPoint and _geoRadius expressions are not used as a ranking rule to help the user (#78)

* Mention the supported separator character (#81)

* Add content-type header requirements

* update bump.yml configuration

Co-authored-by: cvermand <[email protected]>
Co-authored-by: Clément Renault <[email protected]>
Co-authored-by: gui machiavelli <[email protected]>
gmourier added a commit that referenced this pull request Oct 12, 2021
* Initialize draft specification for geo-search feature

* add future possibilities

* Update specification

* mention errors and aspects about filterableAttributes and sortableAttributes

* Add measure and finalized key changes

* Add description in OpenApi

* remove old falsy sentence

* Add definition and explanation for  error

* fix rebase on develop

* Specify missing edge cases (#63)

* Initialize draft specification for geo-search feature

* add future possibilities

* Update specification

* mention errors and aspects about filterableAttributes and sortableAttributes

* Add measure and finalized key changes

* Add description in OpenApi

* remove old falsy sentence

* Add definition and explanation for  error

* fix rebase on develop

* update open-api.yml with description on _geoPoint built-in sort rule and _geo field

* Apply suggestions from code review

Co-authored-by: gui machiavelli <[email protected]>

* remove - char in geo-search

* update invalid_geo_field error definition

Co-authored-by: gui machiavelli <[email protected]>
@gmourier gmourier added the Patch This PR patch a feature specification label Oct 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Patch This PR patch a feature specification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants