org.elasticsearch.index.mapper
Interface FieldMapper<T>

All Known Subinterfaces:
AllFieldMapper, BoostFieldMapper, IdFieldMapper, SourceFieldMapper, TypeFieldMapper, UidFieldMapper
All Known Implementing Classes:
XContentAllFieldMapper, XContentBinaryFieldMapper, XContentBooleanFieldMapper, XContentBoostFieldMapper, XContentDateFieldMapper, XContentDoubleFieldMapper, XContentFieldMapper, XContentFloatFieldMapper, XContentIdFieldMapper, XContentIntegerFieldMapper, XContentLongFieldMapper, XContentNumberFieldMapper, XContentShortFieldMapper, XContentSourceFieldMapper, XContentStringFieldMapper, XContentTypeFieldMapper, XContentUidFieldMapper

@ThreadSafe
public interface FieldMapper<T>


Nested Class Summary
static class FieldMapper.Names
           
 
Method Summary
 boolean analyzed()
           
 float boost()
           
 org.apache.lucene.search.Filter fieldFilter(java.lang.String value)
           
 org.apache.lucene.search.Query fieldQuery(java.lang.String value)
          A field query for the specified value.
 org.apache.lucene.document.Field.Index index()
           
 org.apache.lucene.analysis.Analyzer indexAnalyzer()
          The analyzer that will be used to index the field.
 boolean indexed()
           
 java.lang.String indexedValue(java.lang.String value)
          Returns the indexed value.
 java.lang.String indexedValue(T value)
          Returns the indexed value.
 FieldMapper.Names names()
           
 boolean omitNorms()
           
 boolean omitTermFreqAndPositions()
           
 org.apache.lucene.search.Query queryStringTermQuery(org.apache.lucene.index.Term term)
          A term query to use when parsing a query string.
 org.apache.lucene.search.Filter rangeFilter(java.lang.String lowerTerm, java.lang.String upperTerm, boolean includeLower, boolean includeUpper)
          Constructs a range query filter based on the mapper.
 org.apache.lucene.search.Query rangeQuery(java.lang.String lowerTerm, java.lang.String upperTerm, boolean includeLower, boolean includeUpper)
          Constructs a range query based on the mapper.
 org.apache.lucene.analysis.Analyzer searchAnalyzer()
          The analyzer that will be used to search the field.
 boolean shouldBreakTermEnumeration(java.lang.Object text)
          Return true if this term value indicates breaking out of term enumeration on this field.
 int sortType()
           
 org.apache.lucene.document.Field.Store store()
           
 boolean stored()
           
 org.apache.lucene.document.Field.TermVector termVector()
           
 boolean useFieldQueryWithQueryString()
          Should the field query fieldQuery(String) be used when detecting this field in query string.
 T 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.Object valueForSearch(org.apache.lucene.document.Fieldable field)
          Returns the value that will be used as a result for search.
 java.lang.Object valueForSearch(java.lang.Object value)
          Returns the value that will be returned to the user (similar to valueForSearch(org.apache.lucene.document.Fieldable)).
 java.lang.Object valueFromString(java.lang.String text)
          Parses a string that represents the field into its value.
 java.lang.Object valueFromTerm(java.lang.String term)
          Parses the string back into the type of the field (should be comparable!) in a similar manner valueForSearch(org.apache.lucene.document.Fieldable) does with fields.
 

Method Detail

names

FieldMapper.Names names()

index

org.apache.lucene.document.Field.Index index()

indexed

boolean indexed()

analyzed

boolean analyzed()

store

org.apache.lucene.document.Field.Store store()

stored

boolean stored()

termVector

org.apache.lucene.document.Field.TermVector termVector()

boost

float boost()

omitNorms

boolean omitNorms()

omitTermFreqAndPositions

boolean omitTermFreqAndPositions()

indexAnalyzer

org.apache.lucene.analysis.Analyzer indexAnalyzer()
The analyzer that will be used to index the field.


searchAnalyzer

org.apache.lucene.analysis.Analyzer searchAnalyzer()
The analyzer that will be used to search the field.


valueForSearch

java.lang.Object valueForSearch(org.apache.lucene.document.Fieldable field)
Returns the value that will be used as a result for search. Can be only of specific types... .


valueForSearch

java.lang.Object valueForSearch(java.lang.Object value)
Returns the value that will be returned to the user (similar to valueForSearch(org.apache.lucene.document.Fieldable)).


value

T value(org.apache.lucene.document.Fieldable field)
Returns the actual value of the field.


valueAsString

java.lang.String valueAsString(org.apache.lucene.document.Fieldable field)
Returns the actual value of the field as string.


valueFromTerm

java.lang.Object valueFromTerm(java.lang.String term)
Parses the string back into the type of the field (should be comparable!) in a similar manner valueForSearch(org.apache.lucene.document.Fieldable) does with fields.


valueFromString

java.lang.Object valueFromString(java.lang.String text)
Parses a string that represents the field into its value. For example, with numbers, it parses "1" to 1.


shouldBreakTermEnumeration

boolean shouldBreakTermEnumeration(java.lang.Object text)
Return true if this term value indicates breaking out of term enumeration on this field. The term text passed is the one returned from valueFromTerm(String).


indexedValue

java.lang.String indexedValue(java.lang.String value)
Returns the indexed value.


indexedValue

java.lang.String indexedValue(T value)
Returns the indexed value.


useFieldQueryWithQueryString

boolean useFieldQueryWithQueryString()
Should the field query fieldQuery(String) be used when detecting this field in query string.


fieldQuery

org.apache.lucene.search.Query fieldQuery(java.lang.String value)
A field query for the specified value.


queryStringTermQuery

org.apache.lucene.search.Query queryStringTermQuery(org.apache.lucene.index.Term term)
A term query to use when parsing a query string. Can return null.


fieldFilter

org.apache.lucene.search.Filter fieldFilter(java.lang.String value)

rangeQuery

org.apache.lucene.search.Query rangeQuery(java.lang.String lowerTerm,
                                          java.lang.String upperTerm,
                                          boolean includeLower,
                                          boolean includeUpper)
Constructs a range query based on the mapper.


rangeFilter

org.apache.lucene.search.Filter rangeFilter(java.lang.String lowerTerm,
                                            java.lang.String upperTerm,
                                            boolean includeLower,
                                            boolean includeUpper)
Constructs a range query filter based on the mapper.


sortType

int sortType()