Class Join

    • Field Detail

      • outerScoreNodeIndex

        protected final int outerScoreNodeIndex
        The score node index of the outer query hits.
      • innerJoin

        protected final boolean innerJoin
        Whether this is an inner join.
      • condition

        protected final Condition condition
        The join condition.
      • selectorNames

        protected final org.apache.jackrabbit.spi.Name[] selectorNames
        The selector names.
      • emptyInnerHits

        protected final ScoreNode[] emptyInnerHits
        An array of empty inner query hits.
      • buffer

        protected final List<ScoreNode[]> buffer
        A buffer for joined score node rows.
    • Method Detail

      • create

        public static Join create​(MultiColumnQueryHits left,
                                  MultiColumnQueryHits right,
                                  org.apache.jackrabbit.commons.query.qom.JoinType joinType,
                                  org.apache.jackrabbit.spi.commons.query.qom.JoinConditionImpl condition,
                                  org.apache.lucene.index.IndexReader reader,
                                  HierarchyResolver resolver,
                                  NamespaceMappings nsMappings,
                                  HierarchyManager hmgr)
                           throws IOException
        Creates a new join result.
        Parameters:
        left - the left query hits.
        right - the right query hits.
        joinType - the join type.
        condition - the QOM join condition.
        reader - the index reader.
        resolver - the hierarchy resolver.
        nsMappings - namespace mappings of this index
        hmgr - the hierarchy manager of the workspace.
        Returns:
        the join result.
        Throws:
        IOException - if an error occurs while executing the join.
      • nextScoreNodes

        public ScoreNode[] nextScoreNodes()
                                   throws IOException
        Returns the next score nodes in this QueryHits or null if there are no more score nodes.
        Specified by:
        nextScoreNodes in interface MultiColumnQueryHits
        Returns:
        the next score nodes in this QueryHits.
        Throws:
        IOException - if an error occurs while reading from the index.
      • getSize

        public int getSize()
        This default implementation always returns -1.
        Specified by:
        getSize in interface CloseableHits
        Returns:
        always -1.
      • skip

        public void skip​(int n)
                  throws IOException
        Skips a n score nodes. Skips by calling nextScoreNodes() n times. Sub classes may provide a more performance implementation.
        Specified by:
        skip in interface CloseableHits
        Parameters:
        n - the number of score nodes to skip.
        Throws:
        IOException - if an error occurs while skipping.
      • getIndex

        protected static int getIndex​(MultiColumnQueryHits source,
                                      org.apache.jackrabbit.spi.Name selectorName)
        Returns the index of the selector with the given selectorName within the given source.
        Parameters:
        source - a source.
        selectorName - a selector name.
        Returns:
        the index within the source or -1 if the name does not exist in source.