| @@ 253-262 (lines=10) @@ | ||
| 250 | * |
|
| 251 | * @return DocumentIterator |
|
| 252 | */ |
|
| 253 | public function findDocuments(Search $search) |
|
| 254 | { |
|
| 255 | $results = $this->executeSearch($search); |
|
| 256 | ||
| 257 | return new DocumentIterator( |
|
| 258 | $results, |
|
| 259 | $this->getManager(), |
|
| 260 | $this->getScrollConfiguration($results, $search->getScroll()) |
|
| 261 | ); |
|
| 262 | } |
|
| 263 | ||
| 264 | ||
| 265 | /** |
|
| @@ 272-281 (lines=10) @@ | ||
| 269 | * |
|
| 270 | * @return ArrayIterator |
|
| 271 | */ |
|
| 272 | public function findArray(Search $search) |
|
| 273 | { |
|
| 274 | $results = $this->executeSearch($search); |
|
| 275 | ||
| 276 | return new ArrayIterator( |
|
| 277 | $results, |
|
| 278 | $this->getManager(), |
|
| 279 | $this->getScrollConfiguration($results, $search->getScroll()) |
|
| 280 | ); |
|
| 281 | } |
|
| 282 | ||
| 283 | /** |
|
| 284 | * Returns RawIterator with access to node with all returned values included. |
|
| @@ 290-299 (lines=10) @@ | ||
| 287 | * |
|
| 288 | * @return RawIterator |
|
| 289 | */ |
|
| 290 | public function findRaw(Search $search) |
|
| 291 | { |
|
| 292 | $results = $this->executeSearch($search); |
|
| 293 | ||
| 294 | return new RawIterator( |
|
| 295 | $results, |
|
| 296 | $this->getManager(), |
|
| 297 | $this->getScrollConfiguration($results, $search->getScroll()) |
|
| 298 | ); |
|
| 299 | } |
|
| 300 | ||
| 301 | /** |
|
| 302 | * Executes search to the elasticsearch and returns raw response. |
|