Replies: 3 comments
-
Let's say the extratag is wikidata, for example a value like 'Q1794'. Nominatim has an extendable tokenizer system https://nominatim.org/release-docs/latest/customize/Tokenizers/ The part you want to look at is the sanetizers. Check the default settings/icu_tokenizer.yaml for an ordered list of sanetizers which are run against every place. For example you will see a sanetizer I think you want to create a new sanetizer which looks at a place's extratags and adds another name. The input to a sanetizer
Searching for 'Q1794' alone should work. It's more complex in combination, Q1794 is Frankfurt (https://www.wikidata.org/wiki/Q1794) so I don't know if 'Holzgraben 5, Q1794, Germany' will work as well as 'Holzgraben 5, Frankfurt, Germany'. |
Beta Was this translation helpful? Give feedback.
-
The sanitizers are one way. You can also simply add the tag as a "name" instead of "extratag" during import. Staying with the 'wikidata' tag example, simply change this line Nominatim/settings/import-admin.lua Line 47 in 82970e2 To
and your tag will be handled like any other name and be searchable. |
Beta Was this translation helpful? Give feedback.
-
Thanks @lonvia and @mtmail - works like a charm. I went with Sarah's solution - just because it was simpler/faster to implement, but will look into sanitizers for the next functionality I will be probably implementing. |
Beta Was this translation helpful? Give feedback.
-
I have prepared a self hosted installation based on a limited/custom pbf file and a modified copy of a builtin admin flex file that include one additional tag - this works just fine, as I am able (once I use extratags parameter) to list the value I am after for some free-search queries (as this tag does not exist in every single OSM object).
Is there a way to index additional extra tag so it can be used for searching - I would like to be able to search giving value of this particular tag alone? Possible?
Beta Was this translation helpful? Give feedback.
All reactions