File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ function (array $response) {
6666
6767 public function paginate (int $ size , int $ offset = 0 ): Page |Promise
6868 {
69- Assert::greaterThan ($ size , 0 );
69+ Assert::greaterThanEq ($ size , 0 );
7070 Assert::greaterThanEq ($ offset , 0 );
7171
7272 return Response::fn (
@@ -87,7 +87,7 @@ function (array $response) use ($size, $offset) {
8787
8888 public function cursorPaginate (int $ size , ?string $ cursor = null ): CursorPage |Promise
8989 {
90- Assert::greaterThan ($ size , 0 );
90+ Assert::greaterThanEq ($ size , 0 );
9191
9292 $ sorts = $ this ->sorts ->withTiebreaker ($ this ->index ->tiebreaker ());
9393 $ current = Cursor::decode ($ cursor ) ?? Cursor::BOF ();
@@ -180,7 +180,7 @@ protected function execute(
180180 $ dsl ['search_after ' ] = $ cursor ->toDSL ();
181181 }
182182
183- return $ this ->index ->search (array_filter ($ dsl ), $ this ->searchType );
183+ return $ this ->index ->search (array_filter ($ dsl, fn ( mixed $ v ) => ! is_null ( $ v ) ), $ this ->searchType );
184184 }
185185
186186 protected function sourceToDSL (bool $ source ): array | bool
You can’t perform that action at this time.
0 commit comments