lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: FieldCacheRangeFilter Vs NumericRangeQuery
Date Wed, 08 Dec 2010 20:52:26 GMT
Hi Romi,

Depending on how many documents are returned, FieldCacheRangeFilter (may)
outperform NumericRangeQuery/Filter. But for sparse results,
NumericRangeQuery performs much better. Look here: http://s.apache.org/tk

Additionally take into account that the FieldCache must be built before the
first query (warming) and FC only works correct with exactly one value /
document. Missing values or more than one value break FieldCache usage for
range filtering. FieldCacheRangeFilter is good, if you use it on fields you
are already need for sorting and are in FieldCache already.

Please note: Bothe NumericRangeFilter and FieldCacheRangeFilter can be used
with CachingWrapperFilter. In this case, NumericRangeFilter is faster most
times (when already cached).

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de


> -----Original Message-----
> From: Romi [mailto:romijain3186@gmail.com]
> Sent: Wednesday, December 08, 2010 7:45 AM
> To: general@lucene.apache.org
> Subject: FieldCacheRangeFilter Vs NumericRangeQuery
> 
> 
> Hi,
>    I am using Lucene3.0 for my project. I used FieldCacheRangeFilter
(Static
> method newLongRange()) with NumericRangeQuery in one implementation
> of dateRangeQuery search and only NumericRangeQuery for another
> implementation of dateRangeQuery search.
> I found 17525 documents via both implementation but search time via
> FieldCacheRangeFilter was 172milliseconds while via NumericRangeQuery
> search it was 62milliseconds.
> 
> I got confused because i was expecting that FieldCacheRangeFilter do
search
> faster.
> Why it happened please explain.
> 
> -----
> Romi
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/FieldCacheRangeFilter-Vs-
> NumericRangeQuery-tp2038419p2038419.html
> Sent from the Lucene - General mailing list archive at Nabble.com.


Mime
View raw message