[OSM-dev] Anyone with a speedy gazetteer

Robert (Jamie) Munro rjmunro at arjam.net
Wed Jan 21 11:59:09 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Tom Hughes wrote:
> Milo van der Linden wrote:
> 
>> I strongly suggest that you read the postgresql text search[1] chapter 
>> in depth. You will find that a lot of textual and multilingual 
>> confusions can be solved with that function set. the name "text search" 
>> is by far too simple for what it covers...
> 
> I have read it, and it's not at all clear it can be made to work right.
> 
> The basic problem is that it assumes that all text in a given field is 
> in the same language - you can give it a set of language specific rules 
> to use when parsing a the record data and when parsing the query but you 
> can't vary that on a record by record basis.
> 
> Though even if you could you wouldn't know what language the query was 
> in anyway, so you wouldn't know how to parse it...

Surely the best strategy is to ignore the language. Someone may mix
their languages while searching - E.g. Cardiff, Cmyru. Just match text
whatever language tag it is in.

Also, I don't think the searching needs to be very spatial aware. If we
implement the gazetteer with a page for each tagged node, way or
relation, and each page lists the things it is in or near, a simple
Google-like search of those pages would produce good namefinder-like
results. We're almost half way there with the /browse data pages. They'd
need to be cross-linked and/or put in sitemap.xml files so that Google
can find them, and they'd need the nearby things added.

To find "something near me", you could use revese-geocoding to add a
spatial element to the search, so generate a list of things near the
current position, and text search for those.

Listing (or filtering) things in order of distance from current position
could be done in memory at the end of the process, using the top 50
results or whatever from the text search.

Robert (Jamie) Munro



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl3DgwACgkQz+aYVHdncI0QZACgmPKveo82kHG01FuVRX+G2wB/
+lYAoPq4kyU7XQjC+f4jctGzvxK72kDO
=kH+d
-----END PGP SIGNATURE-----




More information about the dev mailing list