Class BlockGroupingCollector
BlockGroupingCollector performs grouping with a
single pass collector, as long as you are grouping by a
doc block field, ie all documents sharing a given group
value were indexed as a doc block using the atomic
This results in faster performance (~25% faster QPS) than the two-pass grouping collectors, with the tradeoff being that the documents in each group must always be indexed as a block. This collector also fills in TopGroups.totalGroupCount without requiring the separate TermAllGroupsCollector. However, this collector does not fill in the groupValue of each group; this field will always be null.
NOTE
: this collector makes no effort to verify
the docs were in fact indexed as a block, so it's up to
you to ensure this was the case.
See org.apache.lucene.search.grouping for more details including a full code example.
@lucene.experimentalInheritance
Assembly: Lucene.Net.Grouping.dll
Syntax
public class BlockGroupingCollector : object, ICollector
Constructors
Name | Description |
---|---|
BlockGroupingCollector(Sort, Int32, Boolean, Filter) | Create the single pass collector. |
Properties
Name | Description |
---|---|
AcceptsDocsOutOfOrder |
Methods
Name | Description |
---|---|
Collect(Int32) | |
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.) |
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.) |
SetNextReader(AtomicReaderContext) | |
SetScorer(Scorer) |