|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.elasticsearch.index.query.xcontent.BaseQueryBuilder
org.elasticsearch.index.query.xcontent.MoreLikeThisFieldQueryBuilder
public class MoreLikeThisFieldQueryBuilder
A more like this query that runs against a specific field.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent |
---|
ToXContent.MapParams, ToXContent.Params |
Field Summary |
---|
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent |
---|
EMPTY_PARAMS |
Constructor Summary | |
---|---|
MoreLikeThisFieldQueryBuilder(java.lang.String name)
A more like this query that runs against a specific field. |
Method Summary | |
---|---|
MoreLikeThisFieldQueryBuilder |
boost(float boost)
|
MoreLikeThisFieldQueryBuilder |
boostTerms(float boostTerms)
Sets the boost factor to use when boosting terms. |
protected void |
doXContent(XContentBuilder builder,
ToXContent.Params params)
|
MoreLikeThisFieldQueryBuilder |
likeText(java.lang.String likeText)
The text to use in order to find documents that are "like" this. |
MoreLikeThisFieldQueryBuilder |
maxDocFreq(int maxDocFreq)
Set the maximum frequency in which words may still appear. |
MoreLikeThisFieldQueryBuilder |
maxQueryTerms(int maxQueryTerms)
Sets the maximum number of query terms that will be included in any generated query. |
MoreLikeThisFieldQueryBuilder |
maxWordLen(int maxWordLen)
Sets the maximum word length above which words will be ignored. |
MoreLikeThisFieldQueryBuilder |
minDocFreq(int minDocFreq)
Sets the frequency at which words will be ignored which do not occur in at least this many docs. |
MoreLikeThisFieldQueryBuilder |
minTermFreq(int minTermFreqy)
The frequency below which terms will be ignored in the source doc. |
MoreLikeThisFieldQueryBuilder |
minWordLen(int minWordLen)
Sets the minimum word length below which words will be ignored. |
MoreLikeThisFieldQueryBuilder |
percentTermsToMatch(float percentTermsToMatch)
The percentage of terms to match. |
MoreLikeThisFieldQueryBuilder |
stopWords(java.lang.String... stopWords)
Set the set of stopwords. |
Methods inherited from class org.elasticsearch.index.query.xcontent.BaseQueryBuilder |
---|
buildAsBytes, buildAsBytes, buildAsUnsafeBytes, buildAsUnsafeBytes, toXContent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MoreLikeThisFieldQueryBuilder(java.lang.String name)
name
- The field name to run the query againstMethod Detail |
---|
public MoreLikeThisFieldQueryBuilder likeText(java.lang.String likeText)
public MoreLikeThisFieldQueryBuilder percentTermsToMatch(float percentTermsToMatch)
public MoreLikeThisFieldQueryBuilder minTermFreq(int minTermFreqy)
public MoreLikeThisFieldQueryBuilder maxQueryTerms(int maxQueryTerms)
public MoreLikeThisFieldQueryBuilder stopWords(java.lang.String... stopWords)
Any word in this set is considered "uninteresting" and ignored. Even if your Analyzer allows stopwords, you might want to tell the MoreLikeThis code to ignore them, as for the purposes of document similarity it seems reasonable to assume that "a stop word is never interesting".
public MoreLikeThisFieldQueryBuilder minDocFreq(int minDocFreq)
public MoreLikeThisFieldQueryBuilder maxDocFreq(int maxDocFreq)
public MoreLikeThisFieldQueryBuilder minWordLen(int minWordLen)
public MoreLikeThisFieldQueryBuilder maxWordLen(int maxWordLen)
public MoreLikeThisFieldQueryBuilder boostTerms(float boostTerms)
public MoreLikeThisFieldQueryBuilder boost(float boost)
protected void doXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
doXContent
in class BaseQueryBuilder
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |