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 FieldType |
subType |
protected String |
suffix |
protected String[] |
suffixes |
analyzer, args, falseProperties, log, POLY_FIELD_SEPARATOR, queryAnalyzer, trueProperties, typeNameBINARY, 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 and Description |
|---|
AbstractSubTypeFieldType() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createSuffixCache(int size) |
org.apache.lucene.search.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) |
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, writeprotected 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 IndexSchema schema
public FieldType getSubType()
protected void init(IndexSchema schema, Map<String,String> args)
FieldTypepublic void inform(IndexSchema schema)
SchemaAwareIndexSchema provided by the schema
parameter of an event (e.g., a new FieldType was added, etc.inform in interface SchemaAwareschema - The IndexSchema instance that inform of the update to.public org.apache.lucene.search.Query getFieldQuery(QParser parser, SchemaField field, String externalVal)
getFieldQuery in class FieldTypeparser - 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)
Copyright © 2006–2014 The Apache Software Foundation. All rights reserved.