Hi all,

Here is my situation:

I'm implementing some geographical search functions that allows user to
search for documents close to a location. Because not all documents have
proper location information that can be converted to (latitude, longitude)
coordinate, I also have to use normal full text search to filter out
documents. For example, if users search for "Java" in "Parramatta, NSW" and
the following documents are in the index:

Doc1: [Title=Java; Location=Parramatta, NSW; latitude=x1; longitude=x2]
Doc2: [Title=Java; Location=North Ryde, NSW; latitude=x3; longitude=x4]
Doc3: [Title=Java; Location=Parramatta]

My filter query looks like this:

fq= (+latitude[lat1 TO lat2] +longitude[lng1 TO lng2]) location:Parramatta
location:NSW

Now assuming that my query matches those three documents, I need to make
sure that documents with "Parramatta" in their locations have some kind of
boost to the final score. For example, I'd like to have Doc3 listed before
Doc2 because it has "Parramatta" in location field.

Is this possible? Thanks in advance!

-- 
Regards,

Cuong Hoang

Reply via email to