You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Javier Heras <ja...@kezka.com> on 2011/08/23 15:12:28 UTC

Spatial Search problems

Hi all,

I'm new at solr. I've downloaded solr 3.3, and having tested solr querys for
spatial search with examples that come in the tutorial. Everything ok. But
when I substitute the tutorial index with my index, spatial search doesn't
work until parameter d is greater than 4510 (km?)

Any idea what's going on?

Thanks

Javier

--
View this message in context: http://lucene.472066.n3.nabble.com/Spatial-Search-problems-tp3277945p3277945.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Spatial Search problems

Posted by "Smiley, David W." <ds...@mitre.org>.
Um, You might try googling LocalSolr or LocalLucene -- dead projects but you insist on using an old Solr/Lucene.

Of course if all you need is a bounding box filter than a pair of lat & lon range queries is sufficient.

~ David Smiley

On Aug 25, 2011, at 4:01 AM, Javier Heras wrote:

> Thanx David,
> 
> Just one more question. Am I able to do spatial search with solr1.4? And
> with lucene 2.9? What's your recomendation?
> 
> Javier
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Spatial-Search-problems-tp3277945p3283285.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Spatial Search problems

Posted by Javier Heras <ja...@kezka.com>.
Thanx David,

Just one more question. Am I able to do spatial search with solr1.4? And
with lucene 2.9? What's your recomendation?

Javier

--
View this message in context: http://lucene.472066.n3.nabble.com/Spatial-Search-problems-tp3277945p3283285.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Spatial Search problems

Posted by "Smiley, David W." <ds...@mitre.org>.
Well that's your problem :-P  You need to be using the same version of Lucene for reading & writing.  Create your index with Lucene 3.3.

FYI I tried indexing the point you said you had trouble with, and with a 300km radius, and it found it.

On Aug 24, 2011, at 4:39 AM, Javier Heras wrote:

> And one more thing... should I create the index with the same version of solr
> that I use to open index for reading??? I create my index with lucene 2.9,
> and my solr version where Im trying spatial search is 3.3
> 
> Thank you very much David
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Spatial-Search-problems-tp3277945p3280389.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Spatial Search problems

Posted by Javier Heras <ja...@kezka.com>.
And one more thing... should I create the index with the same version of solr
that I use to open index for reading??? I create my index with lucene 2.9,
and my solr version where Im trying spatial search is 3.3

Thank you very much David

--
View this message in context: http://lucene.472066.n3.nabble.com/Spatial-Search-problems-tp3277945p3280389.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Spatial Search problems

Posted by Javier Heras <ja...@kezka.com>.
Hi David,

the thing is that all indexed points are in spain, so distances should
always be lower than 1300 Kms. And yes, I'm using solr tutorial scheme.xml,
for which tutorial indexes work fine. When I change to my index, it only
works when distances are over 4510Kms. The query I run is:

http://localhost:8983/solr/select?fl=*,score&q=*:*&fq={!geofilt}&sfield=store&pt=40.41669,-3.700346&d=4510

And some of my indexed points are:

38.99765,-1.86007

This point is supossed to be in between 250kms more or less.

One thing: which is the way the coordinates field should be indexed?

Thanks

Javier

--
View this message in context: http://lucene.472066.n3.nabble.com/Spatial-Search-problems-tp3277945p3280207.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Spatial Search problems

Posted by "Smiley, David W." <ds...@mitre.org>.
Could you reproduce a very simple example of this? For example if there is a particular indexed point in your data that should be returned from your query (a query smaller than d=4k10), then reproduce that bug in the Solr example app by supplying a dummy document with this point and running your query.  Also, be sure you are using the correct field type (LatLonType).

~ David Smiley

On Aug 23, 2011, at 9:12 AM, Javier Heras wrote:

> Hi all,
> 
> I'm new at solr. I've downloaded solr 3.3, and having tested solr querys for
> spatial search with examples that come in the tutorial. Everything ok. But
> when I substitute the tutorial index with my index, spatial search doesn't
> work until parameter d is greater than 4510 (km?)
> 
> Any idea what's going on?
> 
> Thanks
> 
> Javier
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Spatial-Search-problems-tp3277945p3277945.html
> Sent from the Solr - User mailing list archive at Nabble.com.