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 Maxim Veksler <ma...@vekslers.org> on 2012/01/03 21:39:00 UTC

Solr support for compound geospatial indexs?

Hello,

I've started to evaluate Solr and so far haven't seen anything mentions for
support of compound indexes.

I'm looking to either radius or share based geospatial proximity queries
(find all document that are 20km from given lat,lng)
I would also at times be doing geo queries bonded with another term (for
ex. "house rooms" = 5).

My aim is to do very fast queries against the indexed data. I have no real
constraints on the time it would take to build this index.

Does Solr support building and index on the 2 types of fields lat,lng &
"house rooms" ?


Thank you,
Maxim.

Re: Solr support for compound geospatial indexs?

Posted by Maxim Veksler <ma...@vekslers.org>.
Hello Mikhail

Thank you for the fast reply, please find my answers inline.

On Tue, Jan 3, 2012 at 11:00 PM, Mikhail Khludnev <
mkhludnev@griddynamics.com> wrote:

> Hello,
>
> Please find my thoughts below.
>
> On Wed, Jan 4, 2012 at 12:39 AM, Maxim Veksler <ma...@vekslers.org> wrote:
> >
> > Hello,
> >
> > I've started to evaluate Solr and so far haven't seen anything mentions
> for
> > support of compound indexes.
>
> If I get you right, it doesn't. AFAIK It combines separate indexes
> basing on the condensed internal ids aka docNums
>
> >
> > I'm looking to either radius or share based geospatial proximity queries
> > (find all document that are 20km from given lat,lng)
>
> http://wiki.apache.org/solr/SpatialSearch#geofilt_-_The_distance_filter
> consider https://issues.apache.org/jira/browse/SOLR-2155 if you are
> dealing with multivalue coordinates.
>
>
Thank you for the reference to SOLR-2155.

I've studied geohash[1] and the work David Smiley[2] is doing[3] for Solr
4 thoroughly.
I think that my problem is simpler - I don't need multivalue coordinates
support because my locations are represented by a single lat,lng point and
I will be searching for all the points that fall into my defined radius.
Where there is a 1:1 mapping between a document and the point it is
categorized by.


> I would also at times be doing geo queries bonded with another term (for
> > ex. "house rooms" = 5).
>
> just add separate ...&fq=H_ROOMS:5&...
> http://wiki.apache.org/solr/CommonQueryParameters#fq
>
> >
> >
> > My aim is to do very fast queries against the indexed data. I have no
> real
> > constraints on the time it would take to build this index.
> >
> > Does Solr support building and index on the 2 types of fields lat,lng &
> > "house rooms" ?
> Sure. It sounds like intersecting fqs.
>
>
Wonderful to hear this, guess I'm no really understanding how Solr / Lucene
works then.
Could you please reference me or explain how Solr builds it's index? I'm
especially interested in how the search is implemented under the hood -
Given geo & "plular" terms what would lucene do?  How would it do the
actual searching / or perhaps what I need to be asking is what & how the
"intersecting fqs" are implemented?

I apologize for the messy question, I'm only starting to understand Lucene.

Please let me know if it works for you.
>
> >
> >
> > Thank you,
> > Maxim.
>
>
[1]
http://gis.stackexchange.com/questions/18330/would-it-be-possible-to-use-geohash-for-proximity-searches
[2]
http://www.basistech.com/pdf/events/open-source-search-conference/oss-2011-smiley-geospatial-search.pdf
[3] http://code.google.com/p/lucene-spatial-playground/

Re: Solr support for compound geospatial indexs?

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Hello,

Please find my thoughts below.

On Wed, Jan 4, 2012 at 12:39 AM, Maxim Veksler <ma...@vekslers.org> wrote:
>
> Hello,
>
> I've started to evaluate Solr and so far haven't seen anything mentions for
> support of compound indexes.

If I get you right, it doesn't. AFAIK It combines separate indexes
basing on the condensed internal ids aka docNums

>
> I'm looking to either radius or share based geospatial proximity queries
> (find all document that are 20km from given lat,lng)

http://wiki.apache.org/solr/SpatialSearch#geofilt_-_The_distance_filter
consider https://issues.apache.org/jira/browse/SOLR-2155 if you are
dealing with multivalue coordinates.

> I would also at times be doing geo queries bonded with another term (for
> ex. "house rooms" = 5).

just add separate ...&fq=H_ROOMS:5&...
http://wiki.apache.org/solr/CommonQueryParameters#fq

>
>
> My aim is to do very fast queries against the indexed data. I have no real
> constraints on the time it would take to build this index.
>
> Does Solr support building and index on the 2 types of fields lat,lng &
> "house rooms" ?
Sure. It sounds like intersecting fqs.

Please let me know if it works for you.

>
>
> Thank you,
> Maxim.




--
Sincerely yours
Mikhail Khludnev
Lucid Certified
Apache Lucene/Solr Developer
Grid Dynamics