[OSM-dev] Anyone with a speedy gazetteer
David Earl
david at frankieandshadow.com
Mon Jan 12 14:05:32 GMT 2009
On 12/01/2009 13:51, Milo van der Linden wrote:
> As Tom Hughes suggested earlier on; perhaps it would be smart to use
> postgres,
>
> especially since somany postgres/postgis instances are lying around for
> the mapnik servers that the openstreetmap community uses. My guess would
> be that a lot of people would be able to support you:
>
> http://www.postgresql.org/docs/8.3/static/textsearch.html
> http://www.postgresql.org/docs/8.3/static/fuzzystrmatch.html
>
> The textsearch module for postgresql handles records in the database as
> "documents"; giving you a broad variety of search functions.
>
> Perhaps this is the right compromis between a real search engine and
> searching records in a database.
>
> Regarding the near by; this would mainly mean "select this and that
> where searchterm="bla" and distance(the_geom, yourlocation) < x.
>
> The last query needs an extremely good design since distance functions
> perform somewhat problematic..
That function the starting point for writing namefinder in the first place.
But please be clear - this isn't just a simple text searching
application. It needs to cope with variations in language and
abbreviations and so on, and it has to cope with large numbers of
duplicate names, some of which are not the same object as another of the
same name, and some are; and as you say, the proximity - which isn't
just in the unqualified searches - the results try to give you not just
a hit ("1. Main Street, 2. "Main Street", 3. "Main Street" ... is not
helpful) but with a context so you know which is the one you are really
looking for. This is true even of place names (see the discussions re
Paris we were having a month ago).
If we were only searching the names in the planet file or some other
plain text, life would be simple. But it is a great deal more
complicated than that to produce useful, contextual results. And I'd be
the first to agree that it isn't there yet.
David
More information about the dev
mailing list