Package org.elasticsearch.index.mapper
Class CustomDocValuesField
- java.lang.Object
-
- org.elasticsearch.index.mapper.CustomDocValuesField
-
- All Implemented Interfaces:
IndexableField
- Direct Known Subclasses:
BinaryFieldMapper.CustomBinaryDocValuesField
public abstract class CustomDocValuesField extends Object implements IndexableField
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCustomDocValuesField(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IndexableFieldTypefieldType()IndexableFieldTypedescribing the properties of this field.Stringname()Field nameNumbernumericValue()Non-null if this field has a numeric valueReaderreaderValue()Non-null if this field has a Reader valueStringstringValue()Non-null if this field has a string valueTokenStreamtokenStream(Analyzer analyzer, TokenStream reuse)Creates the TokenStream used for indexing this field.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.index.IndexableField
binaryValue, getCharSequenceValue
-
-
-
-
Field Detail
-
TYPE
public static final FieldType TYPE
-
-
Constructor Detail
-
CustomDocValuesField
protected CustomDocValuesField(String name)
-
-
Method Detail
-
name
public String name()
Description copied from interface:IndexableFieldField name- Specified by:
namein interfaceIndexableField
-
fieldType
public IndexableFieldType fieldType()
Description copied from interface:IndexableFieldIndexableFieldTypedescribing the properties of this field.- Specified by:
fieldTypein interfaceIndexableField
-
stringValue
public String stringValue()
Description copied from interface:IndexableFieldNon-null if this field has a string value- Specified by:
stringValuein interfaceIndexableField
-
readerValue
public Reader readerValue()
Description copied from interface:IndexableFieldNon-null if this field has a Reader value- Specified by:
readerValuein interfaceIndexableField
-
numericValue
public Number numericValue()
Description copied from interface:IndexableFieldNon-null if this field has a numeric value- Specified by:
numericValuein interfaceIndexableField
-
tokenStream
public TokenStream tokenStream(Analyzer analyzer, TokenStream reuse)
Description copied from interface:IndexableFieldCreates the TokenStream used for indexing this field. If appropriate, implementations should use the given Analyzer to create the TokenStreams.- Specified by:
tokenStreamin interfaceIndexableField- Parameters:
analyzer- Analyzer that should be used to create the TokenStreams fromreuse- TokenStream for a previous instance of this field name. This allows custom field types (like StringField and NumericField) that do not use the analyzer to still have good performance. Note: the passed-in type may be inappropriate, for example if you mix up different types of Fields for the same field name. So it's the responsibility of the implementation to check.- Returns:
- TokenStream value for indexing the document. Should always return a non-null value if the field is to be indexed
-
-