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

Search API — Filters - Introduce IN and EXISTS and describe filter capabilities in more precisely #163

Merged
merged 2 commits into from
Oct 3, 2022

Conversation

loiclec
Copy link
Contributor

@loiclec loiclec commented Jul 20, 2022

Summary

With the release of Meilisearch v0.29.0, we hope to add more filter operators and to change the behaviour of NOT and !=. This PR updates the specification so that it is up-to-date with these changes. I have also updated it to be more precise and complete.


Changes

  • Update search-api.md

Out Of Scope

N/A


Attention To Reviewers

I am not entirely sure what the expected style of the spec is supposed to be, so please let me know if something can be slightly improved or if it is completely wrong :)


Misc

N/A

@curquiza curquiza added the v0.29 label Jul 21, 2022
@loiclec loiclec changed the base branch from main to develop July 21, 2022 07:28
EXISTS
IN
NOT (new behaviour)
!= (new behaviour)
@gmourier gmourier added Ready For Review Feature specification must be reviewed. and removed Ready For Review Feature specification must be reviewed. labels Aug 2, 2022
@gmourier gmourier mentioned this pull request Aug 2, 2022
1 task
@gmourier gmourier changed the title Write a specification for the new (and old) search filters Filters - Dedicated specification (catch-up) and introduce IN and EXISTS Aug 2, 2022
@gmourier gmourier requested review from gmourier and irevoire August 8, 2022 11:39
@gmourier gmourier added the Ready For Review Feature specification must be reviewed. label Aug 8, 2022
@gmourier gmourier changed the title Filters - Dedicated specification (catch-up) and introduce IN and EXISTS Filters - Introduce IN and EXISTS and describe filter capabilities in more precisely Aug 9, 2022
Copy link
Member

@gmourier gmourier left a comment

Choose a reason for hiding this comment

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

This is super clear @loiclec! Thanks

text/0118-search-api.md Outdated Show resolved Hide resolved
Copy link
Member

@irevoire irevoire left a comment

Choose a reason for hiding this comment

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

Awesome, you documented so many edge cases!

text/0118-search-api.md Outdated Show resolved Hide resolved
text/0118-search-api.md Outdated Show resolved Hide resolved
text/0118-search-api.md Outdated Show resolved Hide resolved
text/0118-search-api.md Outdated Show resolved Hide resolved

Note that `attribute != value` is equivalent to `NOT attribute = value`.

Furthermore, there is no way to write a filter to select documents which contain a value that is different than a given string or number. In the example above, `size != 1` did not select the document with id `1`, even though its `size` attribute contains the value `"L"`, which is different than `1`.
Copy link
Member

Choose a reason for hiding this comment

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

Nice I never thought of that

text/0118-search-api.md Outdated Show resolved Hide resolved
text/0118-search-api.md Outdated Show resolved Hide resolved
text/0118-search-api.md Outdated Show resolved Hide resolved
text/0118-search-api.md Outdated Show resolved Hide resolved
text/0118-search-api.md Outdated Show resolved Hide resolved
@gmourier gmourier changed the title Filters - Introduce IN and EXISTS and describe filter capabilities in more precisely Search API — Filters - Introduce IN and EXISTS and describe filter capabilities in more precisely Aug 24, 2022
Co-authored-by: Tamo <tamo@meilisearch.com>
Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com>
Copy link
Member

@irevoire irevoire left a comment

Choose a reason for hiding this comment

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

nice

@gmourier
Copy link
Member

gmourier commented Oct 3, 2022

Thank you @loiclec !

@gmourier gmourier merged commit 49f6eda into develop Oct 3, 2022
@gmourier gmourier deleted the search-filter branch October 3, 2022 14:41
@gmourier gmourier added Implemented Feature specification has been implemented. and removed Ready For Review Feature specification must be reviewed. labels Oct 3, 2022
gmourier added a commit that referenced this pull request Oct 3, 2022
…pabilities in more precisely (#163)

* Write a specification for the new (and old) search filters

EXISTS
IN
NOT (new behaviour)
!= (new behaviour)

* Apply suggestions from code review

Co-authored-by: Tamo <tamo@meilisearch.com>
Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com>

Co-authored-by: Tamo <tamo@meilisearch.com>
Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com>
gmourier added a commit that referenced this pull request Oct 3, 2022
* Bump openapi spec version to v0.29

* Update 0001-script-based-tokenizer.md (#159)

Change tokenizer specs to better fit Charabia implementation

* Update the geosearch error (#161)

Implemented in meilisearch/milli#561

* Auto-batching - Enable feature by default and remove unwanted options (#162)

* Update specs according to new auto-batching behavior

* update batchUid to make it internal and hidden from a task resource representation

* Remove the batchUid mentions from the task API

* Update open-api.yaml

Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com>

* update future possibilities

Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com>

* Search API — Filters - Introduce IN and EXISTS and describe filter capabilities in more precisely (#163)

* Write a specification for the new (and old) search filters

EXISTS
IN
NOT (new behaviour)
!= (new behaviour)

* Apply suggestions from code review

Co-authored-by: Tamo <tamo@meilisearch.com>
Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com>

Co-authored-by: Tamo <tamo@meilisearch.com>
Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com>

* Add missing settings object in the task details field of a settingsUpdate task type (#164)

* Remove `name` from indexes resource definition (#165)

* Misc — Soft deleted documents (Performance optimization) (#168)

* create a spec for the soft deleted documents

* Rename spec file, minor adjustements

* Replace You and We by A user and Meilisearch

Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com>

* Add Stats Seen event (#169)

* Add examples component for each summarized task type (#170)

* Version API — Catch up (#171)

* Add version-api.md

* Add PR number as a spec file prefix

* Add health-api.md (#172)

* Search API — Add `matchingStrategy` parameter with `last` / `all` strategies (#173)

* Introduce a proposal to boot the specification

* Update telemetry

* Replace wordMatchingStrategy by matchingStrategy

* fix missing backtick md

Co-authored-by: Many the fish <legendre.maxime.isn@gmail.com>
Co-authored-by: Tamo <tamo@meilisearch.com>
Co-authored-by: Clémentine Urquizar - curqui <clementine@meilisearch.com>
Co-authored-by: Loïc Lecrenier <loic.lecrenier@me.com>
Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Implemented Feature specification has been implemented. v0.29
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants