Class PrimitiveFieldType

  • Direct Known Subclasses:
    AbstractEnumField, BoolField, NumericFieldType, StrField

    public abstract class PrimitiveFieldType
    extends FieldType
    Abstract class defining shared behavior for primitive types Intended to be used as base class for non-analyzed fields like int, float, string, date etc, and set proper defaults for them
    • Constructor Detail

      • PrimitiveFieldType

        public PrimitiveFieldType()
    • Method Detail

      • init

        protected void init​(IndexSchema schema,
                            Map<String,​String> args)
        Description copied from class: FieldType
        subclasses should initialize themselves with the args provided and remove valid arguments. leftover arguments will cause an exception. Common boolean properties have already been handled.
        Overrides:
        init in class FieldType
      • getDefaultMultiValueSelectorForSort

        public FieldType.MultiValueSelector getDefaultMultiValueSelectorForSort​(SchemaField field,
                                                                                boolean reverse)
        Description copied from class: FieldType
        Method for indicating which FieldType.MultiValueSelector (if any) should be used when sorting on a multivalued field of this type for the specified direction (asc/desc). The default implementation returns null (for all inputs).
        Overrides:
        getDefaultMultiValueSelectorForSort in class FieldType
        Parameters:
        field - The SchemaField (of this type) in question
        reverse - false if this is an ascending sort, true if this is a descending sort.
        Returns:
        the implicit selector to use for this direction, or null if implicit sorting on the specified direction is not supported and should return an error.
        See Also:
        FieldType.MultiValueSelector