Package org.opencms.search.solr
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:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorDescriptionCmsSolrResultList
(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. -
Method Summary
Modifier and TypeMethodDescriptionint
getEnd()
Returns the last index of documents to display.org.apache.solr.client.solrj.response.FacetField
getFacetDate
(String name) Delegator.List<org.apache.solr.client.solrj.response.FacetField>
Delegator.org.apache.solr.client.solrj.response.FacetField
getFacetField
(String name) Delegator.List<org.apache.solr.client.solrj.response.FacetField>
Delegator.Delegator.List<org.apache.solr.client.solrj.response.RangeFacet>
Delegator.long
Returns the time in ms when the highlighting is finished.Returns the highlighting information.List<org.apache.solr.client.solrj.response.FacetField>
Delegator.Returns the score of the best matching document.long
Returns the count of docs that have been found.int
getPage()
Returns the current page.org.apache.solr.client.solrj.SolrQuery
getQuery()
The original Solr query.getRows()
Returns the requested row count.org.apache.solr.client.solrj.response.SpellCheckResponse
Delegator.getStart()
Returns the start index (offset).long
Returns the start time.long
Returns the visible hit count.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
containsAll
-
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 queryqueryResponse
- original query responseresultDocuments
- original list of Solr documentsresourceDocumentList
- the list of resource documentsstart
- the start (offset)rows
- the rows (hits per page)end
- the end (start + rows)page
- the current page (start / rows)visibleHitCount
- the visible hit countmaxScore
- the max score of the best matching docstartTime
- the start time when the query has been executedhighlightEndTime
- the time in ms when the highlighting is finished
-
-
Method Details
-
getEnd
Returns the last index of documents to display.- Returns:
- the last index of documents to display
-
getFacetDate
Delegator.- Parameters:
name
- the name- Returns:
- the facet field
-
getFacetDates
Delegator.- Returns:
- the list of faceted date fields
-
getFacetField
Delegator.- Parameters:
name
- the name- Returns:
- the facet field
-
getFacetFields
Delegator.- Returns:
- the list of faceted fields
-
getFacetQuery
Delegator.- Returns:
- the facet query
-
getFacetRanges
Delegator.- Returns:
- the list of facet ranges
-
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
Delegator.- Returns:
- the limiting facets
-
getMaxScore
Returns the score of the best matching document.- Returns:
- the score of the best matching document
-
getNumFound
Returns the count of docs that have been found.- Returns:
- the count of docs that have been found
-
getPage
Returns the current page.- Returns:
- the current page
-
getQuery
The original Solr query.- Returns:
- the query
-
getRows
Returns the requested row count.- Returns:
- the rows
-
getSpellCheckResponse
Delegator.- Returns:
- the spellcheck response
-
getStart
Returns the start index (offset).- Returns:
- the start
-
getStartTime
Returns the start time.- Returns:
- the start time
-
getVisibleHitCount
Returns the visible hit count.- Returns:
- the visible count of documents
-