public abstract class StringFieldType extends MappedFieldType
MappedFieldType
implementations that use the same
representation for internal index terms as the external representation so
that partial matching queries such as prefix, wildcard and fuzzy queries
can be implemented.MappedFieldType.Relation
Modifier | Constructor and Description |
---|---|
|
StringFieldType() |
protected |
StringFieldType(MappedFieldType ref) |
Modifier and Type | Method and Description |
---|---|
org.apache.lucene.search.Query |
fuzzyQuery(java.lang.Object value,
Fuzziness fuzziness,
int prefixLength,
int maxExpansions,
boolean transpositions) |
protected org.apache.lucene.util.BytesRef |
indexedValueForSearch(java.lang.Object value)
Returns the indexed value used to construct search "values".
|
org.apache.lucene.search.Query |
prefixQuery(java.lang.String value,
org.apache.lucene.search.MultiTermQuery.RewriteMethod method,
QueryShardContext context) |
org.apache.lucene.search.Query |
rangeQuery(java.lang.Object lowerTerm,
java.lang.Object upperTerm,
boolean includeLower,
boolean includeUpper,
QueryShardContext context) |
org.apache.lucene.search.Query |
regexpQuery(java.lang.String value,
int flags,
int maxDeterminizedStates,
org.apache.lucene.search.MultiTermQuery.RewriteMethod method,
QueryShardContext context) |
org.apache.lucene.search.Query |
termQuery(java.lang.Object value,
QueryShardContext context)
Generates a query that will only match documents that contain the given value.
|
org.apache.lucene.search.Query |
termsQuery(java.util.List<?> values,
QueryShardContext context)
Build a constant-scoring query that matches all values.
|
boost, checkCompatibility, clone, docValueFormat, eagerGlobalOrdinals, equals, extractTerm, failIfNoDocValues, failIfNotIndexed, fielddataBuilder, hasDocValues, hashCode, indexAnalyzer, isAggregatable, isFieldWithinQuery, isSearchable, name, nullValue, nullValueAsString, nullValueQuery, queryStringTermQuery, searchAnalyzer, searchQuoteAnalyzer, setBoost, setEagerGlobalOrdinals, setHasDocValues, setIndexAnalyzer, setName, setNullValue, setSearchAnalyzer, setSearchQuoteAnalyzer, setSimilarity, similarity, stats, typeName, valueForDisplay
checkIfFrozen, docValuesType, freeze, indexOptions, numericPrecisionStep, numericType, omitNorms, pointDimensionCount, pointNumBytes, setDimensions, setDocValuesType, setIndexOptions, setNumericPrecisionStep, setNumericType, setOmitNorms, setStored, setStoreTermVectorOffsets, setStoreTermVectorPayloads, setStoreTermVectorPositions, setStoreTermVectors, setTokenized, stored, storeTermVectorOffsets, storeTermVectorPayloads, storeTermVectorPositions, storeTermVectors, tokenized, toString
public StringFieldType()
protected StringFieldType(MappedFieldType ref)
public org.apache.lucene.search.Query termsQuery(java.util.List<?> values, QueryShardContext context)
MappedFieldType
ConstantScoreQuery
around a BooleanQuery
whose BooleanClause.Occur.SHOULD
clauses
are generated with MappedFieldType.termQuery(java.lang.Object, org.elasticsearch.index.query.QueryShardContext)
.public org.apache.lucene.search.Query fuzzyQuery(java.lang.Object value, Fuzziness fuzziness, int prefixLength, int maxExpansions, boolean transpositions)
fuzzyQuery
in class MappedFieldType
public org.apache.lucene.search.Query prefixQuery(java.lang.String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, QueryShardContext context)
prefixQuery
in class MappedFieldType
public org.apache.lucene.search.Query regexpQuery(java.lang.String value, int flags, int maxDeterminizedStates, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, QueryShardContext context)
regexpQuery
in class MappedFieldType
public org.apache.lucene.search.Query rangeQuery(java.lang.Object lowerTerm, java.lang.Object upperTerm, boolean includeLower, boolean includeUpper, QueryShardContext context)
rangeQuery
in class MappedFieldType
protected org.apache.lucene.util.BytesRef indexedValueForSearch(java.lang.Object value)
termQuery(java.lang.Object, org.elasticsearch.index.query.QueryShardContext)
.public org.apache.lucene.search.Query termQuery(java.lang.Object value, QueryShardContext context)
MappedFieldType
TermQuery
over the value bytes,
boosted by MappedFieldType.boost()
.termQuery
in class MappedFieldType