Class SortableTextField

  • Direct Known Subclasses:
    NestPathField

    public class SortableTextField
    extends TextField
    SortableTextField is a specialized form of TextField that supports Sorting and ValueSource functions, using docValues built from the first maxCharsForDocValues characters of the original (pre-analyzed) String values of this field.

    The implicit default value for maxCharsForDocValues is 1024. If a field type instance is configured with maxCharsForDocValues <= 0 this overrides the default with an effective value of "no limit" (Integer.MAX_VALUE).

    Instances of this FieldType implicitly default to docValues="true" unless explicitly configured with docValues="false".

    Just like StrField, instances of this field that are multiValued="true" support the field(name,min|max) function, and implicitly sort on min|max depending on the asc|desc direction selector.

    NOTE: Unlike most other FieldTypes, this class defaults to useDocValuesAsStored="false". If an instance of this type (or a field that uses this type) overrides this behavior to set useDocValuesAsStored="true" then instead of truncating the original string value based on the effective value of maxCharsForDocValues , this class will reject any documents w/a field value longer then that limit -- causing the document update to fail. This behavior exists to prevent situations that could result in a search client reieving only a truncated version of the original field value in place of a stored value.