public final class CollationDocValuesField extends Field
SortedDocValuesField.
This is more efficient that CollationKeyAnalyzer if the field
only has one value: no uninversion is necessary to sort on the field,
locale-sensitive range queries can still work via DocValuesRangeQuery,
and the underlying data structures built at index-time are likely more efficient
and use less memory than FieldCache.
Field.StorefieldsData, tokenStream, type| Constructor and Description |
|---|
CollationDocValuesField(java.lang.String name,
java.text.Collator collator)
Create a new ICUCollationDocValuesField.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
name()
Field name
|
void |
setStringValue(java.lang.String value)
Expert: change the value of this field.
|
binaryValue, fieldType, getCharSequenceValue, numericValue, readerValue, setBytesValue, setBytesValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setReaderValue, setShortValue, setTokenStream, stringValue, tokenStream, tokenStreamValue, toStringpublic CollationDocValuesField(java.lang.String name,
java.text.Collator collator)
NOTE: you should not create a new one for each document, instead
just make one and reuse it during your indexing process, setting
the value via setStringValue(String).
name - field namecollator - Collator for generating collation keys.public java.lang.String name()
IndexableFieldname in interface IndexableFieldname in class Fieldpublic void setStringValue(java.lang.String value)
Field
Expert: change the value of this field. This can be used during indexing to
re-use a single Field instance to improve indexing speed by avoiding GC
cost of new'ing and reclaiming Field instances. Typically a single
Document instance is re-used as well. This helps most on small
documents.
Each Field instance should only be used once within a single
Document instance. See ImproveIndexingSpeed for details.
setStringValue in class FieldCopyright © 2000–2025 The Apache Software Foundation. All rights reserved.