I was trying to Search ton of names(10000+) against lucene index, the names were loaded from a text file. This is snippet of my code:
Analyzer analyzer = new StandardAnalyzer();
MultiFieldQueryParser mParser = new MultiFieldQueryParser(arrSearchFields,
analyzer);
Query keyWordsQuery = mParser.parse(names);
- First I get the error: too many boolean clauses at org.apache.lucene.queryparser.classic.QueryParserBase.parse(QueryParserBase.java:118)
as search on the internet, I can fix the by
BooleanQuery.setMaxClauseCount(Integer.MAX_VALUE);
But the search is slow and use a lot of memory.
Any suggestions for this case?
Appreciate it.
James