public abstract class MappedFieldType
extends org.apache.lucene.document.FieldType
Modifier and Type | Class and Description |
---|---|
static class |
MappedFieldType.Loading |
static class |
MappedFieldType.Names |
Modifier | Constructor and Description |
---|---|
|
MappedFieldType() |
protected |
MappedFieldType(MappedFieldType ref) |
Modifier and Type | Method and Description |
---|---|
float |
boost() |
void |
checkCompatibility(MappedFieldType other,
List<String> conflicts,
boolean strict)
Checks for any conflicts between this field type and other.
|
abstract MappedFieldType |
clone() |
protected org.apache.lucene.index.Term |
createTerm(Object value)
Creates a term associated with the field of this mapper for the given
value.
|
boolean |
equals(Object o) |
FieldDataType |
fieldDataType() |
org.apache.lucene.search.Query |
fuzzyQuery(Object value,
Fuzziness fuzziness,
int prefixLength,
int maxExpansions,
boolean transpositions) |
boolean |
hasDocValues() |
int |
hashCode() |
NamedAnalyzer |
indexAnalyzer() |
org.apache.lucene.util.BytesRef |
indexedValueForSearch(Object value)
Returns the indexed value used to construct search "values".
|
boolean |
isNumeric() |
boolean |
isSortable() |
MappedFieldType.Names |
names() |
MappedFieldType.Loading |
normsLoading() |
Object |
nullValue()
Returns the value that should be added when JSON null is found, or null if no value should be added
|
String |
nullValueAsString()
Returns the null value stringified, so it can be used for e.g.
|
org.apache.lucene.search.Query |
nullValueQuery() |
org.apache.lucene.search.Query |
prefixQuery(String value,
org.apache.lucene.search.MultiTermQuery.RewriteMethod method,
QueryParseContext context) |
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.Query |
rangeQuery(Object lowerTerm,
Object upperTerm,
boolean includeLower,
boolean includeUpper) |
org.apache.lucene.search.Query |
regexpQuery(String value,
int flags,
int maxDeterminizedStates,
org.apache.lucene.search.MultiTermQuery.RewriteMethod method,
QueryParseContext context) |
NamedAnalyzer |
searchAnalyzer() |
NamedAnalyzer |
searchQuoteAnalyzer() |
void |
setBoost(float boost) |
void |
setFieldDataType(FieldDataType fieldDataType) |
void |
setHasDocValues(boolean hasDocValues) |
void |
setIndexAnalyzer(NamedAnalyzer analyzer) |
void |
setNames(MappedFieldType.Names names) |
void |
setNormsLoading(MappedFieldType.Loading normsLoading) |
void |
setNullValue(Object nullValue)
Sets the null value and initializes the string version
|
void |
setSearchAnalyzer(NamedAnalyzer analyzer) |
void |
setSearchQuoteAnalyzer(NamedAnalyzer analyzer) |
void |
setSimilarity(SimilarityProvider similarity) |
SimilarityProvider |
similarity() |
FieldStats |
stats(org.apache.lucene.index.Terms terms,
int maxDoc) |
org.apache.lucene.search.Query |
termQuery(Object value,
QueryParseContext context) |
org.apache.lucene.search.Query |
termsQuery(List values,
QueryParseContext context) |
abstract String |
typeName()
Returns the name of this type, as would be specified in mapping properties
|
boolean |
useTermQueryWithQueryString()
Should the field query
termQuery(Object, org.elasticsearch.index.query.QueryParseContext) be used when detecting this
field in query string. |
Object |
value(Object value)
Returns the actual value of the field.
|
Object |
valueForSearch(Object value)
Returns the value that will be used as a result for search.
|
checkIfFrozen, docValuesType, freeze, indexOptions, numericPrecisionStep, numericType, omitNorms, setDocValuesType, setIndexOptions, setNumericPrecisionStep, setNumericType, setOmitNorms, setStored, setStoreTermVectorOffsets, setStoreTermVectorPayloads, setStoreTermVectorPositions, setStoreTermVectors, setTokenized, stored, storeTermVectorOffsets, storeTermVectorPayloads, storeTermVectorPositions, storeTermVectors, tokenized, toString
protected MappedFieldType(MappedFieldType ref)
public MappedFieldType()
public abstract MappedFieldType clone()
public boolean equals(Object o)
equals
in class org.apache.lucene.document.FieldType
public int hashCode()
hashCode
in class org.apache.lucene.document.FieldType
public abstract String typeName()
public void checkCompatibility(MappedFieldType other, List<String> conflicts, boolean strict)
public boolean isNumeric()
public boolean isSortable()
public MappedFieldType.Names names()
public void setNames(MappedFieldType.Names names)
public float boost()
public void setBoost(float boost)
public FieldDataType fieldDataType()
public void setFieldDataType(FieldDataType fieldDataType)
public boolean hasDocValues()
public void setHasDocValues(boolean hasDocValues)
public MappedFieldType.Loading normsLoading()
public void setNormsLoading(MappedFieldType.Loading normsLoading)
public NamedAnalyzer indexAnalyzer()
public void setIndexAnalyzer(NamedAnalyzer analyzer)
public NamedAnalyzer searchAnalyzer()
public void setSearchAnalyzer(NamedAnalyzer analyzer)
public NamedAnalyzer searchQuoteAnalyzer()
public void setSearchQuoteAnalyzer(NamedAnalyzer analyzer)
public SimilarityProvider similarity()
public void setSimilarity(SimilarityProvider similarity)
public Object nullValue()
public String nullValueAsString()
public void setNullValue(Object nullValue)
public Object valueForSearch(Object value)
public org.apache.lucene.util.BytesRef indexedValueForSearch(Object value)
public boolean useTermQueryWithQueryString()
termQuery(Object, org.elasticsearch.index.query.QueryParseContext)
be used when detecting this
field in query string.protected org.apache.lucene.index.Term createTerm(Object value)
public org.apache.lucene.search.Query termQuery(Object value, @Nullable QueryParseContext context)
public org.apache.lucene.search.Query termsQuery(List values, @Nullable QueryParseContext context)
public org.apache.lucene.search.Query rangeQuery(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper)
public org.apache.lucene.search.Query fuzzyQuery(Object value, Fuzziness fuzziness, int prefixLength, int maxExpansions, boolean transpositions)
public org.apache.lucene.search.Query prefixQuery(String value, @Nullable org.apache.lucene.search.MultiTermQuery.RewriteMethod method, @Nullable QueryParseContext context)
public org.apache.lucene.search.Query regexpQuery(String value, int flags, int maxDeterminizedStates, @Nullable org.apache.lucene.search.MultiTermQuery.RewriteMethod method, @Nullable QueryParseContext context)
public org.apache.lucene.search.Query nullValueQuery()
public FieldStats stats(org.apache.lucene.index.Terms terms, int maxDoc) throws IOException
FieldStats
instance that maps to the type of this field based on the provided Terms
instance.IOException
@Nullable public org.apache.lucene.search.Query queryStringTermQuery(org.apache.lucene.index.Term term)
Copyright © 2009–2016. All rights reserved.