public abstract class AbstractSubTypeFieldType extends FieldType implements SchemaAware
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.FieldType.DefaultAnalyzer
Modifier and Type | Field and Description |
---|---|
protected int |
dynFieldProps |
protected IndexSchema |
schema |
static String |
SUB_FIELD_SUFFIX |
static String |
SUB_FIELD_TYPE |
protected String |
subFieldType |
protected String |
subSuffix |
protected FieldType |
subType |
protected String |
suffix |
protected String[] |
suffixes |
ANALYZER, args, CHAR_FILTER, CHAR_FILTERS, CLASS_NAME, docValuesFormat, falseProperties, FILTER, FILTERS, INDEX, INDEX_ANALYZER, log, MULTI_TERM, MULTI_TERM_ANALYZER, POLY_FIELD_SEPARATOR, postingsFormat, properties, QUERY, QUERY_ANALYZER, similarity, SIMILARITY, similarityFactory, TOKENIZER, trueProperties, TYPE, TYPE_NAME, typeName
BINARY, DOC_VALUES, INDEXED, MULTIVALUED, OMIT_NORMS, OMIT_POSITIONS, OMIT_TF_POSITIONS, REQUIRED, SORT_MISSING_FIRST, SORT_MISSING_LAST, STORE_OFFSETS, STORE_TERMOFFSETS, STORE_TERMPOSITIONS, STORE_TERMVECTORS, STORED, TOKENIZED
Constructor and Description |
---|
AbstractSubTypeFieldType() |
Modifier and Type | Method and Description |
---|---|
protected void |
createSuffixCache(int size) |
Query |
getFieldQuery(QParser parser,
SchemaField field,
String externalVal)
Throws UnsupportedOperationException()
|
FieldType |
getSubType() |
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. |
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,
IndexSchema schema) |
checkSchemaField, createField, createField, createFields, getAnalyzer, getAnalyzerProperties, getClassArg, getDocValuesFormat, getIndexAnalyzer, getIndexOptions, getNamedPropertyValues, getNonFieldPropertyArgs, getNumericType, getPostingsFormat, getPrefixQuery, getQueryAnalyzer, getRangeQuery, getRewriteMethod, getSimilarity, getSimilarityFactory, getSortField, getStringSort, getTypeName, getValueSource, hasProperty, indexedToReadable, indexedToReadable, isExplicitAnalyzer, isExplicitQueryAnalyzer, isMultiValued, isPolyField, isTokenized, marshalBase64SortValue, marshalSortValue, marshalStringSortValue, multiValuedFieldCache, readableToIndexed, readableToIndexed, restrictProps, setAnalyzer, setArgs, setIndexAnalyzer, setIsExplicitAnalyzer, setIsExplicitQueryAnalyzer, setQueryAnalyzer, setSimilarity, storedToIndexed, storedToReadable, supportsAnalyzers, toExternal, toInternal, toObject, toObject, toString, unmarshalBase64SortValue, unmarshalSortValue, unmarshalStringSortValue, write
protected FieldType subType
public static final String SUB_FIELD_SUFFIX
public static final String SUB_FIELD_TYPE
protected String suffix
protected int dynFieldProps
protected String[] suffixes
protected String subFieldType
protected String subSuffix
protected IndexSchema schema
public FieldType getSubType()
protected void init(IndexSchema schema, Map<String,String> args)
FieldType
public void inform(IndexSchema schema)
IndexSchema
provided by the schema
parameter of an event (e.g., a new FieldType
was added, etc.inform
in interface SchemaAware
schema
- The IndexSchema
instance that inform of the update to.public Query getFieldQuery(QParser parser, SchemaField field, String externalVal)
getFieldQuery
in class FieldType
parser
- The QParser
calling the methodfield
- The SchemaField
of the field to searchexternalVal
- The String representation of the value to searchQuery
instance. This implementation returns a TermQuery
but overriding queries may notprotected void createSuffixCache(int size)
protected SchemaField subField(SchemaField base, int i, IndexSchema schema)
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.