lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Khludnev <mkhlud...@griddynamics.com>
Subject Re: How to return the distance geo distance on solr 3.5 with bbox filtering
Date Wed, 18 Jan 2012 19:11:49 GMT
Can you try to specify two fqs, geodist as a function query, sort by score?

fq={!bbox}&.....&sort=score%20asc&fq=trafficRouteId:235&q={!func}geodist()&fl=*,score

On Wed, Jan 18, 2012 at 4:46 PM, Maxim Veksler <maxim@vekslers.org> wrote:

> Hello Mikhail,
>
> Please see reply inline.
>
> On Wed, Jan 18, 2012 at 11:00 AM, Mikhail Khludnev <
> mkhludnev@griddynamics.com> wrote:
>
> > Maxim,
> >
> > Which version of Solr you are using?
> >
>
> As mentioned in the title, I'm using Solr 3.5.
>

I see


>
>
> > Why the second approach at the link doesn't work for you?
> >
> I'm not sure I'm following. I'm trying to use bbox instead of
>
> I use the fq fields to define the bbox filtering.
> I also need to query by another parameter (trafficRouteId).
>
you can put trafficRouteId as a second fq, as I did above


>
> I would optimally would be happy to get the distance calculation from Solr
> but that doesn't seem to work in any format of query I tried.
>
pls try my approach above and let me know what you get.



>
> Being new to Solr query language I'm not sure how to form the search terms
> to combine all of this with the score.
>
>
>
> > what do you get on this case? pls provide, logs, exception, and debug
> > response.
> >
> > Thanks
> >
> >
> > On Tue, Jan 17, 2012 at 10:06 PM, Maxim Veksler <maxim@vekslers.org>
> > wrote:
> >
> > > Hello,
> > >
> > > I'm querying with bbox which should be faster then geodist, my queries
> > are
> > > looking like this:
> > >
> > >
> >
> http://localhost:8983/solr/select?indent=true&fq={!bbox}&sfield=loc&pt=39.738548,-73.130322&d=100&sort=geodist()%20asc&q=trafficRouteId:235
> > <
> >
> http://localhost:8983/solr/select?indent=true&fq=%7B%21bbox%7D&sfield=loc&pt=39.738548,-73.130322&d=100&sort=geodist%28%29%20asc&q=trafficRouteId:235
> > >
> > >
> > > the trouble is, that with bbox solr does not return the distance of
> each
> > > document, I couldn't get it to work even with tips from
> > > http://wiki.apache.org/solr/SpatialSearch#Returning_the_distance
> > >
> > > Something I'm missing ?
> > >
> >
> >
> >
> > --
> > Sincerely yours
> > Mikhail Khludnev
> > Lucid Certified
> > Apache Lucene/Solr Developer
> > Grid Dynamics
> >
> > <http://www.griddynamics.com>
> >  <mkhludnev@griddynamics.com>
> >
>



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

<http://www.griddynamics.com>
 <mkhludnev@griddynamics.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message