Package org.apache.lucene.misc.index

# Class BinaryDocValueSelector

java.lang.Object
org.apache.lucene.misc.index.BinaryDocValueSelector

All Implemented Interfaces:
  `Serializable`, `IndexRearranger.DocumentSelector`

public class BinaryDocValueSelector extends Object implements IndexRearranger.DocumentSelector, Serializable
Use this selector to rearrange an index where documents can be uniquely identified based on `BinaryDocValues`

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`BinaryDocValueSelector(String field, Set<BytesRef> keySet)`

## Method Summary

Modifier and Type
Method
Description
`static IndexRearranger.DocumentSelector`
`createDeleteSelectorFromIndex(String field, Directory directory)`
Create a selector for the deletes in an index, which can then be applied to a rearranged index
`static List<IndexRearranger.DocumentSelector>`
`createLiveSelectorsFromIndex(String field, Directory directory)`
Create a list of selectors that will reproduce the index geometry when used with `IndexRearranger`
`BitSet`
`getFilteredDocs(CodecReader reader)`

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### BinaryDocValueSelector

public BinaryDocValueSelector(String field, Set<BytesRef> keySet)

## Method Details

### getFilteredDocs

public BitSet getFilteredDocs(CodecReader reader) throws IOException

Specified by:
  `getFilteredDocs` in interface `IndexRearranger.DocumentSelector`
Throws:
  `IOException`

### createDeleteSelectorFromIndex

public static IndexRearranger.DocumentSelector createDeleteSelectorFromIndex(String field, Directory directory) throws IOException
Create a selector for the deletes in an index, which can then be applied to a rearranged index

Parameters:
  `field` - tells which `BinaryDocValues` are the unique key
  `directory` - where the original index is present
Returns:
  a deletes selector to be passed to `IndexRearranger`
Throws:
  `IOException`

### createLiveSelectorsFromIndex

public static List<IndexRearranger.DocumentSelector> createLiveSelectorsFromIndex(String field, Directory directory) throws IOException
Create a list of selectors that will reproduce the index geometry when used with `IndexRearranger`

Parameters:
  `field` - tells which `BinaryDocValues` are the unique key
  `directory` - where the original index is present
Returns:
  a list of selectors to be passed to `IndexRearranger`
Throws:
  `IOException`