@@ 221-230 (lines=10) @@ | ||
218 | * |
|
219 | * @return DocumentIterator |
|
220 | */ |
|
221 | public function findDocuments(Search $search) |
|
222 | { |
|
223 | $results = $this->executeSearch($search); |
|
224 | ||
225 | return new DocumentIterator( |
|
226 | $results, |
|
227 | $this->getManager(), |
|
228 | $this->getScrollConfiguration($results, $search->getScroll()) |
|
229 | ); |
|
230 | } |
|
231 | ||
232 | ||
233 | /** |
|
@@ 240-249 (lines=10) @@ | ||
237 | * |
|
238 | * @return ArrayIterator |
|
239 | */ |
|
240 | public function findArray(Search $search) |
|
241 | { |
|
242 | $results = $this->executeSearch($search); |
|
243 | ||
244 | return new ArrayIterator( |
|
245 | $results, |
|
246 | $this->getManager(), |
|
247 | $this->getScrollConfiguration($results, $search->getScroll()) |
|
248 | ); |
|
249 | } |
|
250 | ||
251 | /** |
|
252 | * Returns RawIterator with access to node with all returned values included. |
|
@@ 258-267 (lines=10) @@ | ||
255 | * |
|
256 | * @return RawIterator |
|
257 | */ |
|
258 | public function findRaw(Search $search) |
|
259 | { |
|
260 | $results = $this->executeSearch($search); |
|
261 | ||
262 | return new RawIterator( |
|
263 | $results, |
|
264 | $this->getManager(), |
|
265 | $this->getScrollConfiguration($results, $search->getScroll()) |
|
266 | ); |
|
267 | } |
|
268 | ||
269 | /** |
|
270 | * Executes search to the elasticsearch and returns raw response. |