Namespace Lucene.Net.Join
Classes
FixedBitSetCachingWrapperFilter
A
JoinUtil
Utility for query time joining using Lucene.Net.Join.TermsQuery and Lucene.Net.Join.TermsCollector.
@lucene.experimental
ToChildBlockJoinQuery
Just like ToParentBlockJoinQuery, except this
query joins in reverse: you provide a
@lucene.experimental
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
ToParentBlockJoinFieldComparer
A field comparer that allows parent documents to be sorted by fields from the nested / child documents.
@lucene.experimental
ToParentBlockJoinFieldComparer.Highest
Concrete implementation of ToParentBlockJoinSortField to sorts the parent docs with the highest values in the child / nested docs first.
ToParentBlockJoinFieldComparer.Lowest
Concrete implementation of ToParentBlockJoinSortField to sorts the parent docs with the lowest values in the child / nested docs first.
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
ToParentBlockJoinSortField
A special sort field that allows sorting parent docs based on nested / child level fields. Based on the sort order it either takes the document with the lowest or highest field value into account.
@lucene.experimental
Enums
ScoreMode
How to aggregate multiple child hit scores into a single parent score.