org.apache.lucene.search.BooleanQuery$TooManyClauses
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   adhil_jamal
Posted On:   Saturday, June 24, 2006 12:24 AM

Hi All, I am rookie to Lucene. I am using Lucene 2.0 version. I face this critical issue in my appln. I just tried out a sample below to mimic the scenario. .. .. for(int i=0;i <1200;i++){ Document doc = new Document(); doc.add(new Field("NAME", "adhil"+i,Field.Store.YES, Field.Index.TOKENIZED)); doc.add(new Field("CITY", "chennai",Field.Store.YES, Field.Index.TOKENIZED)); writer.addDocument(doc); } writer.close(); .. .. For search, i used below code snippet.. String srchQuery = "(NAME:(adh*))"; QueryParser parser = new QueryParser("NAME", new Standa   More>>

Hi All,

I am rookie to Lucene. I am using Lucene 2.0 version. I face this critical issue in my appln. I just tried out a sample below to mimic the scenario.

..
..
for(int i=0;i <1200;i++){
Document doc = new Document();

doc.add(new Field("NAME", "adhil"+i,Field.Store.YES,
Field.Index.TOKENIZED));
doc.add(new Field("CITY", "chennai",Field.Store.YES, Field.Index.TOKENIZED));
writer.addDocument(doc);
}
writer.close();
..
..

For search, i used below code snippet..

String srchQuery = "(NAME:(adh*))";
QueryParser parser = new QueryParser("NAME", new StandardAnalyzer());
query = parser.parse(srchQuery);
hits = searcher.search(query);

It throws the err below.

org.apache.lucene.search.BooleanQuery$TooManyClauses
at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:160)
at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:151)


Is anything wrong with my query framing?


With Regards,
adhil.J

   <<Less
About | Sitemap | Contact