Package org.opencms.search.solr
Class CmsSolrResultList
java.lang.Object
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<CmsSearchResource>,Collection<CmsSearchResource>,List<CmsSearchResource>,RandomAccess,SequencedCollection<CmsSearchResource>
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
ConstructorsConstructorDescriptionCmsSolrResultList(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 TypeMethodDescriptionintgetEnd()Returns the last index of documents to display.org.apache.solr.client.solrj.response.FacetFieldgetFacetDate(String name) Delegator.List<org.apache.solr.client.solrj.response.FacetField> Delegator.org.apache.solr.client.solrj.response.FacetFieldgetFacetField(String name) Delegator.List<org.apache.solr.client.solrj.response.FacetField> Delegator.Delegator.List<org.apache.solr.client.solrj.response.RangeFacet> Delegator.longReturns 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.longReturns the count of docs that have been found.intgetPage()Returns the current page.org.apache.solr.client.solrj.SolrQuerygetQuery()The original Solr query.getRows()Returns the requested row count.org.apache.solr.client.solrj.response.SpellCheckResponseDelegator.getStart()Returns the start index (offset).longReturns the start time.longReturns the visible hit count.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
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
-