Class MoreLikeThisQuery


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

      • DEFAULT_MINIMUM_SHOULD_MATCH

        public static final java.lang.String DEFAULT_MINIMUM_SHOULD_MATCH
        See Also:
        Constant Field Values
    • Constructor Detail

      • MoreLikeThisQuery

        public MoreLikeThisQuery()
      • MoreLikeThisQuery

        public MoreLikeThisQuery​(java.lang.String likeText,
                                 java.lang.String[] moreLikeFields,
                                 org.apache.lucene.analysis.Analyzer analyzer)
    • Method Detail

      • hashCode

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

        public boolean equals​(java.lang.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 java.io.IOException
        Overrides:
        rewrite in class org.apache.lucene.search.Query
        Throws:
        java.io.IOException
      • toString

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

        public java.lang.String getLikeText()
      • getLikeTexts

        public java.lang.String[] getLikeTexts()
      • setLikeText

        public void setLikeText​(java.lang.String... likeText)
      • getLikeFields

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

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

        public void setLikeText​(java.util.List<java.lang.String> likeText)
      • setUnlikeFields

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

        public void setUnlikeText​(java.lang.String[] unlikeText)
      • getMoreLikeFields

        public java.lang.String[] getMoreLikeFields()
      • setMoreLikeFields

        public void setMoreLikeFields​(java.lang.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​(org.apache.lucene.analysis.Analyzer analyzer)
      • getMinimumShouldMatch

        public java.lang.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​(java.lang.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 java.util.Set<?> getStopWords()
      • setStopWords

        public void setStopWords​(java.util.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)