lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Seeta Somagani" <Seeta.Somag...@xplana.com>
Subject RE: "filtering" using RangeFilter class
Date Fri, 03 Mar 2006 20:41:06 GMT
That would most likely be the result of your range query expanding to
more than BooleanQuery.getMaxClauseCount(); Use
BooleanQuery.setMaxClauseCount(int) to set it to a higher range

-----Original Message-----
From: Urvashi Gadi [mailto:ugadi@emory.edu] 
Sent: Friday, March 03, 2006 3:37 PM
To: java-user@lucene.apache.org
Subject: "filtering" using RangeFilter class

Hi All,

I am trying to filter my search using RangeFilter class but i get 
BooleanQuery TooManyClauses exception.

Exception in thread "main" 
org.apache.lucene.search.BooleanQuery$TooManyClauses

at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:109)
at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:100)
at org.apache.lucene.search.RangeQuery.rewrite(RangeQuery.java:92)
at
org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:171)
at org.apache.lucene.search.Query.weight(Query.java:91)
.....
.....

Snapshot of my code is as follows

rangeFilter = new RangeQuery(new Term(metadata, lowerVal), new 
Term(metadata, upperVal), true);
QueryFilter orgFilter = new QueryFilter(rangeFilter);
Query query = QueryParser.parse(userQuery, "contents", new 
StandardAnalyzer());
hits = is.search(query, orgFilter);

Any pointers and help will be greatly appreciated.

Best regards,
Urvashi




---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message