Class ParentsChildrenBlockJoinQuery

java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.search.join.ParentsChildrenBlockJoinQuery

public class ParentsChildrenBlockJoinQuery extends Query
A query that returns the matching child documents for matching parent documents indexed together in the same block. The provided parentQuery determines the parent documents of the returned children documents. The provided childQuery determines which matching children documents are being returned. childLimitPerParent is the maximum number of child documents to match per parent document.
WARNING: This API is experimental and might change in incompatible ways in the next release.
  • Field Details

    • DEFAULT_CHILD_LIMIT_PER_PARENT

      public static final int DEFAULT_CHILD_LIMIT_PER_PARENT
      The default maximum number of child documents to match per parent document.
      See Also:
  • Constructor Details

    • ParentsChildrenBlockJoinQuery

      public ParentsChildrenBlockJoinQuery(BitSetProducer parentFilter, Query parentQuery, Query childQuery, int childLimitPerParent)
      Create a ParentsChildrenBlockJoinQuery.
      Parameters:
      parentFilter - Filter identifying the parent documents.
      parentQuery - Query that matches parent documents.
      childQuery - Query that matches child documents.
      childLimitPerParent - The maximum number of child documents to match per parent.
    • ParentsChildrenBlockJoinQuery

      public ParentsChildrenBlockJoinQuery(BitSetProducer parentFilter, Query parentQuery, Query childQuery, int childLimitPerParent, BinaryOperator<Float> scoreCombiner)
      Create a ParentsChildrenBlockJoinQuery with a custom score combiner.
      Parameters:
      parentFilter - Filter identifying the parent documents.
      parentQuery - Query that matches parent documents.
      childQuery - Query that matches child documents.
      childLimitPerParent - The maximum number of child documents to match per parent.
      scoreCombiner - Function to combine parent and child scores.
    • ParentsChildrenBlockJoinQuery

      public ParentsChildrenBlockJoinQuery(BitSetProducer parentFilter, Query parentQuery, Query childQuery)
      Create a ParentsChildrenBlockJoinQuery with DEFAULT_CHILD_LIMIT_PER_PARENT.
      Parameters:
      parentFilter - Filter identifying the parent documents.
      parentQuery - Query that matches parent documents.
      childQuery - Query that matches child documents.
  • Method Details