|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.action.mlt.MoreLikeThisRequest
public class MoreLikeThisRequest
A more like this request allowing to search for documents that a "like" the provided document. The document
to check against to fetched based on the index, type and id provided. Best created with Requests.moreLikeThisRequest(String)
.
Note, the index()
, type(String)
and id(String)
are required.
Client.moreLikeThis(MoreLikeThisRequest)
,
Requests.moreLikeThisRequest(String)
,
SearchResponse
Constructor Summary | |
---|---|
MoreLikeThisRequest(java.lang.String index)
Constructs a new more like this request for a document that will be fetch from the provided index. |
Method Summary | |
---|---|
float |
boostTerms()
The boost factor to use when boosting terms. |
MoreLikeThisRequest |
boostTerms(float boostTerms)
The boost factor to use when boosting terms. |
java.lang.String[] |
fields()
The fields of the document to use in order to find documents "like" this one. |
MoreLikeThisRequest |
fields(java.lang.String... fields)
The fields of the document to use in order to find documents "like" this one. |
java.lang.String |
id()
The id of document to load from which the "like" query will rutn with. |
MoreLikeThisRequest |
id(java.lang.String id)
The id of document to load from which the "like" query will rutn with. |
java.lang.String |
index()
The index to load the document from which the "like" query will run with. |
boolean |
listenerThreaded()
Should the listener be called on a separate thread if needed. |
ActionRequest |
listenerThreaded(boolean listenerThreaded)
Should the listener be called on a separate thread if needed. |
int |
maxDocFreq()
The maximum frequency in which words may still appear. |
MoreLikeThisRequest |
maxDocFreq(int maxDocFreq)
The maximum frequency in which words may still appear. |
int |
maxQueryTerms()
The maximum number of query terms that will be included in any generated query. |
MoreLikeThisRequest |
maxQueryTerms(int maxQueryTerms)
The maximum number of query terms that will be included in any generated query. |
int |
maxWordLen()
The maximum word length above which words will be ignored. |
MoreLikeThisRequest |
maxWordLen(int maxWordLen)
The maximum word length above which words will be ignored. |
int |
minDocFreq()
The frequency at which words will be ignored which do not occur in at least this many docs. |
MoreLikeThisRequest |
minDocFreq(int minDocFreq)
The frequency at which words will be ignored which do not occur in at least this many docs. |
int |
minTermFreq()
The frequency below which terms will be ignored in the source doc. |
MoreLikeThisRequest |
minTermFreq(int minTermFreq)
The frequency below which terms will be ignored in the source doc. |
int |
minWordLen()
The minimum word length below which words will be ignored. |
MoreLikeThisRequest |
minWordLen(int minWordLen)
The minimum word length below which words will be ignored. |
float |
percentTermsToMatch()
The percent of the terms to match for each field. |
MoreLikeThisRequest |
percentTermsToMatch(float percentTermsToMatch)
The percent of the terms to match for each field. |
void |
readFrom(StreamInput in)
|
java.lang.String[] |
searchIndices()
The indices the resulting mlt query will run against. |
MoreLikeThisRequest |
searchIndices(java.lang.String... searchIndices)
The indices the resulting mlt query will run against. |
java.lang.String |
searchQueryHint()
Optional search query hint. |
MoreLikeThisRequest |
searchQueryHint(java.lang.String searchQueryHint)
Optional search query hint. |
Scroll |
searchScroll()
An optional search scroll request to be able to continue and scroll the search operation. |
MoreLikeThisRequest |
searchScroll(Scroll searchScroll)
An optional search scroll request to be able to continue and scroll the search operation. |
byte[] |
searchSource()
An optional search source request allowing to control the search request for the more like this documents. |
MoreLikeThisRequest |
searchSource(byte[] searchSource)
An optional search source request allowing to control the search request for the more like this documents. |
MoreLikeThisRequest |
searchSource(byte[] searchSource,
int offset,
int length,
boolean unsafe)
An optional search source request allowing to control the search request for the more like this documents. |
MoreLikeThisRequest |
searchSource(java.util.Map searchSource)
|
MoreLikeThisRequest |
searchSource(SearchSourceBuilder sourceBuilder)
An optional search source request allowing to control the search request for the more like this documents. |
MoreLikeThisRequest |
searchSource(java.lang.String searchSource)
An optional search source request allowing to control the search request for the more like this documents. |
MoreLikeThisRequest |
searchSource(XContentBuilder builder)
|
int |
searchSourceLength()
|
int |
searchSourceOffset()
|
boolean |
searchSourceUnsafe()
|
SearchType |
searchType()
The search type of the mlt search query. |
MoreLikeThisRequest |
searchType(SearchType searchType)
The search type of the mlt search query. |
MoreLikeThisRequest |
searchType(java.lang.String searchType)
The search type of the mlt search query. |
java.lang.String[] |
searchTypes()
The types the resulting mlt query will run against. |
MoreLikeThisRequest |
searchTypes(java.lang.String... searchTypes)
The types the resulting mlt query will run against. |
java.lang.String[] |
stopWords()
Any word in this set is considered "uninteresting" and ignored. |
MoreLikeThisRequest |
stopWords(java.lang.String... stopWords)
Any word in this set is considered "uninteresting" and ignored. |
java.lang.String |
type()
The type of document to load from which the "like" query will rutn with. |
MoreLikeThisRequest |
type(java.lang.String type)
The type of document to load from which the "like" query will rutn with. |
ActionRequestValidationException |
validate()
|
void |
writeTo(StreamOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MoreLikeThisRequest(java.lang.String index)
type(String)
and id(String)
to specificy the document to load.
Method Detail |
---|
public java.lang.String index()
public java.lang.String type()
@Required public MoreLikeThisRequest type(java.lang.String type)
public java.lang.String id()
@Required public MoreLikeThisRequest id(java.lang.String id)
public java.lang.String[] fields()
public MoreLikeThisRequest fields(java.lang.String... fields)
public MoreLikeThisRequest percentTermsToMatch(float percentTermsToMatch)
public float percentTermsToMatch()
public MoreLikeThisRequest minTermFreq(int minTermFreq)
public int minTermFreq()
public MoreLikeThisRequest maxQueryTerms(int maxQueryTerms)
public int maxQueryTerms()
public MoreLikeThisRequest stopWords(java.lang.String... stopWords)
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".
Defaults to no stop words.
public java.lang.String[] stopWords()
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".
Defaults to no stop words.
public MoreLikeThisRequest minDocFreq(int minDocFreq)
public int minDocFreq()
public MoreLikeThisRequest maxDocFreq(int maxDocFreq)
public int maxDocFreq()
public MoreLikeThisRequest minWordLen(int minWordLen)
public int minWordLen()
public MoreLikeThisRequest maxWordLen(int maxWordLen)
public int maxWordLen()
public MoreLikeThisRequest boostTerms(float boostTerms)
public float boostTerms()
public MoreLikeThisRequest searchSource(SearchSourceBuilder sourceBuilder)
public MoreLikeThisRequest searchSource(java.lang.String searchSource)
public MoreLikeThisRequest searchSource(java.util.Map searchSource)
public MoreLikeThisRequest searchSource(XContentBuilder builder)
public MoreLikeThisRequest searchSource(byte[] searchSource)
public MoreLikeThisRequest searchSource(byte[] searchSource, int offset, int length, boolean unsafe)
public byte[] searchSource()
public int searchSourceOffset()
public int searchSourceLength()
public boolean searchSourceUnsafe()
public MoreLikeThisRequest searchType(SearchType searchType)
public MoreLikeThisRequest searchType(java.lang.String searchType) throws ElasticSearchIllegalArgumentException
ElasticSearchIllegalArgumentException
public SearchType searchType()
public MoreLikeThisRequest searchIndices(java.lang.String... searchIndices)
public java.lang.String[] searchIndices()
public MoreLikeThisRequest searchTypes(java.lang.String... searchTypes)
public java.lang.String[] searchTypes()
public MoreLikeThisRequest searchQueryHint(java.lang.String searchQueryHint)
public java.lang.String searchQueryHint()
public MoreLikeThisRequest searchScroll(Scroll searchScroll)
public Scroll searchScroll()
public ActionRequestValidationException validate()
validate
in interface ActionRequest
public boolean listenerThreaded()
listenerThreaded
in interface ActionRequest
public ActionRequest listenerThreaded(boolean listenerThreaded)
listenerThreaded
in interface ActionRequest
public void readFrom(StreamInput in) throws java.io.IOException
readFrom
in interface Streamable
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
writeTo
in interface Streamable
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |