Package | Description |
---|---|
org.apache.lucene.index |
Code to maintain and access indices.
|
org.apache.lucene.search |
Code to search indices.
|
org.apache.lucene.search.grouping |
Grouping.
|
org.apache.lucene.search.grouping.function |
Support for grouping by
ValueSource . |
org.apache.lucene.search.grouping.term |
Support for grouping by indexed terms via
DocValues . |
org.apache.lucene.search.join |
Support for index-time and query-time joins.
|
Modifier and Type | Field and Description |
---|---|
(package private) Sort |
Sorter.sort |
(package private) Sort |
SortingMergePolicy.sort |
Modifier and Type | Method and Description |
---|---|
Sort |
SortingMergePolicy.getSort()
Return the
Sort order that is used to sort segments when merging. |
Modifier and Type | Method and Description |
---|---|
static boolean |
SortingMergePolicy.isSorted(LeafReader reader,
Sort sort)
Returns
true if the given reader is sorted by the
sort given. |
static LeafReader |
SortingLeafReader.wrap(LeafReader reader,
Sort sort)
Return a sorted view of
reader according to the order
defined by sort . |
Constructor and Description |
---|
Sorter(Sort sort)
Creates a new Sorter to sort the index with
sort |
SortingMergePolicy(MergePolicy in,
Sort sort)
Create a new
MergePolicy that sorts documents with the given sort . |
Modifier and Type | Field and Description |
---|---|
(package private) Sort |
BlockJoinComparatorSource.childSort |
static Sort |
Sort.INDEXORDER
Represents sorting by index order.
|
private Sort |
EarlyTerminatingSortingCollector.mergePolicySort |
(package private) Sort |
BlockJoinComparatorSource.parentSort |
static Sort |
Sort.RELEVANCE
Represents sorting by computed relevance.
|
private Sort |
SortRescorer.sort |
protected Sort |
EarlyTerminatingSortingCollector.sort
Sort used to sort the search results
|
Modifier and Type | Method and Description |
---|---|
Sort |
Sort.rewrite(IndexSearcher searcher)
Rewrites the SortFields in this Sort, returning a new Sort if any of the fields
changes during their rewriting.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
EarlyTerminatingSortingCollector.canEarlyTerminate(Sort searchSort,
Sort mergePolicySort)
|
static TopFieldCollector |
TopFieldCollector.create(Sort sort,
int numHits,
boolean fillFields,
boolean trackDocScores,
boolean trackMaxScore)
Creates a new
TopFieldCollector from the given
arguments. |
static TopFieldCollector |
TopFieldCollector.create(Sort sort,
int numHits,
FieldDoc after,
boolean fillFields,
boolean trackDocScores,
boolean trackMaxScore)
Creates a new
TopFieldCollector from the given
arguments. |
static TopFieldDocs |
TopDocs.merge(Sort sort,
int start,
int topN,
TopFieldDocs[] shardHits)
Same as
TopDocs.merge(Sort, int, TopFieldDocs[]) but also ignores the top
start top docs. |
static TopFieldDocs |
TopDocs.merge(Sort sort,
int topN,
TopFieldDocs[] shardHits)
Returns a new TopFieldDocs, containing topN results across
the provided TopFieldDocs, sorting by the specified
Sort . |
private static TopDocs |
TopDocs.mergeAux(Sort sort,
int start,
int size,
TopDocs[] shardHits)
Auxiliary method used by the
TopDocs.merge(int, org.apache.lucene.search.TopDocs[]) impls. |
TopFieldDocs |
IndexSearcher.search(Query query,
int n,
Sort sort)
Search implementation with arbitrary sorting.
|
TopFieldDocs |
IndexSearcher.search(Query query,
int n,
Sort sort,
boolean doDocScores,
boolean doMaxScore)
Search implementation with arbitrary sorting, plus
control over whether hit scores and max score
should be computed.
|
private TopFieldDocs |
IndexSearcher.searchAfter(FieldDoc after,
Query query,
int numHits,
Sort sort,
boolean doDocScores,
boolean doMaxScore) |
TopDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
int n,
Sort sort)
Finds the top
n
hits for query where all results are after a previous
result (after ). |
TopFieldDocs |
IndexSearcher.searchAfter(ScoreDoc after,
Query query,
int numHits,
Sort sort,
boolean doDocScores,
boolean doMaxScore)
Finds the top
n
hits for query where all results are after a previous
result (after ), allowing control over
whether hit scores and max score should be computed. |
Constructor and Description |
---|
BlockJoinComparatorSource(Query parentsFilter,
Sort parentSort)
Create a new BlockJoinComparatorSource, sorting only blocks of documents
with
parentSort and not reordering children with a block. |
BlockJoinComparatorSource(Query parentsFilter,
Sort parentSort,
Sort childSort)
Create a new BlockJoinComparatorSource, specifying the sort order for both
blocks of documents and children within a block.
|
EarlyTerminatingSortingCollector(Collector in,
Sort sort,
int numDocsToCollect,
Sort mergePolicySort)
Create a new
EarlyTerminatingSortingCollector instance. |
MergeSortQueue(Sort sort,
TopDocs[] shardHits) |
PagingFieldCollector(Sort sort,
FieldValueHitQueue<FieldValueHitQueue.Entry> queue,
FieldDoc after,
int numHits,
boolean fillFields,
boolean trackDocScores,
boolean trackMaxScore) |
SimpleFieldCollector(Sort sort,
FieldValueHitQueue<FieldValueHitQueue.Entry> queue,
int numHits,
boolean fillFields,
boolean trackDocScores,
boolean trackMaxScore) |
SortRescorer(Sort sort)
Sole constructor.
|
Modifier and Type | Field and Description |
---|---|
private Sort |
AbstractSecondPassGroupingCollector.groupSort |
private Sort |
BlockGroupingCollector.groupSort |
private Sort |
GroupingSearch.groupSort |
private Sort |
GroupingSearch.sortWithinGroup |
private Sort |
AbstractSecondPassGroupingCollector.withinGroupSort |
Modifier and Type | Method and Description |
---|---|
TopGroups<?> |
BlockGroupingCollector.getTopGroups(Sort withinGroupSort,
int groupOffset,
int withinGroupOffset,
int maxDocsPerGroup,
boolean fillSortFields)
Returns the grouped results.
|
static <T> java.util.Collection<SearchGroup<T>> |
SearchGroup.merge(java.util.List<java.util.Collection<SearchGroup<T>>> topGroups,
int offset,
int topN,
Sort groupSort)
Merges multiple collections of top groups, for example
obtained from separate index shards.
|
static <T> TopGroups<T> |
TopGroups.merge(TopGroups<T>[] shardGroups,
Sort groupSort,
Sort docSort,
int docOffset,
int docTopN,
TopGroups.ScoreMergeMode scoreMergeMode)
Merges an array of TopGroups, for example obtained
from the second-pass collector across multiple
shards.
|
GroupingSearch |
GroupingSearch.setGroupSort(Sort groupSort)
Specifies how groups are sorted.
|
GroupingSearch |
GroupingSearch.setSortWithinGroup(Sort sortWithinGroup)
Specified how documents inside a group are sorted.
|
Constructor and Description |
---|
AbstractFirstPassGroupingCollector(Sort groupSort,
int topNGroups)
Create the first pass collector.
|
AbstractSecondPassGroupingCollector(java.util.Collection<SearchGroup<GROUP_VALUE_TYPE>> groups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields) |
BlockGroupingCollector(Sort groupSort,
int topNGroups,
boolean needsScores,
Weight lastDocPerGroup)
Create the single pass collector.
|
GroupComparator(Sort groupSort) |
GroupMerger(Sort groupSort) |
Modifier and Type | Field and Description |
---|---|
private Sort |
FunctionAllGroupHeadsCollector.sortWithinGroup |
Constructor and Description |
---|
FunctionAllGroupHeadsCollector(ValueSource groupBy,
java.util.Map<?,?> vsContext,
Sort sortWithinGroup)
Constructs a
FunctionAllGroupHeadsCollector instance. |
FunctionFirstPassGroupingCollector(ValueSource groupByVS,
java.util.Map<?,?> vsContext,
Sort groupSort,
int topNGroups)
Creates a first pass collector.
|
FunctionSecondPassGroupingCollector(java.util.Collection<SearchGroup<MutableValue>> searchGroups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields,
ValueSource groupByVS,
java.util.Map<?,?> vsContext)
Constructs a
FunctionSecondPassGroupingCollector instance. |
GroupHead(MutableValue groupValue,
Sort sort,
int doc) |
Modifier and Type | Field and Description |
---|---|
private Sort |
TermAllGroupHeadsCollector.GeneralAllGroupHeadsCollector.sortWithinGroup |
Modifier and Type | Method and Description |
---|---|
static AbstractAllGroupHeadsCollector<?> |
TermAllGroupHeadsCollector.create(java.lang.String groupField,
Sort sortWithinGroup)
Creates an
AbstractAllGroupHeadsCollector instance based on the supplied arguments. |
static AbstractAllGroupHeadsCollector<?> |
TermAllGroupHeadsCollector.create(java.lang.String groupField,
Sort sortWithinGroup,
int initialSize)
Creates an
AbstractAllGroupHeadsCollector instance based on the supplied arguments. |
Constructor and Description |
---|
GeneralAllGroupHeadsCollector(java.lang.String groupField,
Sort sortWithinGroup) |
GroupHead(BytesRef groupValue,
Sort sort,
int doc) |
OrdAllGroupHeadsCollector(java.lang.String groupField,
Sort sortWithinGroup,
int initialSize) |
OrdScoreAllGroupHeadsCollector(java.lang.String groupField,
Sort sortWithinGroup,
int initialSize) |
ScoreAllGroupHeadsCollector(java.lang.String groupField,
Sort sortWithinGroup,
int initialSize) |
TermFirstPassGroupingCollector(java.lang.String groupField,
Sort groupSort,
int topNGroups)
Create the first pass collector.
|
TermSecondPassGroupingCollector(java.lang.String groupField,
java.util.Collection<SearchGroup<BytesRef>> groups,
Sort groupSort,
Sort withinGroupSort,
int maxDocsPerGroup,
boolean getScores,
boolean getMaxScores,
boolean fillSortFields) |
Modifier and Type | Field and Description |
---|---|
private Sort |
ToParentBlockJoinCollector.sort |
Modifier and Type | Method and Description |
---|---|
private TopGroups<java.lang.Integer> |
ToParentBlockJoinCollector.accumulateGroups(int slot,
int offset,
int maxDocsPerGroup,
int withinGroupOffset,
Sort withinGroupSort,
boolean fillSortFields)
Accumulates groups for the BlockJoinQuery specified by its slot.
|
TopGroups<java.lang.Integer> |
ToParentBlockJoinCollector.getTopGroups(ToParentBlockJoinQuery query,
Sort withinGroupSort,
int offset,
int maxDocsPerGroup,
int withinGroupOffset,
boolean fillSortFields)
Returns the TopGroups for the specified
BlockJoinQuery.
|
TopGroups<java.lang.Integer> |
ToParentBlockJoinCollector.getTopGroupsWithAllChildDocs(ToParentBlockJoinQuery query,
Sort withinGroupSort,
int offset,
int withinGroupOffset,
boolean fillSortFields)
Returns the TopGroups for the specified BlockJoinQuery.
|
Constructor and Description |
---|
ToParentBlockJoinCollector(Sort sort,
int numParentHits,
boolean trackScores,
boolean trackMaxScore)
Creates a ToParentBlockJoinCollector.
|