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

Filter operators - IS NULL and IS EMPTY filter operators #232

Merged
merged 5 commits into from
Jun 5, 2023

Conversation

Kerollmops
Copy link
Member

@Kerollmops Kerollmops commented Apr 27, 2023

This PR is updating the search API specification and, specifically the filter field. It explains the support of the IS NULL and IS EMPTY operators. The original PR is available on GitHub, and the original product discussion too!

Changes

  • Explain the IS EMPTY operator on the filter field of the search API
  • Explain the IS NULL operator on the filter field of the search API

Attention To Reviewers

Explain clearly what reviewers should specifically look for to facilitate the review phase. Also, mention the sections that will not necessarily be taken into account if reviewed.


Misc

  • [] Update OpenAPI specification file (if needed; Apply the OpenApi label)
  • [] Update telemetry datapoints (if needed; Apply the Telemetry label)

@gmourier
Copy link
Member

gmourier commented Apr 27, 2023

Thank you @Kerollmops I see an OpenAPI label, but I don't see any changes on the open-api.yml spec. I don't think it should since we are not describing every possible operator on the open API. We could do that in a future iteration if needed!

I've put the PR in Ready For Review + added the required labels

@gmourier gmourier marked this pull request as ready for review April 27, 2023 14:20
@gmourier gmourier added Ready For Review Feature specification must be reviewed. v1.2.0 labels Apr 27, 2023
@Kerollmops Kerollmops removed the OpenAPI Update OpenAPI specification. label Apr 27, 2023
@gmourier
Copy link
Member

gmourier commented Apr 27, 2023

cc @macraig I added you as a reviewer so you can follow the process and participate in it ✨

@gmourier gmourier changed the title Is null is empty filters Filter operators - Additions of IS NULL and IS EMPTY operators Apr 27, 2023
@gmourier gmourier changed the title Filter operators - Additions of IS NULL and IS EMPTY operators Filter operators - IS NULL and IS EMPTY filter operators Apr 27, 2023
@gmourier gmourier mentioned this pull request Apr 27, 2023
1 task
@ahmednfwela
Copy link

One thing to note, is that currently there is no way to use the new IS filter with the IN filter
but you can do
tag IS NULL OR tag IN ["hello", "world"]

@gmourier gmourier requested a review from curquiza May 2, 2023 07:21
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.

Thank you @Kerollmops

Some comments about the document structures (section and naming about introduced parts)

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 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
Copy link
Member

gmourier commented May 2, 2023

Hey @ahmednfwela 👋

What do you mean by "One thing to note, is that currently there is no way to use the new IS filter with the IN filter"?

Thanks!

@ahmednfwela
Copy link

@gmourier you can't use tags IN [IS NULL, "action"] for example which might be a common query that people expect,so I thought it would be cool to document it

@gmourier
Copy link
Member

gmourier commented May 2, 2023

Thank you for the precision, @ahmednfwela !

Kerollmops and others added 2 commits May 2, 2023 13:46
Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com>
Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com>
@Kerollmops Kerollmops requested a review from gmourier May 2, 2023 11:47
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.

Looks perfect to me, especially with the list of empty value 👌

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.

Thank you @Kerollmops ! 🚂

@gmourier gmourier added Implemented Feature specification has been implemented. and removed Ready For Review Feature specification must be reviewed. labels May 2, 2023
@macraig macraig merged commit e74e3a2 into release-v1.2.0 Jun 5, 2023
@macraig macraig deleted the is-null-is-empty-filters branch June 5, 2023 15:43
macraig pushed a commit that referenced this pull request Jun 5, 2023
* Bump OpenAPI version

* CSV Content-Type — Add support for the boolean type in CSV (#228)

* add support for the boolean type in csv

* fix a typo

* Update text/0028-indexing-csv.md

---------

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

* Filter operators - `IS NULL` and `IS EMPTY` filter operators (#232)

* Introduce the spec of the IS EMPTY filter

* Introduce the spec of the IS NULL filter

* Fix suggestions

* Uppercase the IN operator

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

* Fix a title number issue

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

---------

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

* Search Algorithms Refactor: Relevancy Changes (#233)

* Remove old exactness-criterion specification

* Remove old asc-desc-criterion specification

* Get and delete documents by filter (#236)

* specify the new fetch documents route

* update open-api

* try to be nice with bumpsh

* specify the new analytics of the get/fetch documents route

* group the analytics behind already used groups

* fix a placeholder text

* group the get and fetch route under a common section

* rename the section to contain the name of both routes

* clarify how to send the parameter to both routes

* fix the type of the parameters

* add the new fetch route to the api keys actions

* capitalize json

Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>

* update open-api

* Specify the new route to delete documents by filter

* add the new analytics event

* improve a comment

* add the post - delete route to the api key actions

* Fix the json payload

Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>

* Apply suggestions from code review

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

* Update the details

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

* delete the invalid_document_delete_filter error code and introduce the missing_document_filter

* fix the open-api thingy

---------

Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>
Co-authored-by: Guillaume Mourier <guillaume@meilisearch.com>

* Auto deletion of tasks (#238)

* auto deletion of tasks

* Update text/0060-tasks-api.md

Co-authored-by: gui machiavelli <hey@guimachiavelli.com>

* Update text/0060-tasks-api.md

Co-authored-by: gui machiavelli <hey@guimachiavelli.com>

---------

Co-authored-by: gui machiavelli <hey@guimachiavelli.com>

* Experimental reduce indexing memory usage (#239)

* Add the experimental-reduce-indexing-memory-usage option in the telemetry policies

* Add the experimental-reduce-indexing-memory-usage option in the instance options

* Update 0055-sort.md (#240)

related to meilisearch/meilisearch#3749

* Update `payload_too_large` error `message` (#241)

* Update 0061-error-format-and-definitions.md

Update error message in the specification

* Update open-api.yaml

---------

Co-authored-by: Tamo <tamo@meilisearch.com>
Co-authored-by: Clément Renault <renault.cle@gmail.com>
Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>
Co-authored-by: gui machiavelli <hey@guimachiavelli.com>
Co-authored-by: Many the fish <legendre.maxime.isn@gmail.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. Q2:2023 v1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants