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
ConstructorsConstructorDescriptionStringFieldType(String name, boolean isSearchable, boolean isStored, boolean hasDocValues, TextSearchInfo textSearchInfo, Map<String,String> meta) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.lucene.search.QueryfuzzyQuery(Object value, Fuzziness fuzziness, int prefixLength, int maxExpansions, boolean transpositions, SearchExecutionContext context)org.apache.lucene.search.QuerynormalizedWildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context)static StringnormalizeWildcardPattern(String fieldname, String value, org.apache.lucene.analysis.Analyzer normalizer)org.apache.lucene.search.QueryprefixQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context)org.apache.lucene.search.QueryrangeQuery(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.QueryregexpQuery(String value, int syntaxFlags, int matchFlags, int maxDeterminizedStates, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context)protected org.apache.lucene.search.QuerywildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, boolean shouldNormalize, SearchExecutionContext context)org.apache.lucene.search.QuerywildcardQuery(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, termsQueryMethods inherited from class org.elasticsearch.index.mapper.SimpleMappedFieldType
rangeQueryMethods 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:
fuzzyQueryin classMappedFieldType
-
prefixQuery
public org.apache.lucene.search.Query prefixQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context)- Overrides:
prefixQueryin classMappedFieldType
-
normalizeWildcardPattern
-
wildcardQuery
public org.apache.lucene.search.Query wildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, boolean caseInsensitive, SearchExecutionContext context)- Overrides:
wildcardQueryin classMappedFieldType
-
normalizedWildcardQuery
public org.apache.lucene.search.Query normalizedWildcardQuery(String value, org.apache.lucene.search.MultiTermQuery.RewriteMethod method, SearchExecutionContext context)- Overrides:
normalizedWildcardQueryin 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:
regexpQueryin classMappedFieldType
-
rangeQuery
public org.apache.lucene.search.Query rangeQuery(Object lowerTerm, Object upperTerm, boolean includeLower, boolean includeUpper, SearchExecutionContext context)Description copied from class:SimpleMappedFieldTypeSame asSimpleMappedFieldType.rangeQuery(Object, Object, boolean, boolean, ShapeRelation, ZoneId, DateMathParser, SearchExecutionContext)but without the trouble of relations or date-specific options.- Overrides:
rangeQueryin classSimpleMappedFieldType
-