Package org.elasticsearch.index.mapper
Class StringFieldType
java.lang.Object
org.elasticsearch.index.mapper.MappedFieldType
org.elasticsearch.index.mapper.SimpleMappedFieldType
org.elasticsearch.index.mapper.TermBasedFieldType
org.elasticsearch.index.mapper.StringFieldType
- Direct Known Subclasses:
FlattenedFieldMapper.KeyedFlattenedFieldType
,FlattenedFieldMapper.RootFlattenedFieldType
,IgnoredFieldMapper.IgnoredFieldType
,KeywordFieldMapper.KeywordFieldType
,TextFieldMapper.TextFieldType
Base class for
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.-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.index.mapper.MappedFieldType
MappedFieldType.CollapseType, MappedFieldType.Relation
-
Constructor Summary
ConstructorDescriptionStringFieldType(String name, boolean isSearchable, boolean isStored, boolean hasDocValues, TextSearchInfo textSearchInfo, Map<String,String> meta)
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.search.Query
fuzzyQuery(Object value, Fuzziness fuzziness, int prefixLength, int maxExpansions, boolean transpositions, SearchExecutionContext context)
org.apache.lucene.search.Query
normalizedWildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context)
static String
normalizeWildcardPattern(String fieldname, String value, org.apache.lucene.analysis.Analyzer normalizer)
org.apache.lucene.search.Query
prefixQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context)
org.apache.lucene.search.Query
rangeQuery(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, SearchExecutionContext context)
Same asSimpleMappedFieldType.rangeQuery(Object, Object, boolean, boolean, ShapeRelation, ZoneId, DateMathParser, SearchExecutionContext)
but without the trouble of relations or date-specific options.org.apache.lucene.search.Query
regexpQuery(String value, int syntaxFlags, int matchFlags, int maxDeterminizedStates, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context)
protected org.apache.lucene.search.Query
wildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, boolean shouldNormalize, SearchExecutionContext context)
org.apache.lucene.search.Query
wildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context)
Methods inherited from class org.elasticsearch.index.mapper.TermBasedFieldType
indexedValueForSearch, termQuery, termQueryCaseInsensitive, termsQuery
Methods inherited from class org.elasticsearch.index.mapper.SimpleMappedFieldType
rangeQuery
Methods inherited from class org.elasticsearch.index.mapper.MappedFieldType
boost, collapseType, distanceFeatureQuery, docValueFormat, eagerGlobalOrdinals, existsQuery, extractTerm, failIfNoDocValues, failIfNotIndexed, familyTypeName, fielddataBuilder, fuzzyIntervals, getTerms, getTextSearchInfo, hasDocValues, isAggregatable, isFieldWithinQuery, isSearchable, isStored, meta, multiPhraseQuery, name, phrasePrefixQuery, phraseQuery, pointReaderIfPossible, prefixIntervals, prefixQuery, setBoost, spanPrefixQuery, termIntervals, typeName, valueFetcher, valueForDisplay, wildcardIntervals, wildcardQuery
-
Constructor Details
-
StringFieldType
public StringFieldType(String name, boolean isSearchable, boolean isStored, boolean hasDocValues, TextSearchInfo textSearchInfo, Map<String,String> meta)
-
-
Method Details
-
fuzzyQuery
public org.apache.lucene.search.Query fuzzyQuery(Object value, Fuzziness fuzziness, int prefixLength, int maxExpansions, boolean transpositions, SearchExecutionContext context)- Overrides:
fuzzyQuery
in classMappedFieldType
-
prefixQuery
public org.apache.lucene.search.Query prefixQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context)- Overrides:
prefixQuery
in classMappedFieldType
-
normalizeWildcardPattern
-
wildcardQuery
public org.apache.lucene.search.Query wildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context)- Overrides:
wildcardQuery
in classMappedFieldType
-
normalizedWildcardQuery
public org.apache.lucene.search.Query normalizedWildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context)- Overrides:
normalizedWildcardQuery
in classMappedFieldType
-
wildcardQuery
protected org.apache.lucene.search.Query wildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, boolean shouldNormalize, SearchExecutionContext context) -
regexpQuery
public org.apache.lucene.search.Query regexpQuery(String value, int syntaxFlags, int matchFlags, int maxDeterminizedStates, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context)- Overrides:
regexpQuery
in classMappedFieldType
-
rangeQuery
public org.apache.lucene.search.Query rangeQuery(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, SearchExecutionContext context)Description copied from class:SimpleMappedFieldType
Same asSimpleMappedFieldType.rangeQuery(Object, Object, boolean, boolean, ShapeRelation, ZoneId, DateMathParser, SearchExecutionContext)
but without the trouble of relations or date-specific options.- Overrides:
rangeQuery
in classSimpleMappedFieldType
-