Class Search.Result

java.lang.Object
com.day.cq.wcm.foundation.Search.Result
Enclosing class:
Search

public final class Search.Result extends Object
A search result.
  • Method Details

    • getResultPages

      public List<Search.Page> getResultPages() throws RepositoryException
      Returns:
      a List of Search.Pagees 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 String getTrackerScript()
      Returns:
      the script for query and result tracking.
    • getSpellcheck

      public 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 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 Map<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 List<Search.Hit> getHits()
      Returns:
      a List of Search.Hits to display on the result page.