org.elasticsearch.index.mapper.core
Class BinaryFieldMapper

java.lang.Object
  extended by org.elasticsearch.index.mapper.core.AbstractFieldMapper<byte[]>
      extended by org.elasticsearch.index.mapper.core.BinaryFieldMapper
All Implemented Interfaces:
ToXContent, FieldMapper<byte[]>, Mapper

public class BinaryFieldMapper
extends AbstractFieldMapper<byte[]>


Nested Class Summary
static class BinaryFieldMapper.Builder
           
static class BinaryFieldMapper.Defaults
           
static class BinaryFieldMapper.TypeParser
           
 
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper
AbstractFieldMapper.OpenBuilder<T extends AbstractFieldMapper.Builder,Y extends AbstractFieldMapper>
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.FieldMapper
FieldMapper.Names
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.mapper.Mapper
Mapper.BuilderContext
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Field Summary
static String CONTENT_TYPE
           
 
Fields inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper
boost, index, indexAnalyzer, indexOptions, names, omitNorms, searchAnalyzer, store, termVector
 
Fields inherited from interface org.elasticsearch.index.mapper.Mapper
EMPTY_ARRAY
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
protected BinaryFieldMapper(FieldMapper.Names names, org.apache.lucene.document.Field.Store store, Boolean compress, long compressThreshold)
           
 
Method Summary
protected  String contentType()
           
 String indexedValue(String value)
          Returns the indexed value.
 void merge(Mapper mergeWith, MergeContext mergeContext)
           
protected  org.apache.lucene.document.Field parseCreateField(ParseContext context)
           
 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params)
           
 byte[] value(org.apache.lucene.document.Fieldable field)
          Returns the actual value of the field.
 String valueAsString(org.apache.lucene.document.Fieldable field)
          Returns the actual value of the field as string.
 Object valueForSearch(org.apache.lucene.document.Fieldable field)
          Returns the value that will be used as a result for search.
 byte[] valueFromString(String value)
           
 
Methods inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper
analyzed, boost, close, customBoost, doXContentBody, fieldDataType, fieldFilter, fieldQuery, fuzzyQuery, fuzzyQuery, index, indexAnalyzer, indexed, indexOptions, indexOptionToString, name, names, nullValueFilter, omitNorms, parse, prefixFilter, prefixQuery, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, searchQuoteAnalyzer, store, stored, termVector, traverse, traverse, useFieldQueryWithQueryString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_TYPE

public static final String CONTENT_TYPE
See Also:
Constant Field Values
Constructor Detail

BinaryFieldMapper

protected BinaryFieldMapper(FieldMapper.Names names,
                            org.apache.lucene.document.Field.Store store,
                            Boolean compress,
                            long compressThreshold)
Method Detail

valueForSearch

public Object valueForSearch(org.apache.lucene.document.Fieldable field)
Description copied from interface: FieldMapper
Returns the value that will be used as a result for search. Can be only of specific types... .

Specified by:
valueForSearch in interface FieldMapper<byte[]>
Overrides:
valueForSearch in class AbstractFieldMapper<byte[]>

value

public byte[] value(org.apache.lucene.document.Fieldable field)
Description copied from interface: FieldMapper
Returns the actual value of the field.


valueFromString

public byte[] valueFromString(String value)

valueAsString

public String valueAsString(org.apache.lucene.document.Fieldable field)
Description copied from interface: FieldMapper
Returns the actual value of the field as string.


indexedValue

public String indexedValue(String value)
Description copied from interface: FieldMapper
Returns the indexed value.

Specified by:
indexedValue in interface FieldMapper<byte[]>
Overrides:
indexedValue in class AbstractFieldMapper<byte[]>

parseCreateField

protected org.apache.lucene.document.Field parseCreateField(ParseContext context)
                                                     throws IOException
Specified by:
parseCreateField in class AbstractFieldMapper<byte[]>
Throws:
IOException

contentType

protected String contentType()
Specified by:
contentType in class AbstractFieldMapper<byte[]>

toXContent

public XContentBuilder toXContent(XContentBuilder builder,
                                  ToXContent.Params params)
                           throws IOException
Specified by:
toXContent in interface ToXContent
Overrides:
toXContent in class AbstractFieldMapper<byte[]>
Throws:
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


Copyright © 2009-2012. All Rights Reserved.