lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <ysee...@gmail.com>
Subject Re: Range vs Term lookup
Date Tue, 30 May 2006 22:50:51 GMT
On 5/30/06, maustin75 <maustin75@gmail.com> wrote:
> I'm doing a search based on price and was wondering what the performance
> difference would be between these two queries:
>
> 1) +price:[0 TO 20]
> 2) +price:4567
>
> Basically, to do a search with a range or pre-determine the range and do a
> search based on an id?

The same speed if they are in Solr's cache :-)
Range query will be slightly slower, but if it becomes a bottleneck or
not depends on the total complexity of the queries/requests.

> It would be easier to set up with a range, however I
> don't want to lose performance.

Start with the more flexible range query and only optimize if
necessary.  Both should be relatively quick.

-Yonik

Mime
View raw message