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