lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nader Henein <>
Subject Re: Need help with filtering
Date Wed, 17 Nov 2004 05:20:26 GMT
Well if the document ID is number (even if it isn't really) you could 
use a range query, or just rebuild your index using that specific filed 
as a sorted field but if it numeric be aware that if you use integer it 
limits how high your numbers can get.


Edwin Tang wrote:

>I have been using DateFilter to limit my search results to a certain date
>range. I am now asked to replace this filter with one where my search results
>have document IDs greater than a given document ID. This document ID is
>assigned during indexing and is a Keyword field.
>I've browsed around the FAQs and archives and see that I can either use
>QueryFilter or BooleanQuery. I've tried both approaches to limit the document
>ID range, but am getting the BooleanQuery.TooManyClauses exception in both
>cases. I've also tried bumping max number of clauses via setMaxClauseCount(),
>but that number has gotten pretty big.
>Is there another approach to this? Or am I setting this up incorrectly? Snippet
>of one of my approaches follows:
>queryFilter = new QueryFilter(new RangeQuery(new Term("id", sLastSearchedId),
>null, false));
>docs =, queryFilter,
>utility.iMaxResults, new Sort(sortFields));
>Thanks in advance,
>Do you Yahoo!? 
>Meet the all-new My Yahoo! - Try it today! 
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

View raw message