OpenSearch/docs/java-api/query-dsl/mlt-query.asciidoc

21 lines
697 B
Plaintext

[[java-query-dsl-mlt-query]]
==== More Like This Query
See:
* {ref}/query-dsl-mlt-query.html[More Like This Query]
[source,java]
--------------------------------------------------
String[] fields = {"name.first", "name.last"}; <1>
String[] texts = {"text like this one"}; <2>
Item[] items = null;
QueryBuilder qb = moreLikeThisQuery(fields, texts, items)
.minTermFreq(1) <3>
.maxQueryTerms(12); <4>
--------------------------------------------------
<1> fields
<2> text
<3> ignore threshold
<4> max num of Terms in generated queries