Class CmsSolrResultList

All Implemented Interfaces:
Serializable, Cloneable, Iterable<CmsSearchResource>, Collection<CmsSearchResource>, List<CmsSearchResource>, RandomAccess

Encapsulates a list of 'OpenCms resource documents' (CmsSearchResource).

This list can be accessed exactly like an ArrayList which entries are CmsSearchResource that extend CmsResource and holds the Solr implementation of I_CmsSearchDocument as member. This enables you to deal with the resulting list as you do with well known List and work on it's entries like you do on CmsResource.

Since:
8.5.0
See Also:
  • Constructor Details

    • CmsSolrResultList

      public CmsSolrResultList(org.apache.solr.client.solrj.SolrQuery query, org.apache.solr.client.solrj.response.QueryResponse queryResponse, org.apache.solr.common.SolrDocumentList resultDocuments, List<CmsSearchResource> resourceDocumentList, int start, Integer rows, int end, int page, long visibleHitCount, Float maxScore, long startTime, long highlightEndTime)
      The public constructor.

      Parameters:
      query - original Solr query
      queryResponse - original query response
      resultDocuments - original list of Solr documents
      resourceDocumentList - the list of resource documents
      start - the start (offset)
      rows - the rows (hits per page)
      end - the end (start + rows)
      page - the current page (start / rows)
      visibleHitCount - the visible hit count
      maxScore - the max score of the best matching doc
      startTime - the start time when the query has been executed
      highlightEndTime - the time in ms when the highlighting is finished
  • Method Details

    • getEnd

      public int getEnd()
      Returns the last index of documents to display.

      Returns:
      the last index of documents to display
    • getFacetDate

      public org.apache.solr.client.solrj.response.FacetField getFacetDate(String name)
      Delegator.

      Parameters:
      name - the name
      Returns:
      the facet field
    • getFacetDates

      public List<org.apache.solr.client.solrj.response.FacetField> getFacetDates()
      Delegator.

      Returns:
      the list of faceted date fields
    • getFacetField

      public org.apache.solr.client.solrj.response.FacetField getFacetField(String name)
      Delegator.

      Parameters:
      name - the name
      Returns:
      the facet field
    • getFacetFields

      public List<org.apache.solr.client.solrj.response.FacetField> getFacetFields()
      Delegator.

      Returns:
      the list of faceted fields
    • getFacetQuery

      Delegator.

      Returns:
      the facet query
    • getFacetRanges

      public List<org.apache.solr.client.solrj.response.RangeFacet> getFacetRanges()
      Delegator.

      Returns:
      the list of facet ranges
    • getHighlightEndTime

      public long getHighlightEndTime()
      Returns the time in ms when the highlighting is finished.

      Returns:
      the time in ms when the highlighting is finished
    • getHighLighting

      Returns the highlighting information.

      Returns:
      the highlighting information
    • getLimitingFacets

      public List<org.apache.solr.client.solrj.response.FacetField> getLimitingFacets()
      Delegator.

      Returns:
      the limiting facets
    • getMaxScore

      public Float getMaxScore()
      Returns the score of the best matching document.

      Returns:
      the score of the best matching document
    • getNumFound

      public long getNumFound()
      Returns the count of docs that have been found.

      Returns:
      the count of docs that have been found
    • getPage

      public int getPage()
      Returns the current page.

      Returns:
      the current page
    • getQuery

      public org.apache.solr.client.solrj.SolrQuery getQuery()
      The original Solr query.

      Returns:
      the query
    • getRows

      public Integer getRows()
      Returns the requested row count.

      Returns:
      the rows
    • getSpellCheckResponse

      public org.apache.solr.client.solrj.response.SpellCheckResponse getSpellCheckResponse()
      Delegator.

      Returns:
      the spellcheck response
    • getStart

      public Long getStart()
      Returns the start index (offset).

      Returns:
      the start
    • getStartTime

      public long getStartTime()
      Returns the start time.

      Returns:
      the start time
    • getVisibleHitCount

      public long getVisibleHitCount()
      Returns the visible hit count.

      Returns:
      the visible count of documents