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 Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_MINIMUM_SHOULD_MATCH
-
Constructor Summary
Constructors Constructor Description MoreLikeThisQuery()
MoreLikeThisQuery(java.lang.String likeText, java.lang.String[] moreLikeFields, org.apache.lucene.analysis.Analyzer analyzer)
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
org.apache.lucene.analysis.Analyzer
getAnalyzer()
float
getBoostTermsFactor()
org.apache.lucene.index.Fields[]
getLikeFields()
java.lang.String
getLikeText()
java.lang.String[]
getLikeTexts()
int
getMaxDocFreq()
int
getMaxQueryTerms()
int
getMaxWordLen()
int
getMinDocFreq()
java.lang.String
getMinimumShouldMatch()
Number of terms that must match the generated query expressed in the common syntax for minimum should match.int
getMinTermFrequency()
int
getMinWordLen()
java.lang.String[]
getMoreLikeFields()
org.apache.lucene.search.similarities.Similarity
getSimilarity()
java.util.Set<?>
getStopWords()
int
hashCode()
boolean
isBoostTerms()
org.apache.lucene.search.Query
rewrite(org.apache.lucene.index.IndexReader reader)
void
setAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
void
setBoostTerms(boolean boostTerms)
void
setBoostTermsFactor(float boostTermsFactor)
void
setLikeFields(org.apache.lucene.index.Fields... likeFields)
void
setLikeText(java.lang.String... likeText)
void
setLikeText(java.util.List<java.lang.String> likeText)
void
setMaxDocFreq(int maxDocFreq)
void
setMaxQueryTerms(int maxQueryTerms)
void
setMaxWordLen(int maxWordLen)
void
setMinDocFreq(int minDocFreq)
void
setMinimumShouldMatch(java.lang.String minimumShouldMatch)
Number of terms that must match the generated query expressed in the common syntax for minimum should match.void
setMinTermFrequency(int minTermFrequency)
void
setMinWordLen(int minWordLen)
void
setMoreLikeFields(java.lang.String[] moreLikeFields)
void
setSimilarity(org.apache.lucene.search.similarities.Similarity similarity)
void
setStopWords(java.util.Set<?> stopWords)
void
setUnlikeFields(org.apache.lucene.index.Fields... unlikeFields)
void
setUnlikeText(java.lang.String[] unlikeText)
java.lang.String
toString(java.lang.String field)
-
-
-
Field Detail
-
DEFAULT_MINIMUM_SHOULD_MATCH
public static final java.lang.String DEFAULT_MINIMUM_SHOULD_MATCH
- See Also:
- Constant Field Values
-
-
Method Detail
-
hashCode
public int hashCode()
- Specified by:
hashCode
in classorg.apache.lucene.search.Query
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in classorg.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 classorg.apache.lucene.search.Query
- Throws:
java.io.IOException
-
toString
public java.lang.String toString(java.lang.String field)
- Specified by:
toString
in classorg.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.
-
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 to30%
.
-
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)
-
-