18 lines
527 B
Plaintext
18 lines
527 B
Plaintext
[[java-query-dsl-dis-max-query]]
|
|
==== Dis Max Query
|
|
|
|
See {ref}/query-dsl-dis-max-query.html[Dis Max Query]
|
|
|
|
[source,java]
|
|
--------------------------------------------------
|
|
QueryBuilder qb = disMaxQuery()
|
|
.add(termQuery("name", "kimchy")) <1>
|
|
.add(termQuery("name", "elasticsearch")) <2>
|
|
.boost(1.2f) <3>
|
|
.tieBreaker(0.7f); <4>
|
|
--------------------------------------------------
|
|
<1> add your queries
|
|
<2> add your queries
|
|
<3> boost factor
|
|
<4> tie breaker
|