Class MatchQueryParser

java.lang.Object
org.elasticsearch.index.search.MatchQueryParser
Direct Known Subclasses:
MultiMatchQueryParser

public class MatchQueryParser extends Object
  • Field Details

    • DEFAULT_PHRASE_SLOP

      public static final int DEFAULT_PHRASE_SLOP
      See Also:
      Constant Field Values
    • DEFAULT_LENIENCY

      public static final boolean DEFAULT_LENIENCY
      See Also:
      Constant Field Values
    • DEFAULT_ZERO_TERMS_QUERY

      public static final ZeroTermsQueryOption DEFAULT_ZERO_TERMS_QUERY
    • context

      protected final SearchExecutionContext context
    • analyzer

      protected org.apache.lucene.analysis.Analyzer analyzer
    • occur

      protected org.apache.lucene.search.BooleanClause.Occur occur
    • enablePositionIncrements

      protected boolean enablePositionIncrements
    • phraseSlop

      protected int phraseSlop
    • fuzziness

      protected Fuzziness fuzziness
    • fuzzyPrefixLength

      protected int fuzzyPrefixLength
    • maxExpansions

      protected int maxExpansions
    • spanRewriteMethod

      protected org.apache.lucene.search.spans.SpanMultiTermQueryWrapper.SpanRewriteMethod spanRewriteMethod
    • transpositions

      protected boolean transpositions
    • fuzzyRewriteMethod

      protected org.apache.lucene.search.MultiTermQuery.RewriteMethod fuzzyRewriteMethod
    • lenient

      protected boolean lenient
    • zeroTermsQuery

      protected ZeroTermsQueryOption zeroTermsQuery
    • commonTermsCutoff

      protected Float commonTermsCutoff
    • autoGenerateSynonymsPhraseQuery

      protected boolean autoGenerateSynonymsPhraseQuery
  • Constructor Details

  • Method Details

    • setAnalyzer

      public void setAnalyzer(String analyzerName)
    • setAnalyzer

      public void setAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
    • setOccur

      public void setOccur(org.apache.lucene.search.BooleanClause.Occur occur)
    • setCommonTermsCutoff

      @Deprecated public void setCommonTermsCutoff(Float cutoff)
      Deprecated.
      See setCommonTermsCutoff(Float) for more details
    • setEnablePositionIncrements

      public void setEnablePositionIncrements(boolean enablePositionIncrements)
    • setPhraseSlop

      public void setPhraseSlop(int phraseSlop)
    • setFuzziness

      public void setFuzziness(Fuzziness fuzziness)
    • setFuzzyPrefixLength

      public void setFuzzyPrefixLength(int fuzzyPrefixLength)
    • setMaxExpansions

      public void setMaxExpansions(int maxExpansions)
    • setTranspositions

      public void setTranspositions(boolean transpositions)
    • setFuzzyRewriteMethod

      public void setFuzzyRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod fuzzyRewriteMethod)
    • setLenient

      public void setLenient(boolean lenient)
    • setZeroTermsQuery

      public void setZeroTermsQuery(ZeroTermsQueryOption zeroTermsQuery)
    • setAutoGenerateSynonymsPhraseQuery

      public void setAutoGenerateSynonymsPhraseQuery(boolean enabled)
    • parse

      public org.apache.lucene.search.Query parse(MatchQueryParser.Type type, String fieldName, Object value) throws IOException
      Throws:
      IOException
    • getAnalyzer

      protected org.apache.lucene.analysis.Analyzer getAnalyzer(MappedFieldType fieldType, boolean quoted)