public class SortedTermsQuery extends AbstractCompoundTermsQuery
Modifier and Type | Class and Description |
---|---|
static class |
SortedTermsQuery.SortOrder |
AbstractCompoundTermsQuery.CompoundCountsStrategy
Modifier and Type | Field and Description |
---|---|
protected SortedTermsQuery.SortOrder[] |
criteria |
static SortedTermsQuery.SortOrder[] |
DEFAULT_SORT_CRITERIA
The default sort criteria: returned terms are sorted by:
terms count (descending), then by
term string (ascending), then by
term ID (ascending)
|
countsStrategy, subQueries
Constructor and Description |
---|
SortedTermsQuery(TermsQuery query)
Creates a new sorted terms query, wrapping the provided query, and using
the
DEFAULT_SORT_CRITERIA . |
SortedTermsQuery(TermsQuery query,
SortedTermsQuery.SortOrder... criteria)
Creates a new sorted terms query, wrapping the provided query, and using
the given sort criteria.
|
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.
|
void |
setCountsStrategy(AbstractCompoundTermsQuery.CompoundCountsStrategy countsStrategy)
This method has no effect, as the number of sub-queries is always 1.
|
computeCompoundCount, execute, getCountsStrategy, getSubQueries
protected SortedTermsQuery.SortOrder[] criteria
public static final SortedTermsQuery.SortOrder[] DEFAULT_SORT_CRITERIA
public SortedTermsQuery(TermsQuery query, SortedTermsQuery.SortOrder... criteria)
query
- criteria
- public SortedTermsQuery(TermsQuery query)
DEFAULT_SORT_CRITERIA
.query
- public TermsResultSet combine(TermsResultSet... resSets)
CompoundTermsQuery
resSets
- the result sets to be combined according to the logic of
this operator.public void setCountsStrategy(AbstractCompoundTermsQuery.CompoundCountsStrategy countsStrategy)
setCountsStrategy
in class AbstractCompoundTermsQuery
countsStrategy
- the countsStrategy to setCopyright © 2021 GATE. All rights reserved.