dcsimg
Can I apply filtering after getting the Hits?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Yi_Zhang
Posted On:   Monday, October 28, 2002 07:39 PM

Just confused by the lucene javadoc. Now doing my testing on that. So the question is: Does lucene provide a way to apply filtering after getting the Hit list "Hits"? For example: Searcher searcher = new IndexSearcher(INDEX_LOCATION); Query query = QueryParser.parse(queryString, "contents", myAnalyzer); Hits hits = idx_searcher.search(query); //For each of the hits item, I want to check against some other //criteria(in a DB) to see if it should remain in the return hits or not. Seems current the org.apache.lucene.search.Filter implementation can only be applied before the search on every document.    More>>

Just confused by the lucene javadoc. Now doing my testing on that.


So the question is: Does lucene provide a way to apply filtering after getting the Hit list "Hits"?


For example:

			
Searcher searcher = new IndexSearcher(INDEX_LOCATION);
Query query = QueryParser.parse(queryString, "contents", myAnalyzer);
Hits hits = idx_searcher.search(query);
//For each of the hits item, I want to check against some other
//criteria(in a DB) to see if it should remain in the return hits or not.

Seems current the org.apache.lucene.search.Filter implementation can only be applied
before the search on every document.

   <<Less
About | Sitemap | Contact