Skip to content

Commit 2e01081

Browse files
committed
BUGFIX: Set default clauseType to "must"
1 parent e95c4fd commit 2e01081

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Classes/Eel/ElasticSearchQueryBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ public function fulltext(string $searchWord, array $options = []): QueryBuilderI
692692
* @return $this|QueryBuilderInterface
693693
* @throws QueryBuildingException
694694
*/
695-
public function prefix(string $propertyName, string $prefix, string $clauseType): QueryBuilderInterface
695+
public function prefix(string $propertyName, string $prefix, string $clauseType = 'must'): QueryBuilderInterface
696696
{
697697
$this->request->queryFilter('prefix', [$propertyName => $prefix], $clauseType);
698698

@@ -709,9 +709,9 @@ public function prefix(string $propertyName, string $prefix, string $clauseType)
709709
* @return QueryBuilderInterface
710710
* @throws QueryBuildingException
711711
*/
712-
public function geoDistance(string $propertyName, $geoPoint, string $distance, string $clauseType): QueryBuilderInterface
712+
public function geoDistance(string $propertyName, $geoPoint, string $distance, string $clauseType = 'must'): QueryBuilderInterface
713713
{
714-
$this->queryFilter('geo_distance',[
714+
$this->queryFilter('geo_distance', [
715715
'distance' => $distance,
716716
$propertyName => $geoPoint,
717717
], $clauseType);

0 commit comments

Comments
 (0)