I think it is because the range query exceeds
org.apache.lucene.search.BooleanQuery$TooManyClauses
Try a small query range. What kind of a field is id. Anyway i see that the
range is less in your case.
Sometimes big ranges go out of the maximum which lucene can handle and
boolean query exceeds that
Maybe some can also help
Rgds
Prabhu
On 4/4/06, Dedian Guo <[EMAIL PROTECTED]> wrote:
>
> I used following code to do my range searching:
>
> IndexSearcher searcher = new IndexSearcher("index");
> String qstr = "id:[1 TO 2]";
> Analyzer analyzer = new StandardAnalyzer();
> QueryParser qp = new QueryParser("title",analyzer);
> Query query = qp.parse(qstr);
> Hits hits = searcher.search(query,null);
>
> but i met follow error messages:
>
> Exception in thread "main"
> org.apache.lucene.search.BooleanQuery$TooManyClauses
> at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:184)
> at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:175)
> at org.apache.lucene.search.RangeQuery.rewrite(RangeQuery.java:94)
> at org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java
> :137)
> at org.apache.lucene.search.Query.weight(Query.java:92)
> at org.apache.lucene.search.Hits.<init>(Hits.java:48)
> at org.apache.lucene.search.Searcher.search(Searcher.java:53)
>
> could anybody give me some thought?
>
> thanks,
>
> P.S. BTW, the id field is indexed as string, such as 1, 2, 3, ...., 1000,
> ....
>
>