Class NodeTraversingQueryHits

  • All Implemented Interfaces:
    CloseableHits, QueryHits

    public class NodeTraversingQueryHits
    extends AbstractQueryHits
    NodeTraversingQueryHits implements query hits that traverse a node hierarchy.
    • Constructor Detail

      • NodeTraversingQueryHits

        public NodeTraversingQueryHits​(Node start,
                                       boolean includeStart)
        Creates query hits that consist of the nodes that are traversed from a given start node.
        Parameters:
        start - the start node of the traversal.
        includeStart - whether to include the start node in the result.
      • NodeTraversingQueryHits

        public NodeTraversingQueryHits​(Node start,
                                       boolean includeStart,
                                       int maxDepth)
        Creates query hits that consist of the nodes that are traversed from a given start node.
        Parameters:
        start - the start node of the traversal.
        includeStart - whether to include the start node in the result.
        maxDepth - the maximum depth of nodes to traverse.
    • Method Detail

      • nextScoreNode

        public ScoreNode nextScoreNode()
                                throws IOException
        Returns the next score node in this QueryHits or null if there are no more score nodes.
        Returns:
        the next score node in this QueryHits.
        Throws:
        IOException - if an error occurs while reading from the index.