use of org.opensearch.client.opensearch._types.query_dsl.SpanGapQuery in project opensearch-java by opensearch-project.
the class BuiltinTypesTest method testSpanGapQuery.
@Test
public void testSpanGapQuery() {
// Hand-written class
SpanGapQuery q = SpanGapQuery.of(b -> b.field("a-field").spanWidth(12));
q = checkJsonRoundtrip(q, "{\"a-field\":12}");
assertEquals("a-field", q.field());
assertEquals(12, q.spanWidth());
}
Aggregations