This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Was does the leading space mean in word.word_token?

1

I'm wondering why words appear to entered twice in the word table, once plain and once with a leading space.

This table is part of Nominatim (or Gazetteer as it was called when i first installed it). Here are links for the create table statement.

asked 05 May '12, 15:26

brian_252's gravatar image

brian_252
76236
accept rate: 0%

edited 06 May '12, 00:08

3

Please tell us what word table you are talking about.

(05 May '12, 17:10) scai ♦

One Answer:

6

Tokens with a leading space constitute full matches (names), while those with out spaces are simple words. To give an example: for 'swan lane rd', you will find ' swan lane rd' as the name and 'swan', 'lane' and 'rd' as partial words. Single word names have always two entries: 'london' will have ' london' for the full name and 'london' as a word match.

answered 06 May '12, 14:39

lonvia's gravatar image

lonvia
6.2k25789
accept rate: 40%

Source code available on GitHub .