Class ICUCollatedTermAttributeImpl
java.lang.Object
org.apache.lucene.util.AttributeImpl
org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
org.apache.lucene.analysis.icu.tokenattributes.ICUCollatedTermAttributeImpl
- All Implemented Interfaces:
Appendable,CharSequence,Cloneable,CharTermAttribute,TermToBytesRefAttribute,Attribute
Extension of
CharTermAttributeImpl that encodes the term text as a binary Unicode
collation key instead of as UTF-8 bytes.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.ibm.icu.text.Collatorprivate final com.ibm.icu.text.RawCollationKeyFields inherited from class org.apache.lucene.analysis.tokenattributes.CharTermAttributeImpl
builder -
Constructor Summary
ConstructorsConstructorDescriptionICUCollatedTermAttributeImpl(com.ibm.icu.text.Collator collator) Create a new ICUCollatedTermAttributeImpl -
Method Summary
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, toStringMethods inherited from class org.apache.lucene.util.AttributeImpl
end, reflectAsStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Field Details
-
collator
private final com.ibm.icu.text.Collator collator -
key
private final com.ibm.icu.text.RawCollationKey key
-
-
Constructor Details
-
ICUCollatedTermAttributeImpl
public ICUCollatedTermAttributeImpl(com.ibm.icu.text.Collator collator) Create a new ICUCollatedTermAttributeImpl- Parameters:
collator- Collation key generator
-
-
Method Details
-
getBytesRef
Description copied from interface:TermToBytesRefAttributeRetrieve 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:
getBytesRefin interfaceTermToBytesRefAttribute- Overrides:
getBytesRefin classCharTermAttributeImpl- Returns:
- a BytesRef to be indexed (only stays valid until token stream gets incremented)
-