org.elasticsearch.index.mapper.xcontent
Class BooleanFieldMapper

java.lang.Object
  extended by org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper<java.lang.Boolean>
      extended by org.elasticsearch.index.mapper.xcontent.BooleanFieldMapper
All Implemented Interfaces:
ToXContent, FieldMapper<java.lang.Boolean>, XContentMapper

public class BooleanFieldMapper
extends AbstractFieldMapper<java.lang.Boolean>


Nested Class Summary
static class BooleanFieldMapper.Builder
           
static class BooleanFieldMapper.Defaults
           
static class BooleanFieldMapper.TypeParser
           
 
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.xcontent.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.xcontent.XContentMapper
XContentMapper.BuilderContext
 
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.MapParams, ToXContent.Params
 
Field Summary
static java.lang.String CONTENT_TYPE
           
 
Fields inherited from class org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper
boost, index, indexAnalyzer, names, omitNorms, omitTermFreqAndPositions, searchAnalyzer, store, termVector
 
Fields inherited from interface org.elasticsearch.index.mapper.xcontent.XContentMapper
EMPTY_ARRAY
 
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
 
Constructor Summary
protected BooleanFieldMapper(FieldMapper.Names names, org.apache.lucene.document.Field.Index index, org.apache.lucene.document.Field.Store store, org.apache.lucene.document.Field.TermVector termVector, float boost, boolean omitNorms, boolean omitTermFreqAndPositions, java.lang.Boolean nullValue)
           
 
Method Summary
protected  java.lang.String contentType()
           
protected  void doXContentBody(XContentBuilder builder)
           
 java.lang.String indexedValue(java.lang.String value)
          Returns the indexed value.
protected  org.apache.lucene.document.Field parseCreateField(ParseContext context)
           
 boolean useFieldQueryWithQueryString()
          Should the field query FieldMapper.fieldQuery(String) be used when detecting this field in query string.
 java.lang.Boolean 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.
 java.lang.Boolean valueFromString(java.lang.String value)
           
 
Methods inherited from class org.elasticsearch.index.mapper.xcontent.AbstractFieldMapper
analyzed, boost, fieldDataType, fieldFilter, fieldQuery, index, indexAnalyzer, indexed, merge, name, names, omitNorms, omitTermFreqAndPositions, parse, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, store, stored, termVector, toXContent, traverse, valueForSearch
 
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 java.lang.String CONTENT_TYPE
See Also:
Constant Field Values
Constructor Detail

BooleanFieldMapper

protected BooleanFieldMapper(FieldMapper.Names names,
                             org.apache.lucene.document.Field.Index index,
                             org.apache.lucene.document.Field.Store store,
                             org.apache.lucene.document.Field.TermVector termVector,
                             float boost,
                             boolean omitNorms,
                             boolean omitTermFreqAndPositions,
                             java.lang.Boolean nullValue)
Method Detail

useFieldQueryWithQueryString

public boolean useFieldQueryWithQueryString()
Description copied from interface: FieldMapper
Should the field query FieldMapper.fieldQuery(String) be used when detecting this field in query string.

Specified by:
useFieldQueryWithQueryString in interface FieldMapper<java.lang.Boolean>
Overrides:
useFieldQueryWithQueryString in class AbstractFieldMapper<java.lang.Boolean>

value

public java.lang.Boolean value(org.apache.lucene.document.Fieldable field)
Description copied from interface: FieldMapper
Returns the actual value of the field.


valueFromString

public java.lang.Boolean valueFromString(java.lang.String value)

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.


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<java.lang.Boolean>
Overrides:
indexedValue in class AbstractFieldMapper<java.lang.Boolean>

parseCreateField

protected org.apache.lucene.document.Field parseCreateField(ParseContext context)
                                                     throws java.io.IOException
Specified by:
parseCreateField in class AbstractFieldMapper<java.lang.Boolean>
Throws:
java.io.IOException

contentType

protected java.lang.String contentType()
Specified by:
contentType in class AbstractFieldMapper<java.lang.Boolean>

doXContentBody

protected void doXContentBody(XContentBuilder builder)
                       throws java.io.IOException
Overrides:
doXContentBody in class AbstractFieldMapper<java.lang.Boolean>
Throws:
java.io.IOException