\SolrResultSet
A Solr result set that provides access to results of a solr query, either as a data object set, or as more specific solr items
- Author: Marcus Nyeholt <marcus@silverstripe.com.au>
- License: http://silverstripe.org/bsd-license/
Synopsis
class SolrResultSet
{
- // members
- public static array $solr_attrs = ;
- protected String $luceneQuery;
- protected SolrSearchService $solr;
- protected String $response;
- protected StdClass $result;
- protected DataObjectSet $dataObjects;
- protected StdClass $queryParameters;
- protected Int $totalResults;
- protected $returnedFacets;
- // methods
- public void __construct()
- public void getErrors()
- public String getLuceneQuery()
- public void getQueryParameters()
- public void getResult()
- public Int getTotalResults()
- public DataObjectSet getDataObjects()
- protected void inflateRawResult()
- public array getFacets()
- public Int getTimeTaken()
Members
protected
- $dataObjects
—
DataObjectSet
The list of data objects that is represented by this search result set - $luceneQuery
—
String
The raw lucene query issued to solr - $queryParameters
—
StdClass
The query parameters that were used for the query - $response
—
String
The raw result from Solr - $result
—
StdClass
The actual decoded search result - $returnedFacets
- $solr — SolrSearchService
- $totalResults
—
Int
The total number of results found in this query
public
-
$solr_attrs
A list of solr field type suffixes to look for and swap out
Methods
protected
- inflateRawResult() — Inflate a raw result into an object of a particular type
public
- __construct() — Create a new result set object
- getDataObjects() — Return all the dataobjects that were found in this query
- getErrors()
- getFacets() — Gets the details about facets found in this query
- getLuceneQuery()
- getQueryParameters() — Get all the parameters used in this query
- getResult() — Gets the raw result set as an object graph.
- getTimeTaken() — Gets the query's elapsed time.
- getTotalResults() — The number of results found for the given parameters.