OpenSearch/docs/java-api/query-dsl/span-within-query.asciidoc
David Pilato f8cf9f790b Update Java documentation for 5.0
Some of the methods have been removed or deprecated.

Also related to #21825.
2016-11-28 17:33:40 +01:00

16 lines
497 B
Plaintext

[[java-query-dsl-span-within-query]]
==== Span Within Query
See {ref}/query-dsl-span-within-query.html[Span Within Query]
[source,java]
--------------------------------------------------
QueryBuilder qb = spanWithinQuery(
spanNearQuery(spanTermQuery("field1", "bar"), 5) <1>
.addClause(spanTermQuery("field1", "baz"))
.inOrder(true),
spanTermQuery("field1", "foo")); <2>
--------------------------------------------------
<1> `big` part
<2> `little` part