Class AbstractSearchResponse

    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractSearchResponse​(org.apache.lucene.search.Query query, int totalHitsCount, int returnedHitsCount)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void close()
      Frees any resource associated with this response.
      org.apache.lucene.search.Query getQuery()  
      int getReturnedHitsCount()
      Returns the number of hits returned by this search response.
      int getTotalHits()
      Deprecated.
      use getTotalHitsCount() instead.
      int getTotalHitsCount()
      Returns the number of total hits found by this query (total number of potential hits as reported by Lucene index).
      boolean isHitLimitExceeded()
      Deprecated.
      always returns false, since 4.1.0 there is no notion of hit limit
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • query

        private final org.apache.lucene.search.Query query
      • totalHitsCount

        private final int totalHitsCount
      • returnedHitsCount

        private final int returnedHitsCount
    • Constructor Detail

      • AbstractSearchResponse

        public AbstractSearchResponse​(org.apache.lucene.search.Query query,
                                      int totalHitsCount,
                                      int returnedHitsCount)
    • Method Detail

      • getQuery

        public org.apache.lucene.search.Query getQuery()
      • getTotalHits

        public int getTotalHits()
        Deprecated.
        use getTotalHitsCount() instead.
        Returns the number of total hits found. This may be different that actual hits returned (is usually more).
        Returns:
      • getTotalHitsCount

        public int getTotalHitsCount()
        Returns the number of total hits found by this query (total number of potential hits as reported by Lucene index). This is the number of existing AIs matching your query, and does not represent the count of hits delivered, which is returned by getReturnedHitsCount().
        Returns:
      • getReturnedHitsCount

        public int getReturnedHitsCount()
        Returns the number of hits returned by this search response. This number is affected by various input parameters (like count set on request) and filtering, paging, etc. Warning: this number's meaning depends on actual search response (for flat response number of actual AIs, for grouped response number of actual groups), and also, might be not precise at all (see IteratorSearchResponse).
        Returns:
      • isHitLimitExceeded

        public boolean isHitLimitExceeded()
        Deprecated.
        always returns false, since 4.1.0 there is no notion of hit limit
        Returns true if hit limit exceeded.
        Returns:
      • close

        public void close()
                   throws java.io.IOException
        Frees any resource associated with this response. Should be called as last method on this response, when it's not used anymore.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException