Class AbstractSearchResponse

All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
FlatSearchResponse, GroupedSearchResponse, IteratorSearchResponse

public class AbstractSearchResponse extends Object implements Closeable
  • Constructor Details

    • AbstractSearchResponse

      public AbstractSearchResponse( query, int totalHitsCount, int returnedHitsCount)
  • Method Details

    • getQuery

      public getQuery()
    • getTotalHits

      public int getTotalHits()
      use getTotalHitsCount() instead.
      Returns the number of total hits found. This may be different that actual hits returned (is usually more).
    • 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().
    • 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).
    • isHitLimitExceeded

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

      public void close() throws 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 AutoCloseable
      Specified by:
      close in interface Closeable