org.elasticsearch.index.mapper.internal
Class SourceFieldMapper
java.lang.Object
org.elasticsearch.index.mapper.core.AbstractFieldMapper<byte[]>
org.elasticsearch.index.mapper.internal.SourceFieldMapper
- All Implemented Interfaces:
- ToXContent, FieldMapper<byte[]>, InternalMapper, Mapper, RootMapper
public class SourceFieldMapper
- extends AbstractFieldMapper<byte[]>
- implements InternalMapper, RootMapper
Constructor Summary |
|
SourceFieldMapper()
|
protected |
SourceFieldMapper(java.lang.String name,
boolean enabled,
java.lang.Boolean compress,
long compressThreshold,
java.lang.String[] includes,
java.lang.String[] excludes)
|
Methods inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper |
analyzed, boost, close, customBoost, doXContentBody, fieldDataType, fieldFilter, fieldQuery, fuzzyQuery, fuzzyQuery, index, indexAnalyzer, indexed, name, names, omitNorms, omitTermFreqAndPositions, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, store, stored, termVector, traverse, traverse, useFieldQueryWithQueryString, valueForSearch |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
CONTENT_TYPE
public static final java.lang.String CONTENT_TYPE
- See Also:
- Constant Field Values
SourceFieldMapper
public SourceFieldMapper()
SourceFieldMapper
protected SourceFieldMapper(java.lang.String name,
boolean enabled,
java.lang.Boolean compress,
long compressThreshold,
java.lang.String[] includes,
java.lang.String[] excludes)
enabled
public boolean enabled()
fieldSelector
public ResetFieldSelector fieldSelector()
preParse
public void preParse(ParseContext context)
throws java.io.IOException
- Specified by:
preParse
in interface RootMapper
- Throws:
java.io.IOException
postParse
public void postParse(ParseContext context)
throws java.io.IOException
- Specified by:
postParse
in interface RootMapper
- Throws:
java.io.IOException
parse
public void parse(ParseContext context)
throws java.io.IOException
- Specified by:
parse
in interface Mapper
- Overrides:
parse
in class AbstractFieldMapper<byte[]>
- Throws:
java.io.IOException
validate
public void validate(ParseContext context)
throws MapperParsingException
- Specified by:
validate
in interface RootMapper
- Throws:
MapperParsingException
includeInObject
public boolean includeInObject()
- Description copied from interface:
RootMapper
- Should the mapper be included in the root
ObjectMapper
.
- Specified by:
includeInObject
in interface RootMapper
parseCreateField
protected org.apache.lucene.document.Field parseCreateField(ParseContext context)
throws java.io.IOException
- Specified by:
parseCreateField
in class AbstractFieldMapper<byte[]>
- Throws:
java.io.IOException
value
public byte[] value(org.apache.lucene.document.Document document)
nativeValue
public byte[] nativeValue(org.apache.lucene.document.Fieldable field)
value
public byte[] value(org.apache.lucene.document.Fieldable field)
- Description copied from interface:
FieldMapper
- Returns the actual value of the field.
- Specified by:
value
in interface FieldMapper<byte[]>
valueFromString
public byte[] valueFromString(java.lang.String value)
- Specified by:
valueFromString
in interface FieldMapper<byte[]>
valueAsString
public java.lang.String valueAsString(org.apache.lucene.document.Fieldable field)
- Description copied from interface:
FieldMapper
- Returns the actual value of the field as string.
- Specified by:
valueAsString
in interface FieldMapper<byte[]>
indexedValue
public java.lang.String indexedValue(java.lang.String value)
- Description copied from interface:
FieldMapper
- Returns the indexed value.
- Specified by:
indexedValue
in interface FieldMapper<byte[]>
- Overrides:
indexedValue
in class AbstractFieldMapper<byte[]>
contentType
protected java.lang.String contentType()
- Specified by:
contentType
in class AbstractFieldMapper<byte[]>
toXContent
public XContentBuilder toXContent(XContentBuilder builder,
ToXContent.Params params)
throws java.io.IOException
- Specified by:
toXContent
in interface ToXContent
- Overrides:
toXContent
in class AbstractFieldMapper<byte[]>
- Throws:
java.io.IOException
merge
public void merge(Mapper mergeWith,
MergeContext mergeContext)
throws MergeMappingException
- Specified by:
merge
in interface Mapper
- Overrides:
merge
in class AbstractFieldMapper<byte[]>
- Throws:
MergeMappingException