Add filtering for osm tags ("extra" properties)#908
Add filtering for osm tags ("extra" properties)#908henrik242 wants to merge 2 commits intokomoot:masterfrom
Conversation
Example query: /api?q=Oslo&osm_tag=extra.transport_modes:onstreetTram The extra tag(s) must have been imported, e.g.: $ java -jar target/photon-opensearch-0.7.0.jar -nominatim-import -import-file oslo.ndjson -languages no,en -extra-tags transport_modes
|
Up for discussion :) I can search for tags with e.g. There's some slightly ugly code in there to cope with :'s in values, so that I can search for e.g. http://localhost:2322/api?q=Oslo&osm_tag=extra.source_id:NSR:StopPlace:6505 |
|
Here's a test file btw. Import with: |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
e876e56 to
cd68c20
Compare
|
Superseded by #948 |
Example query:
/api?q=Oslo&osm_tag=extra.transport_modes:onstreetTramThe extra tag(s) must have been imported, e.g.:
Note
Adds index mappings and query parsing/filtering for
extra.*tags (incl. wildcards), with tests; removes:app:es_embeddedfrom build.IndexMapping.addExtraTags(...)to mapextraobject and configuredextra.<key>keyword fields.addExtraTags(dbProperties.getExtraTags())into index create/update.OsmTagFilterto handleextra.*fields and wildcard values; support exclude-value logic for extras.TagFilter: split logic updated to supportextra.<key>:<value>where values may contain colons.extra.transport_modes; newtestExtraTags.extra.transport_modes:onstreetTramcase.:app:es_embeddedfromsettings.gradle.Written by Cursor Bugbot for commit cd68c20. This will update automatically on new commits. Configure here.