AbstractSubTypeFieldType (Solr 3.6.2 API)
Keywords: org.apache.solr.schema.AbstractSubTypeFieldType class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.solr.schema
Class AbstractSubTypeFieldType

    java.lang.Object
      org.apache.solr.schema.FieldProperties
          org.apache.solr.schema.FieldType
              org.apache.solr.schema.AbstractSubTypeFieldType

All Implemented Interfaces:
  SchemaAware

Direct Known Subclasses:
  CoordinateFieldType, LatLonType

    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.

Nested Class Summary

Nested classes/interfaces inherited from class org.apache.solr.schema.FieldType
`FieldType.DefaultAnalyzer`

Field Summary
`protected int` | `dynFieldProps`
`protected IndexSchema` | `schema`
`static String` | `SUB_FIELD_SUFFIX`
`static String` | `SUB_FIELD_TYPE`
`protected FieldType` | `subType`
`protected String` | `suffix`
`protected String[]` | `suffixes`

Fields inherited from class org.apache.solr.schema.FieldType
`analyzer, args, falseProperties, log, POLY_FIELD_SEPARATOR, queryAnalyzer, trueProperties, typeName`

Fields inherited from class org.apache.solr.schema.FieldProperties
`BINARY, INDEXED, MULTIVALUED, OMIT_NORMS, OMIT_POSITIONS, OMIT_TF_POSITIONS, REQUIRED, SORT_MISSING_FIRST, SORT_MISSING_LAST, STORE_TERMOFFSETS, STORE_TERMPOSITIONS, STORE_TERMVECTORS, STORED, TOKENIZED`

Constructor Summary
`AbstractSubTypeFieldType()`

Method Summary
`protected void` | `createSuffixCache(int size)`
`Query` | `getFieldQuery(QParser parser, SchemaField field, String externalVal)` Throws UnsupportedOperationException()
`FieldType` | `getSubType()`
`void` | `inform(IndexSchema schema)` Informs the `IndexSchema` provided by the `schema` parameter of an event (e.g., a new `FieldType` was added, etc.
`protected void` | `init(IndexSchema schema, Map<String,String> args)` subclasses should initialize themselves with the args provided and remove valid arguments.
`protected SchemaField` | `subField(SchemaField base, int i)`

Methods inherited from class org.apache.solr.schema.FieldType
`createField, createField, createFields, getAnalyzer, getArg, getFieldIndex, getFieldStore, getFieldTermVec, getIndexOptions, getQueryAnalyzer, getRangeQuery, getSortField, getStringSort, getTypeName, getValueSource, getValueSource, hasProperty, indexedToReadable, isMultiValued, isPolyField, isTokenized, multiValuedFieldCache, readableToIndexed, restrictProps, setAnalyzer, setQueryAnalyzer, storedToIndexed, storedToReadable, toExternal, toInternal, toObject, toString, write, write`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### subType

    protected FieldType subType

### SUB_FIELD_SUFFIX

    public static final String SUB_FIELD_SUFFIX

See Also:
  Constant Field Values

### SUB_FIELD_TYPE

    public static final String SUB_FIELD_TYPE

See Also:
  Constant Field Values

### suffix

    protected String suffix

### dynFieldProps

    protected int dynFieldProps

### suffixes

    protected String[] suffixes

### schema

    protected IndexSchema schema

Constructor Detail

### AbstractSubTypeFieldType

    public AbstractSubTypeFieldType()

Method Detail

### getSubType

    public FieldType getSubType()

### 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`

### inform

    public void inform(IndexSchema schema)

  Description copied from interface: `SchemaAware`
  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`
  Parameters:
    `schema` - The `IndexSchema` instance that inform of the update to.

### getFieldQuery

    public Query getFieldQuery(QParser parser,
                               SchemaField field,
                               String externalVal)

  Throws UnsupportedOperationException()

  Overrides:
    `getFieldQuery` in class `FieldType`
  Parameters:
    `parser` - The `QParser` calling the method
    `field` - The `SchemaField` of the field to search
    `externalVal` - The String representation of the value to search
  Returns:
    The `Query` instance. This implementation returns a `TermQuery` but overriding queries may not

### createSuffixCache

    protected void createSuffixCache(int size)

### subField

    protected SchemaField subField(SchemaField base,
                                   int i)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD