Lucene - remove search result duplicates
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mike_Clayton
Posted On:   Friday, July 29, 2011 12:31 PM

I tried using the DuplicateFilter to prevent duplicate search results, but it causes zero search results, even though I know the search should have some results.

This is the code in question:

			
DuplicateFilter noDupes = new DuplicateFilter("filename"); noDupes.setKeepMode(DuplicateFilter.KM_USE_FIRST_OCCURRENCE);
TopDocs topDocs = searcher.search(query, noDupes,maxHits);


Any idea what I am doing wrong? If the field "filename" is the same, I want to remove the duplicate.
About | Sitemap | Contact