Class ToParentBlockJoinQuery
This query requires that you index
children and parent docs as a single block, using the
Once the block index is built, use this query to wrap
any sub-query matching only child docs and join matches in that
child document space up to the parent document space.
You can then use this
See ToChildBlockJoinQuery if you need to join in the reverse order.
The child documents must be orthogonal to the parent documents: the wrapped child query must never return a parent document.
If you'd like to retrieve ITopGroups<TGroupValue> for the resulting query, use the ToParentBlockJoinCollector. Note that this is not necessary, ie, if you simply want to collect the parent documents and don't need to see which child documents matched under that parent, then you can use any collector.
NOTE: If the overall query contains parent-only matches, for example you OR a parent-only query with a joined child-only query, then the resulting collected documents will be correct, however the ITopGroups<TGroupValue> you get from ToParentBlockJoinCollector will not contain every child for parents that had matched.
See http://lucene.apache.org/core/4_8_0/join/ for an overview.
@lucene.experimental
Inheritance
Assembly: Lucene.Net.Join.dll
Syntax
public class ToParentBlockJoinQuery : Query
Constructors
Name | Description |
---|---|
ToParentBlockJoinQuery(Query, Filter, ScoreMode) | Create a ToParentBlockJoinQuery. |
Methods
Name | Description |
---|---|
CreateWeight(IndexSearcher) | |
Equals(Object) | |
ExtractTerms(ISet<Term>) | |
GetHashCode() | |
Rewrite(IndexReader) | |
ToString(String) |