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

Extend "raw_filters" in categories definitions for OSM POIs, to allow "cuisine" filter #249

Merged
merged 3 commits into from
Jun 14, 2021

Conversation

amatissart
Copy link
Contributor

In "categories.yaml", the raw_filters (used in ES queries) are now defined with objects that accept the following keys : class, subclass, cuisine.
The new MimirPoiFilter is responsible for translating these values into appropriate poi_type.name values (see Qwant/fafnir#61)

All functions related to queries in ES for documents built by Mimirsbrunn importers are moved to "idunn/datasources/mimirsbrunn.py".

The new implementation removes a deprecated behavior about "class" filters: both {poi_class} and class_{poi_class} were accepted. The first format is obsolete. That's why a few existing fixtures need to be updated.

remi-dupre
remi-dupre previously approved these changes Jun 14, 2021
Copy link
Contributor

@remi-dupre remi-dupre left a comment

Choose a reason for hiding this comment

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

I feel like those filters are even more readable in this way 👍

- class: "restaurant"
cuisine: "burger"
- class: "fast_food"
cuisine: "pizza"
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like a small typo:

Suggested change
cuisine: "pizza"
cuisine: "burger"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! It was certain that I would miss something in this file.

@amatissart amatissart merged commit 85d5799 into master Jun 14, 2021
@amatissart amatissart deleted the filter-cuisine branch June 16, 2021 08:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants