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 roySolr <ro...@gmail.com> on 2011/10/13 09:31:10 UTC

Performance issue: Frange with geodist()

Hello,

I use the facet.query to search documents nearby the search location. It
looks like this:

facet.query={!frange l=0 u=10}geodist()
facet.query={!frange l=0 u=20}geodist()
facet.query={!frange l=0 u=50}geodist()
facet.query={!frange l=0 u=100}geodist()

SFIELD and the PT are set, and it works but it's very slow. The Qtime is
between 1400ms and 1800ms. Is there a way to win performance? or something
else to get the same response?

--
View this message in context: http://lucene.472066.n3.nabble.com/Performance-issue-Frange-with-geodist-tp3417962p3417962.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Performance issue: Frange with geodist()

Posted by roySolr <ro...@gmail.com>.
Hi Yonik,

I have used your suggestion to implement a better radius searcher:

&facet.query={!geofilt d=10 key=d10}
&facet.query={!geofilt d=20 key=d20}
&facet.query={!geofilt d=50 key=d50} 

It is a little bit faster than with geodist() but still a bottleneck i
think.

--
View this message in context: http://lucene.472066.n3.nabble.com/Performance-issue-Frange-with-geodist-tp3417962p3427820.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Performance issue: Frange with geodist()

Posted by Bill Bell <bi...@gmail.com>.
I added a Jira issue for this:

https://issues.apache.org/jira/browse/SOLR-2840



On 10/13/11 8:15 AM, "Yonik Seeley" <yo...@lucidimagination.com> wrote:

>On Thu, Oct 13, 2011 at 9:55 AM, Mikhail Khludnev
><mk...@griddynamics.com> wrote:
>> is it possible with geofilt and facet.query?
>>
>> facet.query={!geofilt pt=45.15,-93.85 sfield=store d=5}
>
>Yes, that should be both possible and faster... something along the lines
>of:
>&sfield=store&pt=45.15,-93.85
>&facet.query={!geofilt d=10 key=d10}
>&facet.query={!geofilt d=20 key=d20}
>&facet.query={!geofilt d=50 key=d50}
>
>Eventually we should implement range faceting over functions and also
>add a max distance you care about to the geodist function.
>
>-Yonik
>http://www.lucene-eurocon.com - The Lucene/Solr User Conference
>
>
>> On Thu, Oct 13, 2011 at 4:20 PM, roySolr <ro...@gmail.com>
>>wrote:
>>
>>> I don't want to use some basic facets. When the user doesn't get any
>>> results
>>> i want
>>> to search in the radius of his search location. Example:
>>>
>>> apple store in Manchester gives no result. I want this:
>>>
>>> Click here to see 2 results in a radius of 10km.
>>> Click here to see 11 results in a radius of 50km.
>>> Click here to see 19 results in a radius of 100km.
>>>
>>> With geodist() and facet.query is this possible but the performance
>>>isn't
>>> very good..
>>>
>>>
>>> --
>>> View this message in context:
>>> 
>>>http://lucene.472066.n3.nabble.com/Performance-issue-Frange-with-geodist
>>>-tp3417962p3418429.html
>>> Sent from the Solr - User mailing list archive at Nabble.com.
>>>
>>
>>
>>
>> --
>> Sincerely yours
>> Mikhail (Mike) Khludnev
>> Developer
>> Grid Dynamics
>> tel. 1-415-738-8644
>> Skype: mkhludnev
>> <http://www.griddynamics.com>
>>  <mk...@griddynamics.com>
>>



Re: Performance issue: Frange with geodist()

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Thu, Oct 13, 2011 at 9:55 AM, Mikhail Khludnev
<mk...@griddynamics.com> wrote:
> is it possible with geofilt and facet.query?
>
> facet.query={!geofilt pt=45.15,-93.85 sfield=store d=5}

Yes, that should be both possible and faster... something along the lines of:
&sfield=store&pt=45.15,-93.85
&facet.query={!geofilt d=10 key=d10}
&facet.query={!geofilt d=20 key=d20}
&facet.query={!geofilt d=50 key=d50}

Eventually we should implement range faceting over functions and also
add a max distance you care about to the geodist function.

-Yonik
http://www.lucene-eurocon.com - The Lucene/Solr User Conference


> On Thu, Oct 13, 2011 at 4:20 PM, roySolr <ro...@gmail.com> wrote:
>
>> I don't want to use some basic facets. When the user doesn't get any
>> results
>> i want
>> to search in the radius of his search location. Example:
>>
>> apple store in Manchester gives no result. I want this:
>>
>> Click here to see 2 results in a radius of 10km.
>> Click here to see 11 results in a radius of 50km.
>> Click here to see 19 results in a radius of 100km.
>>
>> With geodist() and facet.query is this possible but the performance isn't
>> very good..
>>
>>
>> --
>> View this message in context:
>> http://lucene.472066.n3.nabble.com/Performance-issue-Frange-with-geodist-tp3417962p3418429.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>
>
>
> --
> Sincerely yours
> Mikhail (Mike) Khludnev
> Developer
> Grid Dynamics
> tel. 1-415-738-8644
> Skype: mkhludnev
> <http://www.griddynamics.com>
>  <mk...@griddynamics.com>
>

