Hi Chris, My scenario is:
I will key in the first search value in the text box, then the first search result will be return. Next, I will clear the first search value and key in the second search value within the same text box. The 2nd search value will search the first result, for instance, my first result found 3 records, after the 2nd search is performed, it should be return 1 record. Meaning the first result is searched from the index folder, while 2nd search should not search the index directory again. I hope the scenario above make sense to you. Below a the codes that I have written, hope you can point out which part I m done wrong. Thanks reader = IndexReader.open(DsConstant.indexDir); Searcher searcher = new IndexSearcher(reader); Analyzer analyzer = new StandardAnalyzer(); QueryParser parser = new QueryParser(DsConstant.idxFileContent, analyzer); Query query = parser.parse(searchString); BooleanQuery bq = new BooleanQuery(); query = new FilteredQuery(new MatchAllDocQuery(), new SingleDocTestFilter(0)); bq.add(query, BooleanClause.Occur.MUST); query = new FilteredQuery(new MatchAllDocQuery(), new SingleDocTestFilter(0)); bq.add(query, BooleanClause.Occur.MUST); searchHits = searcher.search(query); Unfortunately, the codes above doesn't return any result. Hope to hear from you again. regards, Wooi Meng -- View this message in context: http://www.nabble.com/Filter-query-method-tf2586547.html#a7212918 Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]