SearchResultsPage

Represents a list of results from the search engine. When retrieved without grouping, e.g. the <@td.search> tag, the paged items will be SearchResultDocument objects. When grouped, e.g. on the searchResults.ftl or from the <@td.groupSearch> tag, the contents will be SearchResultGroup objects.

Properties

FacetField[] facetFields
The list of facet counts for the search.
int number
The zero-based index of the current page.
int size
The maximum number of results this page could contain.
int totalPages
The total number of pages available for the current search.
int numberOfElements
The number of elements on the current page. Will be less than or equal to size .
long totalElements
The total number of elements (groups or documents) returnable by the current search.
long totalHits
The total number of documents returnable by the current search.
boolean previousPage
true if there is a previous page.
boolean previous
true if there is a previous page.
boolean firstPage
true if the current page is the first page.
boolean nextPage
true if there is a next page.
boolean next
true if there is a next page.
boolean lastPage
true if the current page is the last page.
boolean last
true if the current page is the last page.
String groupedBy
The property by which the results are grouped when applicable, such as the default search page or the results of the td.groupSearch directive. The default grouping field is "itemKey", meaning that DITA topics with multiple DITA map contexts will be grouped together. This value will be null for ungrouped searches. Introduced in version 4.2.1.
Object[] startNextAfter
Markers that can be used in a subsequent request to get the next page of results. Avoids performance and/or hard limits on the full size of all pages in the search engine.
T[] content
The contents of the current page. This will either be SearchResultGroup or SearchResultDocument objects, depending on the way the query was performed.
  • When the search is performed using the standard portal search page, and rendered with searchResults.ftl , this will be a list of SearchResultGroup .
  • When performed using the <@td.groupSearch> tag, the results will also be of type SearchResultGroup .
  • When performed using <@td.search> , the results will be lists of SearchResultDocument .