Re: Performance issue: Frange with geodist()

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
is it possible with geofilt and facet.query?

facet.query={!geofilt pt=45.15,-93.85 sfield=store d=5}

On Thu, Oct 13, 2011 at 4:20 PM, roySolr <ro...@gmail.com> wrote:

> I don't want to use some basic facets. When the user doesn't get any
> results
> i want
> to search in the radius of his search location. Example:
>
> apple store in Manchester gives no result. I want this:
>
> Click here to see 2 results in a radius of 10km.
> Click here to see 11 results in a radius of 50km.
> Click here to see 19 results in a radius of 100km.
>
> With geodist() and facet.query is this possible but the performance isn't
> very good..
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Performance-issue-Frange-with-geodist-tp3417962p3418429.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Sincerely yours
Mikhail (Mike) Khludnev
Developer
Grid Dynamics
tel. 1-415-738-8644
Skype: mkhludnev
<http://www.griddynamics.com>
 <mk...@griddynamics.com>

Re: Performance issue: Frange with geodist()

Posted by roySolr <ro...@gmail.com>.
I don't want to use some basic facets. When the user doesn't get any results
i want
to search in the radius of his search location. Example:

apple store in Manchester gives no result. I want this:

Click here to see 2 results in a radius of 10km.
Click here to see 11 results in a radius of 50km.
Click here to see 19 results in a radius of 100km.

With geodist() and facet.query is this possible but the performance isn't
very good..


--
View this message in context: http://lucene.472066.n3.nabble.com/Performance-issue-Frange-with-geodist-tp3417962p3418429.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Performance issue: Frange with geodist()

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Ok. I've found explicit caveat for you
http://wiki.apache.org/solr/SpatialSearch#How_to_facet_by_distance
I don't think I'm able to help.

Just for curious why geofilt is not enough for you?
My concern is that the functions and queries score documents, but for facet
queries the only filtering is required.

On Thu, Oct 13, 2011 at 2:34 PM, roySolr <ro...@gmail.com> wrote:

> Hello Mikhail,
>
> Thanks for your answer..
>
> I think my cache is enabled for Geodist(). First time request takes 1440ms
> and second time only 2ms. In the statistics i see it's hits the cache. The
> problem is every request had another location with other distances and
> results. So almost every request takes ~1400ms. Do i have to make the cache
> bigger? I don't think it's possible to cache it all.
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Performance-issue-Frange-with-geodist-tp3417962p3418263.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Sincerely yours
Mikhail (Mike) Khludnev
Developer
Grid Dynamics
tel. 1-415-738-8644
Skype: mkhludnev
<http://www.griddynamics.com>
 <mk...@griddynamics.com>

Re: Performance issue: Frange with geodist()

Posted by roySolr <ro...@gmail.com>.
Hello Mikhail,

Thanks for your answer..

I think my cache is enabled for Geodist(). First time request takes 1440ms
and second time only 2ms. In the statistics i see it's hits the cache. The
problem is every request had another location with other distances and
results. So almost every request takes ~1400ms. Do i have to make the cache
bigger? I don't think it's possible to cache it all.

--
View this message in context: http://lucene.472066.n3.nabble.com/Performance-issue-Frange-with-geodist-tp3417962p3418263.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Performance issue: Frange with geodist()

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

Could check that every request doesn't trigger loading values into the
cache? You can see it in log. Recently I have similar issue when caching for
geodist() was disabled.

Regards

On Thu, Oct 13, 2011 at 11:31 AM, roySolr <ro...@gmail.com> wrote:

> Hello,
>
> I use the facet.query to search documents nearby the search location. It
> looks like this:
>
> facet.query={!frange l=0 u=10}geodist()
> facet.query={!frange l=0 u=20}geodist()
> facet.query={!frange l=0 u=50}geodist()
> facet.query={!frange l=0 u=100}geodist()
>
> SFIELD and the PT are set, and it works but it's very slow. The Qtime is
> between 1400ms and 1800ms. Is there a way to win performance? or something
> else to get the same response?
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Performance-issue-Frange-with-geodist-tp3417962p3417962.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Sincerely yours
Mikhail (Mike) Khludnev
Developer
Grid Dynamics
tel. 1-415-738-8644
Skype: mkhludnev
<http://www.griddynamics.com>
 <mk...@griddynamics.com>