Skip to content

categories.txt

mpimenov edited this page Apr 30, 2019 · 5 revisions

categories.txt contains synonyms that are used by the search engine when searching for objects by their types.

For example:

amenity-supermarket
en:3Supermarket|grocery|3shop
ru:3Супермаркет|магазин
  • Here amenity-supermarket is a map object type (multiple objects can be separated with the "|" symbol).
  • Then goes the language code before the colon (en and ru in the example above), and one or more words after.
  • A number before a word means how many chars should be typed before suggestion with this word appears on a search screen.
  • If you add a synonym for a type, please take a look at the types_strings.txt file which shows the displayed type name. In the above example, an object found by the query shop may be shown to the user to have the type Supermarket. If the translation is not added to the types_strings.txt, however, the plain amenity-supermarket will be shown. For more information on improving the localization, see strings.txt.

Please note that our search is prefix-only and it takes delimiters into account. For example, if you type market it will match super-market or super market but it won't match supermarket. However, the type of delimiter does not matter much, and super-market will be the same as super market, so there's no need to add both synonyms.

Clone this wiki locally