org.apache.lucene.facet.encoding
Class UniqueValuesIntEncoder
java.lang.Object
org.apache.lucene.facet.encoding.IntEncoder
org.apache.lucene.facet.encoding.IntEncoderFilter
org.apache.lucene.facet.encoding.UniqueValuesIntEncoder
public final class UniqueValuesIntEncoder
- extends IntEncoderFilter
An IntEncoderFilter
which ensures only unique values are encoded. The
implementation assumes the values given to encode(IntsRef, BytesRef)
are sorted.
If this is not the case, you can chain this encoder with
SortingIntEncoder
.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
UniqueValuesIntEncoder
public UniqueValuesIntEncoder(IntEncoder encoder)
- Constructs a new instance with the given encoder.
encode
public void encode(IntsRef values,
BytesRef buf)
- Description copied from class:
IntEncoder
- Encodes the values to the given buffer. Note that the buffer's offset and
length are set to 0.
- Specified by:
encode
in class IntEncoder
createMatchingDecoder
public IntDecoder createMatchingDecoder()
- Description copied from class:
IntEncoder
- Returns an
IntDecoder
which can decode the values that were encoded
with this encoder.
- Specified by:
createMatchingDecoder
in class IntEncoder
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.