Class ICUCollationDocValuesField

  • All Implemented Interfaces:

    public final class ICUCollationDocValuesField
    extends Field
    Indexes collation keys as a single-valued SortedDocValuesField.

    This is more efficient that ICUCollationKeyAnalyzer 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.

    • Constructor Detail

      • ICUCollationDocValuesField

        public ICUCollationDocValuesField​(String name,
        Create a new ICUCollationDocValuesField.

        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 name
        collator - Collator for generating collation keys.