Method GetTopGroups
GetTopGroups(Sort, Int32, Int32, Int32, Boolean)
Returns the grouped results. Returns null if the number of groups collected is <= groupOffset.
NOTE: This collector is unable to compute the groupValue per group so it will always be null. This is normally not a problem, as you can obtain the value just like you obtain other values for each matching document (eg, via stored fields, via FieldCache, etc.)
Declaration
public virtual ITopGroups<object> GetTopGroups(Sort withinGroupSort, int groupOffset, int withinGroupOffset, int maxDocsPerGroup, bool fillSortFields)
Parameters
Type | Name | Description |
---|---|---|
Sort | withinGroupSort | The Sort used to sort documents within each group. Passing null is allowed, to sort by relevance. |
System.Int32 | groupOffset | Which group to start from |
System.Int32 | withinGroupOffset | Which document to start from within each group |
System.Int32 | maxDocsPerGroup | How many top documents to keep within each group. |
System.Boolean | fillSortFields | If true then the Comparable values for the sort fields will be set |
Returns
Type | Description |
---|---|
ITopGroups<System.Object> |
GetTopGroups<TGroupValue>(Sort, Int32, Int32, Int32, Boolean)
Returns the grouped results. Returns null if the number of groups collected is <= groupOffset.
NOTE: This collector is unable to compute the groupValue per group so it will always be null. This is normally not a problem, as you can obtain the value just like you obtain other values for each matching document (eg, via stored fields, via FieldCache, etc.)
Declaration
public virtual ITopGroups<TGroupValue> GetTopGroups<TGroupValue>(Sort withinGroupSort, int groupOffset, int withinGroupOffset, int maxDocsPerGroup, bool fillSortFields)
Parameters
Type | Name | Description |
---|---|---|
Sort | withinGroupSort | The Sort used to sort documents within each group. Passing null is allowed, to sort by relevance. |
System.Int32 | groupOffset | Which group to start from |
System.Int32 | withinGroupOffset | Which document to start from within each group |
System.Int32 | maxDocsPerGroup | How many top documents to keep within each group. |
System.Boolean | fillSortFields | If true then the Comparable values for the sort fields will be set |
Returns
Type | Description |
---|---|
ITopGroups<TGroupValue> |
Type Parameters
Name | Description |
---|---|
TGroupValue | The expected return type for group value |