Class ICUCollatedTermAttributeImpl
- java.lang.Object
-
- org.apache.lucene.util.AttributeImpl
-
- org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
-
- org.apache.lucene.collation.tokenattributes.ICUCollatedTermAttributeImpl
-
- All Implemented Interfaces:
java.lang.Appendable
,java.lang.CharSequence
,java.lang.Cloneable
,CharTermAttribute
,TermToBytesRefAttribute
,Attribute
public class ICUCollatedTermAttributeImpl extends CharTermAttributeImpl
Extension ofCharTermAttributeImpl
that encodes the term text as a binary Unicode collation key instead of as UTF-8 bytes.
-
-
Field Summary
Fields Modifier and Type Field Description private com.ibm.icu.text.Collator
collator
private com.ibm.icu.text.RawCollationKey
key
-
Fields inherited from class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
builder
-
-
Constructor Summary
Constructors Constructor Description ICUCollatedTermAttributeImpl(com.ibm.icu.text.Collator collator)
Create a new ICUCollatedTermAttributeImpl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BytesRef
getBytesRef()
Retrieve this attribute's BytesRef.-
Methods inherited from class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
append, append, append, append, append, append, buffer, charAt, clear, clone, copyBuffer, copyTo, equals, hashCode, length, reflectWith, resizeBuffer, setEmpty, setLength, subSequence, toString
-
Methods inherited from class org.apache.lucene.util.AttributeImpl
end, reflectAsString
-
-
-
-
Method Detail
-
getBytesRef
public BytesRef getBytesRef()
Description copied from interface:TermToBytesRefAttribute
Retrieve this attribute's BytesRef. The bytes are updated from the current term. The implementation may return a new instance or keep the previous one.- Specified by:
getBytesRef
in interfaceTermToBytesRefAttribute
- Overrides:
getBytesRef
in classCharTermAttributeImpl
- Returns:
- a BytesRef to be indexed (only stays valid until token stream gets incremented)
-
-