org.elasticsearch.index.mapper.xcontent
Class SourceFieldMapper
java.lang.Object
org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper<byte[]>
org.elasticsearch.index.mapper.xcontent.SourceFieldMapper
- All Implemented Interfaces:
- ToXContent, FieldMapper<byte[]>, InternalMapper, SourceFieldMapper, XContentMapper
public class SourceFieldMapper
- extends AbstractFieldMapper<byte[]>
- implements SourceFieldMapper
Method Summary |
boolean |
compressed()
Is the source field compressed or not? |
protected java.lang.String |
contentType()
|
boolean |
enabled()
Returns true if the source field mapper is enabled or not. |
org.apache.lucene.document.FieldSelector |
fieldSelector()
A field selector that loads just the source field. |
java.lang.String |
indexedValue(java.lang.String value)
Returns the indexed value. |
void |
merge(XContentMapper mergeWith,
MergeContext mergeContext)
|
byte[] |
nativeValue(org.apache.lucene.document.Fieldable field)
Returns the native source value, if its compressed, then the compressed value is returned. |
protected org.apache.lucene.document.Field |
parseCreateField(ParseContext context)
|
void |
toXContent(XContentBuilder builder,
ToXContent.Params params)
|
byte[] |
value(org.apache.lucene.document.Document document)
|
byte[] |
value(org.apache.lucene.document.Fieldable field)
Returns the actual value of the field. |
java.lang.String |
valueAsString(org.apache.lucene.document.Fieldable field)
Returns the actual value of the field as string. |
byte[] |
valueFromString(java.lang.String value)
|
Methods inherited from class org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper |
analyzed, boost, doXContentBody, fieldDataType, fieldFilter, fieldQuery, index, indexAnalyzer, indexed, name, names, omitNorms, omitTermFreqAndPositions, parse, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, store, stored, termVector, traverse, useFieldQueryWithQueryString, valueForSearch |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.elasticsearch.index.mapper.FieldMapper |
analyzed, boost, fieldDataType, fieldFilter, fieldQuery, index, indexAnalyzer, indexed, names, omitNorms, omitTermFreqAndPositions, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, store, stored, termVector, useFieldQueryWithQueryString, valueForSearch |
CONTENT_TYPE
public static final java.lang.String CONTENT_TYPE
- See Also:
- Constant Field Values
SourceFieldMapper
protected SourceFieldMapper()
SourceFieldMapper
protected SourceFieldMapper(java.lang.String name,
boolean enabled,
java.lang.Boolean compress,
long compressThreshold)
enabled
public boolean enabled()
- Description copied from interface:
SourceFieldMapper
- Returns true if the source field mapper is enabled or not.
- Specified by:
enabled
in interface SourceFieldMapper
compressed
public boolean compressed()
- Description copied from interface:
SourceFieldMapper
- Is the source field compressed or not?
- Specified by:
compressed
in interface SourceFieldMapper
fieldSelector
public org.apache.lucene.document.FieldSelector fieldSelector()
- Description copied from interface:
SourceFieldMapper
- A field selector that loads just the source field.
- Specified by:
fieldSelector
in interface SourceFieldMapper
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)
- Specified by:
value
in interface SourceFieldMapper
nativeValue
public byte[] nativeValue(org.apache.lucene.document.Fieldable field)
- Description copied from interface:
SourceFieldMapper
- Returns the native source value, if its compressed, then the compressed value is returned.
- Specified by:
nativeValue
in interface SourceFieldMapper
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 void 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(XContentMapper mergeWith,
MergeContext mergeContext)
throws MergeMappingException
- Specified by:
merge
in interface XContentMapper
- Overrides:
merge
in class AbstractFieldMapper<byte[]>
- Throws:
MergeMappingException