SilverStripe\Elastica\ResultList
A list wrapper around the results from a query. Note that not all operations are implemented.
Synopsis
class ResultList
extends ViewableData
implements
SS_list
{
- // members
- private Index $service;
- private Query $query;
- private string $types = '';
- private array $filters = ;
- private ArrayList $aggregations;
- // methods
- public void __construct()
- public void __clone()
- public Index getService()
- public void setTypes()
- public Query getQuery()
- public ArrayList getAggregations()
- public array getResults()
- public void getTotalItems()
- public void getTotalTime()
- public void getIterator()
- public void limit()
- public array toArray()
- public void toArrayList()
- public void toNestedArray()
- public void first()
- public void last()
- public void map()
- public void column()
- public void each()
- public void count()
- public void offsetExists()
- public void offsetGet()
- public void offsetSet()
- public void offsetUnset()
- public void add()
- public void remove()
- public void find()
Hierarchy
Extends
- ViewableData
Implements
- SS_list
Tasks
Line | Task |
---|---|
385 | |
391 | Implement last() method |
Members
private
- $aggregations
—
SilverStripe\Elastica\ArrayList
An array list of aggregations from this search. -
$filters
Filters, i.e. selected aggregations, to apply to the search. - $query — \Elastica\Query
- $service — \Elastica\Index
- $types
—
string
List of types to search for, default (blank) returns all.
Methods
public
- __construct() — Create a search and then optionally tweak it. Actual search is only performed against Elasticsearch when the getResults() method is called.
- __clone()
- add()
- column()
- count()
- each()
- find()
- first()
- getAggregations() — Get the aggregation results for this query. Should only be called after $this->getResults() has been executed.
- getIterator()
- getQuery()
- getResults()
- getService()
- getTotalItems()
- getTotalTime()
- last()
- limit()
- map()
- offsetExists()
- offsetGet()
- offsetSet()
- offsetUnset()
- remove()
- setTypes() — Set a new list of types (SilverStripe classes) to search for.
- toArray() — Converts results of type {@link \Elastica\Result} into their respective {@link DataObject} counterparts.
- toArrayList()
- toNestedArray()