Class ToParentBlockJoinCollector
Collects parent document hits for a
The parent
You should only use this collector if one or more of the clauses in the query is a ToParentBlockJoinQuery. This collector will find those query clauses and record the matching child documents for the top scoring parent documents.
Multiple joins (star join) and nested joins and a mix of the two are allowed, as long as in all cases the documents corresponding to a single row of each joined parent table were indexed as a doc block.
For the simple star join you can retrieve the ITopGroups<TGroupValue> instance containing each ToParentBlockJoinQuery's matching child documents for the top parent groups, using GetTopGroups(ToParentBlockJoinQuery, Sort, Int32, Int32, Int32, Boolean). Ie, a single query, which will contain two or more ToParentBlockJoinQuery's as clauses representing the star join, can then retrieve two or more ITopGroups<TGroupValue> instances.
For nested joins, the query will run correctly (ie, match the right parent and child documents), however, because TopGroups<TGroupValue> is currently unable to support nesting (each group is not able to hold another TopGroups<TGroupValue>), you are only able to retrieve the TopGroups<TGroupValue> of the first join. The TopGroups<TGroupValue> of the nested joins will not be correct.
See http://lucene.apache.org/core/4_8_0/join/ for a code sample.
@lucene.experimental
Inheritance
Assembly: Lucene.Net.Join.dll
Syntax
public class ToParentBlockJoinCollector : ICollector
Constructors
Name | Description |
---|---|
ToParentBlockJoinCollector(Sort, Int32, Boolean, Boolean) | Creates a ToParentBlockJoinCollector. The provided |
Properties
Name | Description |
---|---|
AcceptsDocsOutOfOrder | |
MaxScore | Returns the highest score across all collected parent hits, as long as
|
Methods
Name | Description |
---|---|
Collect(Int32) | |
GetTopGroups(ToParentBlockJoinQuery, Sort, Int32, Int32, Int32, Boolean) | Returns the ITopGroups<TGroupValue> for the specified
BlockJoinQuery. The groupValue of each GroupDocs will
be the parent docID for that group.
The number of documents within each group is calculated as minimum of |
GetTopGroupsWithAllChildDocs(ToParentBlockJoinQuery, Sort, Int32, Int32, Boolean) | Returns the TopGroups<TGroupValue> for the specified BlockJoinQuery. The groupValue of each
GroupDocs will be the parent docID for that group. The number of documents within
each group equals to the total number of matched child documents for that group.
Returns |
SetNextReader(AtomicReaderContext) | |
SetScorer(Scorer) |