org.apache.lucene.sandbox.queries
Class DuplicateFilter
java.lang.Object
org.apache.lucene.search.Filter
org.apache.lucene.sandbox.queries.DuplicateFilter
public class DuplicateFilter
- extends Filter
Filter to remove duplicate values from search results.
WARNING: for this to work correctly, you may have to wrap
your reader as it cannot current deduplicate across different
index segments.
- See Also:
SlowCompositeReaderWrapper
Nested Class Summary |
static class |
DuplicateFilter.KeepMode
KeepMode determines which document id to consider as the master, all others being
identified as duplicates. |
static class |
DuplicateFilter.ProcessingMode
"Full" processing mode starts by setting all bits to false and only setting bits
for documents that contain the given field and are identified as none-duplicates. |
DuplicateFilter
public DuplicateFilter(String fieldName)
DuplicateFilter
public DuplicateFilter(String fieldName,
DuplicateFilter.KeepMode keepMode,
DuplicateFilter.ProcessingMode processingMode)
getDocIdSet
public DocIdSet getDocIdSet(AtomicReaderContext context,
Bits acceptDocs)
throws IOException
- Specified by:
getDocIdSet
in class Filter
- Throws:
IOException
getFieldName
public String getFieldName()
setFieldName
public void setFieldName(String fieldName)
getKeepMode
public DuplicateFilter.KeepMode getKeepMode()
setKeepMode
public void setKeepMode(DuplicateFilter.KeepMode keepMode)
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
getProcessingMode
public DuplicateFilter.ProcessingMode getProcessingMode()
setProcessingMode
public void setProcessingMode(DuplicateFilter.ProcessingMode processingMode)
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.