On Mar 15, 2010, at 11:36 AM, Jean-Sebastien Vachon wrote:

> Hi All,
> 
> I'm trying to figure out how to perform spatial searches using Solr 1.5 (from 
> the trunk).
> 
> Is the support for spatial search built-in?

Almost.  Main thing missing right now is filtering.  There are still ways to do 
spatial filtering, but it isn't complete yet.  In the meantime, range queries 
and or frange might help.

> because none of the patches I tried could be applied to the source tree.
> If this is the case, can someone one tell me how to configure it?

http://wiki.apache.org/solr/SpatialSearch has most of the docs, but they aren't 
complete yet.

Here's what I would do:
Check out latest Solr
Build the example: ant clean example
Start the example: cd example; java -jar start.jar
Rebuild the index: cd exampledocs; java -jar post.jar *.xml
Run a query:  http://localhost:8983/solr/select/?q=_val_:"recip(dist(2, store, 
vector(34.0232,-81.0664)),1,1,0)"&fl=*,score  // Note, I just updated this, it 
used to be point instead of vector and that was wrong.

Next, have a look at the docs in exampledocs and specifically the store field, 
which contains the location.  Then go check out the schema for that field.

HTH,
Grant

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem using Solr/Lucene: 
http://www.lucidimagination.com/search

Reply via email to