Package 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
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, FieldType.MultiValueSelector -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected IndexSchemastatic final Stringstatic final Stringprotected Stringprotected Stringprotected FieldTypeprotected Stringprotected String[]Fields inherited from class org.apache.solr.schema.FieldType
ANALYZER, args, AUTO_GENERATE_PHRASE_QUERIES, CHAR_FILTER, CHAR_FILTERS, CLASS_NAME, docValuesFormat, ENABLE_GRAPH_QUERIES, falseProperties, FILTER, FILTERS, INDEX, INDEX_ANALYZER, MULTI_TERM, MULTI_TERM_ANALYZER, POLY_FIELD_SEPARATOR, postingsFormat, properties, QUERY, QUERY_ANALYZER, similarity, SIMILARITY, similarityFactory, SYNONYM_QUERY_STYLE, TOKENIZER, trueProperties, TYPE, TYPE_NAME, typeNameFields inherited from class org.apache.solr.schema.FieldProperties
BINARY, DOC_VALUES, INDEXED, LARGE_FIELD, MULTIVALUED, OMIT_NORMS, OMIT_POSITIONS, OMIT_TF_POSITIONS, REQUIRED, SORT_MISSING_FIRST, SORT_MISSING_LAST, STORE_OFFSETS, STORE_TERMOFFSETS, STORE_TERMPAYLOADS, STORE_TERMPOSITIONS, STORE_TERMVECTORS, STORED, TOKENIZED, UNINVERTIBLE, USE_DOCVALUES_AS_STORED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcreateSuffixCache(int size) org.apache.lucene.search.QuerygetFieldQuery(QParser parser, SchemaField field, String externalVal) Throws UnsupportedOperationException()voidinform(IndexSchema schema) Registers the polyfield dynamic prototype for this field type: : "*___(field type name)"protected voidinit(IndexSchema schema, Map<String, String> args) subclasses should initialize themselves with the args provided and remove valid arguments.protected SchemaFieldsubField(SchemaField base, int i, IndexSchema schema) Methods inherited from class org.apache.solr.schema.FieldType
checkSchemaField, checkSupportsDocValues, createField, createField, createFields, enableDocValuesByDefault, getAnalyzerProperties, getClassArg, getDefaultMultiValueSelectorForSort, getDocValuesFormat, getExistenceQuery, getFieldTermQuery, getIndexAnalyzer, getNamedPropertyValues, getNonFieldPropertyArgs, getNumberType, getNumericSort, getPostingsFormat, getPrefixQuery, getQueryAnalyzer, getRangeQuery, getRewriteMethod, getSetQuery, getSimilarity, getSimilarityFactory, getSingleValueSource, getSortedNumericSortField, getSortedSetSortField, getSortField, getSortField, getSpecializedExistenceQuery, getSpecializedRangeQuery, getStringSort, getTypeName, getUninversionType, getValueSource, hasProperty, indexedToReadable, indexedToReadable, isExplicitAnalyzer, isExplicitQueryAnalyzer, isMultiValued, isPointField, isPolyField, isTokenized, isUtf8Field, marshalBase64SortValue, marshalSortValue, marshalStringSortValue, multiValuedFieldCache, readableToIndexed, readableToIndexed, restrictProps, setArgs, setIndexAnalyzer, setIsExplicitAnalyzer, setIsExplicitQueryAnalyzer, setQueryAnalyzer, setSimilarity, storedToIndexed, storedToReadable, supportsAnalyzers, toExternal, toInternal, toNativeType, toObject, toObject, toString, treatUnboundedRangeAsExistence, unmarshalBase64SortValue, unmarshalSortValue, unmarshalStringSortValue, useDocValuesAsStored, write, write
-
Field Details
-
subType
-
SUB_FIELD_SUFFIX
- See Also:
-
SUB_FIELD_TYPE
- See Also:
-
suffix
-
dynFieldProps
protected int dynFieldProps -
suffixes
-
subFieldType
-
subSuffix
-
schema
-
-
Constructor Details
-
AbstractSubTypeFieldType
public AbstractSubTypeFieldType()
-
-
Method Details
-
getSubType
-
init
Description copied from class:FieldTypesubclasses should initialize themselves with the args provided and remove valid arguments. leftover arguments will cause an exception. Common boolean properties have already been handled. -
inform
Registers the polyfield dynamic prototype for this field type: : "*___(field type name)"Informs the
IndexSchemaprovided by theschemaparameter of an event (e.g., a newFieldTypewas added, etc.- Specified by:
informin interfaceSchemaAware- Parameters:
schema- TheIndexSchemainstance that inform of the update to.
-
getFieldQuery
public org.apache.lucene.search.Query getFieldQuery(QParser parser, SchemaField field, String externalVal) Throws UnsupportedOperationException()- Overrides:
getFieldQueryin classFieldType- Parameters:
parser- TheQParsercalling the methodfield- TheSchemaFieldof the field to searchexternalVal- The String representation of the value to search- Returns:
- The
Queryinstance. This implementation returns aTermQuerybut overriding queries may not
-
createSuffixCache
protected void createSuffixCache(int size) -
subField
-