@@ -13,11 +13,17 @@ |
||
| 13 | 13 | $this->hits = Arr::get($response, 'inner_hits', []); |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | + /** |
|
| 17 | + * @param string $parentType |
|
| 18 | + */ |
|
| 16 | 19 | public function getParentId($parentType) |
| 17 | 20 | { |
| 18 | 21 | return Arr::get($this->hits, $parentType . '.hits.hits.0._id'); |
| 19 | 22 | } |
| 20 | 23 | |
| 24 | + /** |
|
| 25 | + * @param string $parentType |
|
| 26 | + */ |
|
| 21 | 27 | public function getParent($parentType) |
| 22 | 28 | { |
| 23 | 29 | return Arr::get($this->hits, $parentType . '.hits.hits.0._source'); |