Class MoreLikeThisQuery

java.lang.Object
org.apache.lucene.search.Query
org.elasticsearch.common.lucene.search.MoreLikeThisQuery

public class MoreLikeThisQuery extends org.apache.lucene.search.Query
  • Field Details

  • Constructor Details

    • MoreLikeThisQuery

      public MoreLikeThisQuery()
    • MoreLikeThisQuery

      public MoreLikeThisQuery(String likeText, String[] moreLikeFields, NamedAnalyzer analyzer)
  • Method Details

    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class org.apache.lucene.search.Query
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in class org.apache.lucene.search.Query
    • rewrite

      public org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader) throws IOException
      Overrides:
      rewrite in class org.apache.lucene.search.Query
      Throws:
      IOException
    • toString

      public String toString(String field)
      Specified by:
      toString in class org.apache.lucene.search.Query
    • getLikeText

      public String getLikeText()
    • getLikeTexts

      public String[] getLikeTexts()
    • setLikeText

      public void setLikeText(String... likeText)
    • getLikeFields

      public org.apache.lucene.index.Fields[] getLikeFields()
    • setLikeFields

      public void setLikeFields(org.apache.lucene.index.Fields... likeFields)
    • setLikeText

      public void setLikeText(List<String> likeText)
    • setUnlikeFields

      public void setUnlikeFields(org.apache.lucene.index.Fields... unlikeFields)
    • setUnlikeText

      public void setUnlikeText(String[] unlikeText)
    • getMoreLikeFields

      public String[] getMoreLikeFields()
    • setMoreLikeFields

      public void setMoreLikeFields(String[] moreLikeFields)
    • getSimilarity

      public org.apache.lucene.search.similarities.Similarity getSimilarity()
    • setSimilarity

      public void setSimilarity(org.apache.lucene.search.similarities.Similarity similarity)
    • getAnalyzer

      public org.apache.lucene.analysis.Analyzer getAnalyzer()
    • setAnalyzer

      public void setAnalyzer(String analyzerName, org.apache.lucene.analysis.Analyzer analyzer)
    • getMinimumShouldMatch

      public String getMinimumShouldMatch()
      Number of terms that must match the generated query expressed in the common syntax for minimum should match.
      See Also:
      Queries.calculateMinShouldMatch(int, String)
    • setMinimumShouldMatch

      public void setMinimumShouldMatch(String minimumShouldMatch)
      Number of terms that must match the generated query expressed in the common syntax for minimum should match. Defaults to 30%.
      See Also:
      Queries.calculateMinShouldMatch(int, String)
    • getMinTermFrequency

      public int getMinTermFrequency()
    • setMinTermFrequency

      public void setMinTermFrequency(int minTermFrequency)
    • getMaxQueryTerms

      public int getMaxQueryTerms()
    • setMaxQueryTerms

      public void setMaxQueryTerms(int maxQueryTerms)
    • getStopWords

      public Set<?> getStopWords()
    • setStopWords

      public void setStopWords(Set<?> stopWords)
    • getMinDocFreq

      public int getMinDocFreq()
    • setMinDocFreq

      public void setMinDocFreq(int minDocFreq)
    • getMaxDocFreq

      public int getMaxDocFreq()
    • setMaxDocFreq

      public void setMaxDocFreq(int maxDocFreq)
    • getMinWordLen

      public int getMinWordLen()
    • setMinWordLen

      public void setMinWordLen(int minWordLen)
    • getMaxWordLen

      public int getMaxWordLen()
    • setMaxWordLen

      public void setMaxWordLen(int maxWordLen)
    • isBoostTerms

      public boolean isBoostTerms()
    • setBoostTerms

      public void setBoostTerms(boolean boostTerms)
    • getBoostTermsFactor

      public float getBoostTermsFactor()
    • setBoostTermsFactor

      public void setBoostTermsFactor(float boostTermsFactor)