org.elasticsearch.index.mapper.core
Class BooleanFieldMapper

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

public class BooleanFieldMapper
extends AbstractFieldMapper<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.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 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, org.apache.lucene.index.FieldInfo.IndexOptions indexOptions, Boolean nullValue)
           
 
Method Summary
protected  String contentType()
           
protected  void doXContentBody(XContentBuilder builder)
           
 String indexedValue(String value)
          Returns the indexed value.
 org.apache.lucene.search.Filter nullValueFilter()
          Null value filter, returns null if there is no null value associated with the field.
protected  org.apache.lucene.document.Field parseCreateField(ParseContext context)
           
 boolean useFieldQueryWithQueryString()
          Should the field query FieldMapper.fieldQuery(String, org.elasticsearch.index.query.QueryParseContext) be used when detecting this field in query string.
 Boolean 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.
 Boolean valueFromString(String value)
           
 
Methods inherited from class org.elasticsearch.index.mapper.core.AbstractFieldMapper
analyzed, boost, close, customBoost, fieldDataType, fieldFilter, fieldQuery, fuzzyQuery, fuzzyQuery, index, indexAnalyzer, indexed, indexOptions, indexOptionToString, merge, name, names, omitNorms, parse, prefixFilter, prefixQuery, queryStringTermQuery, rangeFilter, rangeQuery, searchAnalyzer, searchQuoteAnalyzer, store, stored, termVector, toXContent, traverse, 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 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,
                             org.apache.lucene.index.FieldInfo.IndexOptions indexOptions,
                             Boolean nullValue)
Method Detail

useFieldQueryWithQueryString

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

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

value

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


valueFromString

public Boolean 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<Boolean>
Overrides:
indexedValue in class AbstractFieldMapper<Boolean>

nullValueFilter

public org.apache.lucene.search.Filter nullValueFilter()
Description copied from interface: FieldMapper
Null value filter, returns null if there is no null value associated with the field.

Specified by:
nullValueFilter in interface FieldMapper<Boolean>
Overrides:
nullValueFilter in class AbstractFieldMapper<Boolean>

parseCreateField

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

contentType

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

doXContentBody

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


Copyright © 2009-2012. All Rights Reserved.