Search in sources :

Example 1 with SpanContainingQuery

use of org.apache.lucene.queries.spans.SpanContainingQuery in project OpenSearch by opensearch-project.

the class SpanContainingQueryBuilder method doToQuery.

@Override
protected Query doToQuery(QueryShardContext context) throws IOException {
    Query innerBig = big.toQuery(context);
    assert innerBig instanceof SpanQuery;
    Query innerLittle = little.toQuery(context);
    assert innerLittle instanceof SpanQuery;
    return new SpanContainingQuery((SpanQuery) innerBig, (SpanQuery) innerLittle);
}
Also used : Query(org.apache.lucene.search.Query) SpanQuery(org.apache.lucene.queries.spans.SpanQuery) SpanContainingQuery(org.apache.lucene.queries.spans.SpanContainingQuery) SpanContainingQuery(org.apache.lucene.queries.spans.SpanContainingQuery) SpanQuery(org.apache.lucene.queries.spans.SpanQuery)

Aggregations

SpanContainingQuery (org.apache.lucene.queries.spans.SpanContainingQuery)1 SpanQuery (org.apache.lucene.queries.spans.SpanQuery)1 Query (org.apache.lucene.search.Query)1