Package com.day.cq.wcm.foundation
Class Search.Result
- java.lang.Object
-
- com.day.cq.wcm.foundation.Search.Result
-
- Enclosing class:
- Search
public final class Search.Result extends java.lang.Object
A search result.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getExecutionTime()
Returns the execution time in fractions of a second.long
getExecutionTimeMillis()
Returns the execution time in milliseconds.java.util.Map<java.lang.String,Facet>
getFacets()
Returns the facets for this search result.java.util.List<Search.Hit>
getHits()
Search.Page
getNextPage()
Search.Page
getPreviousPage()
java.util.List<Search.Page>
getResultPages()
java.lang.String
getSpellcheck()
long
getStartIndex()
long
getTotalMatches()
java.lang.String
getTrackerScript()
-
-
-
Method Detail
-
getResultPages
public java.util.List<Search.Page> getResultPages() throws RepositoryException
- Returns:
- a List of
Search.Page
es to display the navigation through the result pages. - Throws:
RepositoryException
- if an error occurs while reading from the query result.
-
getPreviousPage
public Search.Page getPreviousPage() throws RepositoryException
- Returns:
- the page, which contains the information about the previous page.
Returns
null
if there is no previous page (i.e. the current page is the first page). - Throws:
RepositoryException
- if an error occurs while reading from the query result.
-
getNextPage
public Search.Page getNextPage() throws RepositoryException
- Returns:
- the page, which contains the information about the next page.
Returns
null
if there is no next page (i.e. the current page is the last page). - Throws:
RepositoryException
- if an error occurs while reading from the query result.
-
getTrackerScript
public java.lang.String getTrackerScript()
- Returns:
- the script for query and result tracking.
-
getSpellcheck
public java.lang.String getSpellcheck()
- Returns:
- the result of a spell check or
null
if spell checking is not supported or the repository thinks the spelling is correct.
-
getStartIndex
public long getStartIndex()
- Returns:
- the start index. i.e. from where to start to display the hits.
-
getTotalMatches
public long getTotalMatches()
- Returns:
- the total number of matches.
-
getExecutionTime
public java.lang.String getExecutionTime()
Returns the execution time in fractions of a second. Example: 0.08 (means, the query took 80 milliseconds to execute).- Returns:
- the execution time of the query.
-
getExecutionTimeMillis
public long getExecutionTimeMillis()
Returns the execution time in milliseconds.- Returns:
- the execution time of the query.
-
getFacets
public java.util.Map<java.lang.String,Facet> getFacets() throws RepositoryException
Returns the facets for this search result.- Returns:
- the facets for this search result.
- Throws:
RepositoryException
- if an error occurs while executing the query or calculating the facets.
-
getHits
public java.util.List<Search.Hit> getHits()
- Returns:
- a List of
Search.Hit
s to display on the result page.
-
-