| 1 | <?php |
||
| 7 | class ElasticsearchCollection extends Collection |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Elasticsearch response. |
||
| 11 | * |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | protected $response = []; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Put response. |
||
| 18 | * |
||
| 19 | * @param array $response |
||
| 20 | */ |
||
| 21 | public function response(array $response) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return int |
||
| 29 | */ |
||
| 30 | public function getTook() |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return bool |
||
| 37 | */ |
||
| 38 | public function isTimedOut() |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return int |
||
| 45 | */ |
||
| 46 | public function getTotal() |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return int |
||
| 53 | */ |
||
| 54 | public function getMaxScore() |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @return array |
||
| 61 | */ |
||
| 62 | public function getShards() |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @param string $name |
||
| 69 | * @return array |
||
| 70 | */ |
||
| 71 | public function getAggregation($name) |
||
| 75 | } |