Skip to content

Conversation

henrik242
Copy link
Contributor

@henrik242 henrik242 commented Jun 11, 2025

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

Note

Adds index mappings and query parsing/filtering for extra.* tags (incl. wildcards), with tests; removes :app:es_embedded from build.

  • OpenSearch:
    • Index mapping: Add IndexMapping.addExtraTags(...) to map extra object and configured extra.<key> keyword fields.
    • Server: Wire addExtraTags(dbProperties.getExtraTags()) into index create/update.
    • Filtering: Extend OsmTagFilter to handle extra.* fields and wildcard values; support exclude-value logic for extras.
  • Parsing:
    • TagFilter: split logic updated to support extra.<key>:<value> where values may contain colons.
  • Tests:
    • Integration: import and assert extra.transport_modes; new testExtraTags.
    • Unit: add extra.transport_modes:onstreetTram case.
  • Build:
    • Remove :app:es_embedded from settings.gradle.

Written by Cursor Bugbot for commit cd68c20. This will update automatically on new commits. Configure here.

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
@henrik242
Copy link
Contributor Author

henrik242 commented Jun 11, 2025

Up for discussion :)

I can search for tags with e.g. http://localhost:2322/api?q=Oslo&osm_tag=extra.transport_modes:onstreetTram, and there's a wildcard search too: http://localhost:2322/api?q=Oslo&osm_tag=extra.transport_modes:*onstreetTram*

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

@henrik242
Copy link
Contributor Author

Here's a test file btw. Import with:

$ java -jar target/photon-opensearch-0.7.0.jar -nominatim-import -import-file oslo.ndjson -languages no,en \
  -extra-tags id,layer,source,source_id,accuracy,country_a,county_gid,locality,locality_gid,label,transport_modes,tariff_zones

oslo.zip

Copy link

coderabbitai bot commented Oct 3, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit 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)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

cursor[bot]

This comment was marked as outdated.

@henrik242 henrik242 force-pushed the henrik/extra-search branch from e876e56 to cd68c20 Compare October 3, 2025 08:17
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.

1 participant