Interface SearchResult<T>
public interface SearchResult<T>
A result as returned by a search operation.
-
Method Summary
Modifier and TypeMethodDescriptionlongReturns the total number of items in the search result.longReturns the total number of appearances of the search criteria in the search result, spread overgetDocumentCountnumber of documents.getItems()Returns the individual items of this search result.longgetLimit()Returns the limit of this search results or-1if no limit has been specified.longGet the offset within the search result or-1if no limit has been specified.longgetPage()Returns the page of the current result items within the complete search result.longReturns the number of items in this search result, possibly limited with respect to the total number of result items byoffsetandlimit.longReturns 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 overgetDocumentCountnumber 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 bygetLimit().- 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 byoffsetandlimit.- Returns:
- the total number of hits.
- See Also:
-
getOffset
long getOffset()Get the offset within the search result or-1if no limit has been specified.- Returns:
- the offset
-
getLimit
long getLimit()Returns the limit of this search results or-1if 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 theoffsetand the page sizelimit.Note that the page size is one-based
- Returns:
- the page number
-
getSearchTime
long getSearchTime()Returns the search time in milliseconds.- Returns:
- the time
-