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
-
Constructor Summary
ConstructorDescriptionMoreLikeThisQuery(String likeText, String[] moreLikeFields, NamedAnalyzer analyzer)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
org.apache.lucene.analysis.Analyzer
float
org.apache.lucene.index.Fields[]
String[]
int
int
int
int
Number of terms that must match the generated query expressed in the common syntax for minimum should match.int
int
String[]
org.apache.lucene.search.similarities.Similarity
Set<?>
int
hashCode()
boolean
org.apache.lucene.search.Query
rewrite(org.apache.lucene.index.IndexReader reader)
void
setAnalyzer(String analyzerName, org.apache.lucene.analysis.Analyzer analyzer)
void
setBoostTerms(boolean boostTerms)
void
setBoostTermsFactor(float boostTermsFactor)
void
setLikeFields(org.apache.lucene.index.Fields... likeFields)
void
setLikeText(String... likeText)
void
setLikeText(List<String> likeText)
void
setMaxDocFreq(int maxDocFreq)
void
setMaxQueryTerms(int maxQueryTerms)
void
setMaxWordLen(int maxWordLen)
void
setMinDocFreq(int minDocFreq)
void
setMinimumShouldMatch(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(String[] moreLikeFields)
void
setSimilarity(org.apache.lucene.search.similarities.Similarity similarity)
void
setStopWords(Set<?> stopWords)
void
setUnlikeFields(org.apache.lucene.index.Fields... unlikeFields)
void
setUnlikeText(String[] unlikeText)
Methods inherited from class org.apache.lucene.search.Query
classHash, createWeight, sameClassAs, toString, visit
-
Field Details
-
DEFAULT_MINIMUM_SHOULD_MATCH
- See Also:
- Constant Field Values
-
-
Constructor Details
-
MoreLikeThisQuery
public MoreLikeThisQuery() -
MoreLikeThisQuery
-
-
Method Details
-
hashCode
public int hashCode()- Specified by:
hashCode
in classorg.apache.lucene.search.Query
-
equals
- Specified by:
equals
in classorg.apache.lucene.search.Query
-
rewrite
public org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader) throws IOException- Overrides:
rewrite
in classorg.apache.lucene.search.Query
- Throws:
IOException
-
toString
- Specified by:
toString
in classorg.apache.lucene.search.Query
-
getLikeText
-
getLikeTexts
-
setLikeText
-
getLikeFields
public org.apache.lucene.index.Fields[] getLikeFields() -
setLikeFields
public void setLikeFields(org.apache.lucene.index.Fields... likeFields) -
setLikeText
-
setUnlikeFields
public void setUnlikeFields(org.apache.lucene.index.Fields... unlikeFields) -
setUnlikeText
-
getMoreLikeFields
-
setMoreLikeFields
-
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
-
getMinimumShouldMatch
Number of terms that must match the generated query expressed in the common syntax for minimum should match. -
setMinimumShouldMatch
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
-
setStopWords
-
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)
-