Skip to content

Commit fe60db5

Browse files
authored
InnerHits fix
1 parent fb3d14e commit fe60db5

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/Search/Collapsing/InnerHits.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ class InnerHits implements DSLAware
1111
public function __construct(
1212
protected string $name,
1313
protected int $size,
14-
protected ?Sort $sort,
15-
protected array $sorts = [],
14+
protected Sort|SortCollection|null $sort,
1615
) {
1716
Assert::stringNotEmpty(trim($name));
1817
}
@@ -28,13 +27,6 @@ public function toDSL(): array
2827
$dsl['sort'] = $this->sort->toDSL();
2928
}
3029

31-
if ($this->sorts) {
32-
$dsl['sort'] = [];
33-
foreach ($this->sorts as $sort) {
34-
$dsl['sort'][] = $sort->toDSL();
35-
}
36-
}
37-
3830
return $dsl;
3931
}
4032
}

0 commit comments

Comments
 (0)