public class DuplicateFilter extends Filter
Modifier and Type | Field and Description |
---|---|
static int |
KM_USE_FIRST_OCCURRENCE |
static int |
KM_USE_LAST_OCCURRENCE |
static int |
PM_FAST_INVALIDATION |
static int |
PM_FULL_VALIDATION |
Constructor and Description |
---|
DuplicateFilter(String fieldName) |
DuplicateFilter(String fieldName,
int keepMode,
int processingMode) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
DocIdSet |
getDocIdSet(IndexReader reader)
Creates a
DocIdSet enumerating the documents that should be
permitted in search results. |
String |
getFieldName() |
int |
getKeepMode() |
int |
getProcessingMode() |
int |
hashCode() |
void |
setFieldName(String fieldName) |
void |
setKeepMode(int keepMode) |
void |
setProcessingMode(int processingMode) |
public static final int KM_USE_FIRST_OCCURRENCE
public static final int KM_USE_LAST_OCCURRENCE
public static final int PM_FULL_VALIDATION
public static final int PM_FAST_INVALIDATION
public DuplicateFilter(String fieldName)
public DuplicateFilter(String fieldName, int keepMode, int processingMode)
public DocIdSet getDocIdSet(IndexReader reader) throws IOException
Filter
DocIdSet
enumerating the documents that should be
permitted in search results. NOTE: null can be
returned if no documents are accepted by this Filter.
Note: This method will be called once per segment in
the index during searching. The returned DocIdSet
must refer to document IDs for that segment, not for
the top-level reader.
getDocIdSet
in class Filter
reader
- a IndexReader
instance opened on the index currently
searched on. Note, it is likely that the provided reader does not
represent the whole underlying index i.e. if the index has more than
one segment the given reader only represents a single segment.IOException
DocIdBitSet
public String getFieldName()
public void setFieldName(String fieldName)
public int getKeepMode()
public void setKeepMode(int keepMode)
public int getProcessingMode()
public void setProcessingMode(int processingMode)