public class OrTermsQuery extends AbstractCompoundTermsQuery
AbstractCompoundTermsQuery.CompoundCountsStrategy.FIRST
.AbstractCompoundTermsQuery.CompoundCountsStrategy
countsStrategy, subQueries
Constructor and Description |
---|
OrTermsQuery(TermsQuery... subQueries)
Constructs a new OR terms query.
|
Modifier and Type | Method and Description |
---|---|
TermsResultSet |
combine(TermsResultSet... resSets)
Applies the logic of this query operator to an array of ready-constructed
result sets representing the results of the sub-queries.
|
static TermsResultSet |
orResultsSets(TermsResultSet[] resSets,
AbstractCompoundTermsQuery.CompoundCountsStrategy countsStrategy)
Given a set of
TermsResultSet values, this method combines them
into a single TermsResultSet representing the disjunction of all
the provided results sets. |
computeCompoundCount, execute, getCountsStrategy, getSubQueries, setCountsStrategy
public OrTermsQuery(TermsQuery... subQueries)
stringsEnabled
- should terms strings be returned.countsEnabled
- should term counts be returned. Counts are
accumulated across all sub-queries: the count for a term is the sum of all
counts for the same term in all sub-queries.limit
- the maximum number of terms to be returned.subQueries
- the term queries that form the disjunction.public TermsResultSet combine(TermsResultSet... resSets)
CompoundTermsQuery
resSets
- the result sets to be combined according to the logic of
this operator.public static TermsResultSet orResultsSets(TermsResultSet[] resSets, AbstractCompoundTermsQuery.CompoundCountsStrategy countsStrategy)
TermsResultSet
values, this method combines them
into a single TermsResultSet
representing the disjunction of all
the provided results sets.resSets
- Copyright © 2021 GATE. All rights reserved.