lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Quail <>
Subject Re: Mixing database and lucene searches
Date Tue, 11 May 2004 23:04:19 GMT
Eric Jain wrote:
>>To ask a silly question:  What approach does Lucene use for
>>ranges and sorting?
> A range such as '10-60' is expanded into a boolean query containing all
> terms that are in the index and lie within the specified range, e.g. '10
> or 11 or 20 or 59'.

Yes, using a range search requires loading all the (existant) terms 
between '10' and '60' and combining them into one big Boolean "or" 
query. There is a limit to how big such a query can get.

The performant alternative is to use a Filter. You lose the ability to 
do boosting on that field, but it can handle ranges of any size.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message