lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Urvashi Gadi <ug...@emory.edu>
Subject "filtering" using RangeFilter class
Date Fri, 03 Mar 2006 20:37:22 GMT
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


Mime
View raw message