OpenSearch/docs/java-api/query-dsl/span-containing-query.asciidoc

17 lines
516 B
Plaintext

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