Class SearchGroup<T>
- java.lang.Object
-
- org.apache.lucene.search.grouping.SearchGroup<T>
-
- Direct Known Subclasses:
CollectedSearchGroup
public class SearchGroup<T> extends java.lang.ObjectRepresents a group that is found during the first pass search.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classSearchGroup.GroupComparator<T>private static classSearchGroup.GroupMerger<T>private static classSearchGroup.MergedGroup<T>private static classSearchGroup.ShardIter<T>
-
Field Summary
Fields Modifier and Type Field Description TgroupValueThe value that defines this groupjava.lang.Object[]sortValuesThe sort values used during sorting.
-
Constructor Summary
Constructors Constructor Description SearchGroup()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)inthashCode()static <T> java.util.Collection<SearchGroup<T>>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.java.lang.StringtoString()
-
-
-
Field Detail
-
groupValue
public T groupValue
The value that defines this group
-
sortValues
public java.lang.Object[] 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 benulliffillFields=falsehad been passed toFirstPassGroupingCollector.getTopGroups(int)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
merge
public static <T> java.util.Collection<SearchGroup<T>> 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. 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.
-
-