Class SearchGroup<T>
java.lang.Object
org.apache.lucene.search.grouping.SearchGroup<T>
- Direct Known Subclasses:
CollectedSearchGroup
Represents a group that is found during the first pass search.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Modifier and TypeFieldDescriptionThe value that defines this groupObject[]
The sort values used during sorting. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
static <T> Collection
<SearchGroup<T>> merge
(List<Collection<SearchGroup<T>>> topGroups, int offset, int topN, Sort groupSort) Merges multiple collections of top groups, for example obtained from separate index shards.toString()
-
Field Details
-
groupValue
The value that defines this group -
sortValues
The sort values used during sorting. These are the groupSort field values of the highest rank document (by the groupSort) within the group. Can benull
iffillFields=false
had been passed toFirstPassGroupingCollector.getTopGroups(int)
-
-
Constructor Details
-
SearchGroup
public SearchGroup()
-
-
Method Details
-
toString
-
equals
-
hashCode
public int hashCode() -
merge
public static <T> Collection<SearchGroup<T>> merge(List<Collection<SearchGroup<T>>> topGroups, int offset, int topN, Sort groupSort) Merges multiple collections of top groups, for example obtained from separate index shards. The provided groupSort must match how the groups were sorted, and the provided SearchGroups must have been computed with fillFields=true passed toFirstPassGroupingCollector.getTopGroups(int)
.NOTE: this returns null if the topGroups is empty.
-