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.