public interface SearchResult
SearchResultPage| Modifier and Type | Method and Description |
|---|---|
SearchHit |
getHit(int index)
This method gets the hit at the given
index. |
int |
getHitCount()
This method gets the total number of hits for this
search-result. |
SearchResultPage |
getPage(int pageIndex)
This method gets the
page of this search-result at the
given pageIndex using the default number of
hits per page. |
SearchResultPage |
getPage(int pageIndex,
int hitsPerPage)
|
int |
getPageCount()
|
int |
getPageCount(int hitsPerPage)
|
String |
getQuery()
This method gets the original query string that produced this result.
|
String getQuery()
int getHitCount()
search-result.SearchHit getHit(int index)
index. index - is the index of the requested hit. It has to be in the range from 0 to
getHitCount() - 1.hit.int getPageCount()
pages used to split the total hits using the default number of
hits per page. An empty search result will have one empty page.getPageCount(int)int getPageCount(int hitsPerPage)
pages used to split the total
hits using the given hitsPerPage. An empty search result will have one empty page.hitsPerPage - is the desired number of hits per page. This
should be a value like 5, 10, 20, 30, ..., 100.pages required to split the total
hits.SearchResultPage getPage(int pageIndex)
page of this search-result at the
given pageIndex using the default number of
hits per page.pageIndex - is the page index of the requested
search result. This should be in the range from 0 to
getPageCount() - 1. pageIndex is always valid in the sense as described
above (the search index may have been modified in the meantime). An implementation has to be able
to handle calls with a pageIndex greater or equal to
SearchResultPage.getPageCount(). The recommended strategy is to return the
last page in this case.SearchEngine.search(SearchQuery, int)SearchResultPage getPage(int pageIndex, int hitsPerPage)
pageIndex - is the page index of the requested
search result. This should be in the range from 0 to
getPageCount(hitsPerPage) - 1 . pageIndex is always valid in the sense as described
above (the search index may have been modified in the meantime). An implementation has to be able
to handle calls with a pageIndex greater or equal to
SearchResultPage.getPageCount(). The recommended strategy is to return the
last page in this case.hitsPerPage - is the number of hits contained in a SearchResultPage.SearchEngine.search(SearchQuery, int)Copyright © 2001–2016 mmm-Team. All rights reserved.