Interface SearchResult<T>


public interface SearchResult<T>
A result as returned by a search operation.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the total number of items in the search result.
    long
    Returns the total number of appearances of the search criteria in the search result, spread over getDocumentCount number of documents.
    Returns the individual items of this search result.
    long
    Returns the limit of this search results or -1 if no limit has been specified.
    long
    Get the offset within the search result or -1 if no limit has been specified.
    long
    Returns the page of the current result items within the complete search result.
    long
    Returns the number of items in this search result, possibly limited with respect to the total number of result items by offset and limit.
    long
    Returns the search time in milliseconds.
  • Method Details

    • getItems

      SearchResultItem<T>[] getItems()
      Returns the individual items of this search result.
      Returns:
      the search result items
    • getHitCount

      long getHitCount()
      Returns the total number of appearances of the search criteria in the search result, spread over getDocumentCount number of documents.
      Returns:
      the overall number of hits
    • getDocumentCount

      long getDocumentCount()
      Returns the total number of items in the search result.

      Note that this number might not match the size of the array as returned by getItems(), which is likely to be limited by the value returned by getLimit().

      Returns:
      the number of documents containing the hits
    • getPageSize

      long getPageSize()
      Returns the number of items in this search result, possibly limited with respect to the total number of result items by offset and limit.
      Returns:
      the total number of hits.
      See Also:
    • getOffset

      long getOffset()
      Get the offset within the search result or -1 if no limit has been specified.
      Returns:
      the offset
    • getLimit

      long getLimit()
      Returns the limit of this search results or -1 if no limit has been specified.
      Returns:
      the limit
    • getPage

      long getPage()
      Returns the page of the current result items within the complete search result. This number is influenced by the offset and the page size limit.

      Note that the page size is one-based

      Returns:
      the page number
    • getSearchTime

      long getSearchTime()
      Returns the search time in milliseconds.
      Returns:
      the time