Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.1: Add new filter rule _geoBoundingBox #2216

Merged
merged 8 commits into from
Mar 30, 2023
Merged

v1.1: Add new filter rule _geoBoundingBox #2216

merged 8 commits into from
Mar 30, 2023

Conversation

guimachiavelli
Copy link
Member

Closes #2201

@guimachiavelli guimachiavelli changed the base branch from main to v1.1 March 13, 2023 12:12
@guimachiavelli guimachiavelli changed the title v1.1: Add new filter rule _geoboundingbox v1.1: Add new filter rule _geoBoundingBox Mar 13, 2023
learn/advanced/geosearch.md Outdated Show resolved Hide resolved
Copy link
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

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

I just checked the code-sample but LGTM! 🎉

Copy link
Contributor

@maryamsulemani97 maryamsulemani97 left a comment

Choose a reason for hiding this comment

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

Could you please update the last bullet for the following errors in /reference/errors/error_codes.md:

  • invalid_settings_ranking_rules
  • invalid_search_sort
  • invalid_search_filter

to:

A reserved keyword like _geo, _geoDistance, _geoPoint, _geoRadius or _geoBoundingBox is used…

reference/api/search.md Show resolved Hide resolved
@guimachiavelli
Copy link
Member Author

@maryamsulemani97: is the list of reserved words exhaustive? If so, does it have to be?

@maryamsulemani97
Copy link
Contributor

is the list of reserved words exhaustive? If so, does it have to be?

It isn't. We can document this somewhere else if needed

@guimachiavelli
Copy link
Member Author

guimachiavelli commented Mar 20, 2023

Ok, so after some actual testing I realised there's no "one size fits all" solution here. This is what we'll do:

  • invalid_settings_ranking_rules: should include both _geoRadius and _geoBoundingBox. Using any of these words as custom ranking rules (e.g. _geoRadius:asc or _geo:desc) triggers an error
  • invalid_search_sort: currently wrong. it says we can't use _geoPoint when not only we can do it, there's no other way of using _geoPoint. should include both _geoRadius and _geoBoundingBox
  • invalid_search_filter: correct as it is. should not include _geoBoundingBox nor _geoRadius, as both of these are valid filter rules

Copy link
Contributor

@maryamsulemani97 maryamsulemani97 left a comment

Choose a reason for hiding this comment

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

🍎

@guimachiavelli guimachiavelli added this to the v1.1 milestone Mar 27, 2023
@guimachiavelli guimachiavelli requested a review from irevoire March 29, 2023 15:24
learn/advanced/geosearch.md Outdated Show resolved Hide resolved
Co-authored-by: Tamo <tamo@meilisearch.com>
@guimachiavelli guimachiavelli requested a review from irevoire March 30, 2023 12:04
@guimachiavelli
Copy link
Member Author

bors merge

@bors bors bot merged commit 9937154 into v1.1 Mar 30, 2023
@bors bors bot deleted the v1.1-geoboundingbox branch March 30, 2023 12:13
@bors
Copy link
Contributor

bors bot commented Mar 30, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v1.1: New geosearch filter _geoBoundingBox
5 participants