@@ 234-243 (lines=10) @@ | ||
231 | * |
|
232 | * @return DocumentIterator |
|
233 | */ |
|
234 | public function findDocuments(Search $search) |
|
235 | { |
|
236 | $results = $this->executeSearch($search); |
|
237 | ||
238 | return new DocumentIterator( |
|
239 | $results, |
|
240 | $this->getManager(), |
|
241 | $this->getScrollConfiguration($results, $search->getScroll()) |
|
242 | ); |
|
243 | } |
|
244 | ||
245 | ||
246 | /** |
|
@@ 253-262 (lines=10) @@ | ||
250 | * |
|
251 | * @return ArrayIterator |
|
252 | */ |
|
253 | public function findArray(Search $search) |
|
254 | { |
|
255 | $results = $this->executeSearch($search); |
|
256 | ||
257 | return new ArrayIterator( |
|
258 | $results, |
|
259 | $this->getManager(), |
|
260 | $this->getScrollConfiguration($results, $search->getScroll()) |
|
261 | ); |
|
262 | } |
|
263 | ||
264 | /** |
|
265 | * Returns RawIterator with access to node with all returned values included. |
|
@@ 271-280 (lines=10) @@ | ||
268 | * |
|
269 | * @return RawIterator |
|
270 | */ |
|
271 | public function findRaw(Search $search) |
|
272 | { |
|
273 | $results = $this->executeSearch($search); |
|
274 | ||
275 | return new RawIterator( |
|
276 | $results, |
|
277 | $this->getManager(), |
|
278 | $this->getScrollConfiguration($results, $search->getScroll()) |
|
279 | ); |
|
280 | } |
|
281 | ||
282 | /** |
|
283 | * Executes search to the elasticsearch and returns raw response. |