public abstract class AbstractEnumField extends PrimitiveFieldType
Modifier and Type | Class and Description |
---|---|
static class |
AbstractEnumField.EnumMapping
Models all the info contained in an enums config XML file
|
FieldType.DefaultAnalyzer, FieldType.MultiValueSelector
Modifier and Type | Field and Description |
---|---|
protected AbstractEnumField.EnumMapping |
enumMapping |
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, typeName
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, USE_DOCVALUES_AS_STORED
Constructor and Description |
---|
AbstractEnumField() |
Modifier and Type | Method and Description |
---|---|
AbstractEnumField.EnumMapping |
getEnumMapping() |
NumberType |
getNumberType()
Return the numeric type of this field, or null if this field is not a
numeric field.
|
SortField |
getSortField(SchemaField field,
boolean top)
Returns the SortField instance that should be used to sort fields
of this type.
|
ValueSource |
getValueSource(SchemaField field,
QParser qparser)
called to get the default value source (normally, from the
Lucene FieldCache.)
|
protected void |
init(IndexSchema schema,
Map<String,String> args)
subclasses should initialize themselves with the args provided
and remove valid arguments.
|
boolean |
isTokenized()
Returns true if fields of this type should be tokenized
|
String |
readableToIndexed(String val)
Given the readable value, return the term value that will match it.
|
String |
toExternal(IndexableField f)
Convert the stored-field format to an external (string, human readable)
value
|
String |
toInternal(String val)
Convert an external value (from XML update command or from query string)
into the internal format for both storing and indexing (which can be modified by any analyzers).
|
EnumFieldValue |
toObject(IndexableField f)
Convert the stored-field format to an external object.
|
void |
write(TextResponseWriter writer,
String name,
IndexableField f)
calls back to TextResponseWriter to write the field value
|
checkSupportsDocValues, getDefaultMultiValueSelectorForSort
checkSchemaField, createField, createField, createFields, getAnalyzerProperties, getClassArg, getDocValuesFormat, getFieldQuery, getIndexAnalyzer, getNamedPropertyValues, getNonFieldPropertyArgs, getNumericSort, getPostingsFormat, getPrefixQuery, getQueryAnalyzer, getRangeQuery, getRewriteMethod, getSetQuery, getSimilarity, getSimilarityFactory, getSingleValueSource, getSortedNumericSortField, getSortedSetSortField, getSortField, getStringSort, getTypeName, getUninversionType, hasProperty, indexedToReadable, indexedToReadable, isExplicitAnalyzer, isExplicitQueryAnalyzer, isMultiValued, isPointField, isPolyField, marshalBase64SortValue, marshalSortValue, marshalStringSortValue, multiValuedFieldCache, readableToIndexed, restrictProps, setArgs, setIndexAnalyzer, setIsExplicitAnalyzer, setIsExplicitQueryAnalyzer, setQueryAnalyzer, setSimilarity, storedToIndexed, storedToReadable, supportsAnalyzers, toNativeType, toObject, toString, unmarshalBase64SortValue, unmarshalSortValue, unmarshalStringSortValue, useDocValuesAsStored
protected AbstractEnumField.EnumMapping enumMapping
protected void init(IndexSchema schema, Map<String,String> args)
FieldType
init
in class PrimitiveFieldType
public AbstractEnumField.EnumMapping getEnumMapping()
public EnumFieldValue toObject(IndexableField f)
FieldType
toObject
in class FieldType
FieldType.toInternal(java.lang.String)
public SortField getSortField(SchemaField field, boolean top)
FieldType
public ValueSource getValueSource(SchemaField field, QParser qparser)
FieldType
getValueSource
in class FieldType
public void write(TextResponseWriter writer, String name, IndexableField f) throws IOException
FieldType
write
in class FieldType
IOException
public boolean isTokenized()
FieldType
isTokenized
in class FieldType
public NumberType getNumberType()
FieldType
getNumberType
in class FieldType
public String readableToIndexed(String val)
FieldType
readableToIndexed
in class FieldType
public String toInternal(String val)
FieldType
toInternal
in class FieldType
FieldType.toExternal(org.apache.lucene.index.IndexableField)
public String toExternal(IndexableField f)
FieldType
toExternal
in class FieldType
FieldType.toInternal(java.lang.String)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.