Skip to content

Commit 5583902

Browse files
authored
Merge pull request #7 from alexkovt/feature/scroll
rollback last changes
2 parents 3f05385 + c73f917 commit 5583902

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/ElasticEngine.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,12 @@ public function searchRaw(Model $model, $query)
284284
*
285285
* @param \Illuminate\Database\Eloquent\Model $model
286286
* @param $query
287-
* @param int|null $size
288-
* @param string|null $scroll
287+
* @param $size
288+
* @param $scroll
289289
* @return mixed
290290
* @throws \Exception
291291
*/
292-
public function searchRawWithScroll(Model $model, $query, $size = 10000, $scroll = '1m')
292+
public function searchRawWithScroll(Model $model, $query, int $size = 10000, string $scroll = '1m')
293293
{
294294
$payload = (new TypePayload($model))
295295
->setIfNotEmpty('body', $query)
@@ -305,10 +305,10 @@ public function searchRawWithScroll(Model $model, $query, $size = 10000, $scroll
305305
* Make a scroll.
306306
*
307307
* @param $scroll_id
308-
* @param string|null $scroll
308+
* @param $scroll
309309
* @return mixed
310310
*/
311-
public function scroll(string $scroll_id, $scroll = '1m')
311+
public function scroll(string $scroll_id, string $scroll = '1m')
312312
{
313313
return ElasticClient::scroll([
314314
'scroll' => $scroll,

src/Searchable.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ public static function searchRaw(array $query)
141141
* Execute a raw search with scroll.
142142
*
143143
* @param $query
144-
* @param int|null $size
145-
* @param string|null $scroll
144+
* @param $size
145+
* @param $scroll
146146
* @return array
147147
*/
148-
public static function searchRawWithScroll(array $query, $size = 10000, $scroll = '1m')
148+
public static function searchRawWithScroll(array $query, int $size = 10000, string $scroll = '1m')
149149
{
150150
$model = new static();
151151

@@ -157,10 +157,10 @@ public static function searchRawWithScroll(array $query, $size = 10000, $scroll
157157
* Execute a scroll search.
158158
*
159159
* @param $scroll_id
160-
* @param string|null $scroll
160+
* @param $scroll
161161
* @return array
162162
*/
163-
public static function scroll(string $scroll_id, $scroll = '1m')
163+
public static function scroll(string $scroll_id, string $scroll = '1m')
164164
{
165165
$model = new static();
166166

0 commit comments

Comments
 (0)