Class AbstractQueryHits

    • Constructor Detail

      • AbstractQueryHits

        public AbstractQueryHits()
    • Method Detail

      • close

        public void close()
                   throws IOException
        This default implementation does nothing.
        Specified by:
        close in interface CloseableHits
        Throws:
        IOException - if an error occurs while releasing resources.
      • skip

        public void skip​(int n)
                  throws IOException
        Provides a default implementation:
         while (n-- > 0) {
             if (nextScoreNode() == null) {
                 return;
             }
         }
         
        Sub classes may overwrite this method and implement are more efficient way to skip hits.
        Specified by:
        skip in interface CloseableHits
        Parameters:
        n - the number of hits to skip.
        Throws:
        IOException - if an error occurs while skipping.
      • getSize

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