Class AbstractSubTypeFieldType

  • All Implemented Interfaces:
    Direct Known Subclasses:

    public abstract class AbstractSubTypeFieldType
    extends FieldType
    implements SchemaAware
    An abstract base class for FieldTypes that delegate work to another FieldType. The sub type can be obtained by either specifying the subFieldType attribute or the subFieldSuffix. In the former case, a new dynamic field will be injected into the schema automatically with the name of FieldType.POLY_FIELD_SEPARATOR. In the latter case, it will use an existing dynamic field definition to get the type. See the example schema and the use of the PointType for more details.
    • Constructor Detail

      • AbstractSubTypeFieldType

        public AbstractSubTypeFieldType()
    • 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.
        init in class FieldType
      • inform

        public void inform​(IndexSchema schema)
        Registers the polyfield dynamic prototype for this field type: : "*___(field type name)"

        Informs the IndexSchema provided by the schema parameter of an event (e.g., a new FieldType was added, etc.

        Specified by:
        inform in interface SchemaAware
        schema - The IndexSchema instance that inform of the update to.
      • getFieldQuery

        public getFieldQuery​(QParser parser,
                                                            SchemaField field,
                                                            String externalVal)
        Throws UnsupportedOperationException()
        getFieldQuery in class FieldType
        parser - The QParser calling the method
        field - The SchemaField of the field to search
        externalVal - The String representation of the value to search
        The Query instance. This implementation returns a TermQuery but overriding queries may not
      • createSuffixCache

        protected void createSuffixCache​(int size)