org.apache.lucene.sandbox.queries

## Class DuplicateFilter

- java.lang.Object
- - org.apache.lucene.search.Query
  - - org.apache.lucene.search.Filter
    - - org.apache.lucene.sandbox.queries.DuplicateFilter

- All Implemented Interfaces:
    Cloneable

  Deprecated.
  This class will be removed in Lucene 6.0. DiversifiedTopDocsCollector should be used instead with a maximum number of hits per key equal to 1.

      @Deprecated
      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

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DuplicateFilter.KeepMode` Deprecated. KeepMode determines which document id to consider as the master, all others being identified as duplicates.
    `static class` | `DuplicateFilter.ProcessingMode` Deprecated. "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.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DuplicateFilter(String fieldName)` Deprecated.
    `DuplicateFilter(String fieldName, DuplicateFilter.KeepMode keepMode, DuplicateFilter.ProcessingMode processingMode)` Deprecated.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)` Deprecated.
    `DocIdSet` | `getDocIdSet(LeafReaderContext context, Bits acceptDocs)` Deprecated.
    `String` | `getFieldName()` Deprecated.
    `DuplicateFilter.KeepMode` | `getKeepMode()` Deprecated.
    `DuplicateFilter.ProcessingMode` | `getProcessingMode()` Deprecated.
    `int` | `hashCode()` Deprecated.
    `void` | `setFieldName(String fieldName)` Deprecated.
    `void` | `setKeepMode(DuplicateFilter.KeepMode keepMode)` Deprecated.
    `void` | `setProcessingMode(DuplicateFilter.ProcessingMode processingMode)` Deprecated.
    `String` | `toString(String field)` Deprecated.

    - ### Methods inherited from class org.apache.lucene.search.Filter

      `rewrite`

    - ### Methods inherited from class org.apache.lucene.search.Query

      `clone, createWeight, getBoost, setBoost, toString`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### DuplicateFilter

          public DuplicateFilter(String fieldName)

      Deprecated.

    - #### DuplicateFilter

          public DuplicateFilter(String fieldName,
                         DuplicateFilter.KeepMode keepMode,
                         DuplicateFilter.ProcessingMode processingMode)

      Deprecated.

  - ### Method Detail

    - #### getDocIdSet

          public DocIdSet getDocIdSet(LeafReaderContext context,
                             Bits acceptDocs)
                               throws IOException

      Deprecated.
      Specified by:
        `getDocIdSet` in class `Filter`
      Throws:
        `IOException`

    - #### getFieldName

          public String getFieldName()

      Deprecated.

    - #### setFieldName

          public void setFieldName(String fieldName)

      Deprecated.

    - #### getKeepMode

          public DuplicateFilter.KeepMode getKeepMode()

      Deprecated.

    - #### setKeepMode

          public void setKeepMode(DuplicateFilter.KeepMode keepMode)

      Deprecated.

    - #### equals

          public boolean equals(Object obj)

      Deprecated.
      Overrides:
        `equals` in class `Query`

    - #### toString

          public String toString(String field)

      Deprecated.
      Specified by:
        `toString` in class `Query`

    - #### hashCode

          public int hashCode()

      Deprecated.
      Overrides:
        `hashCode` in class `Query`

    - #### getProcessingMode

          public DuplicateFilter.ProcessingMode getProcessingMode()

      Deprecated.

    - #### setProcessingMode

          public void setProcessingMode(DuplicateFilter.ProcessingMode processingMode)

      Deprecated.

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.