Be aware that a number of countries span more than one continent. For example, Russia and Turkey and others in that region of the world.

Normally, you flatten your data model for Solr, so each document would have a continent, country, state, and city.

You can do a dismax query for the terms on those four fields with a boost, although I'm not sure a boost will be of any value in the case of a dismax which is providing an exact match anyway.

-- Jack Krupansky

-----Original Message----- From: rashi gandhi
Sent: Tuesday, December 31, 2013 8:15 AM
To: solr-user@lucene.apache.org
Subject: Need Help for Location searching

Hi,


I wanted to design an analyzer that can support location containment
relationship For example Europe->France->Paris


My requirement is like: when a user search for any country , then results
must have the documents having that country , as well as the documents
having states and cities which comes under that country.

But, documents with country name must have high relevancy.

And the same when a user search for state or city.

It must obeys containment relationship up to 4 levels .i.e.
Continent->Country->State->City


Also, I have designed analyzer using synonym filter factory for the same,
and its working as per expectation.

But I wanted to know, is there any another way, apart from using synonym
filter factory that can be used for the same.

Is SOLR provide any tokenziers or filters for this?

Please provide me some pointers to move ahead.


Thanks in Advance

Reply via email to