http://lucene.apache.org/java/2_3_1/api/core/org/apache/lucene/search/MultiPhraseQuery.html
for the example "Microsoft app*", he says use IndexReader.term()
but that returns TermEnum
, how do I put it in MultiPhraseQueryParser
?
Edit :
Or someone tell me how do I do a search on Microsoft app* in a better way over a 7.5 GB index!!
You need to iterate on TermEnum to get the terms. You can iterate on the TermEnum to get terms starting with "app" as follows.