Skip to content

Commit 96ba319

Browse files
committed
Term aggregation fix
1 parent 2853f07 commit 96ba319

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎src/Aggregation/Term.php‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function __construct(
4646

4747
public function key() : string
4848
{
49-
return $this->key ?: $this->field;
49+
return $this->key ?? $this->field;
5050
}
5151

5252

@@ -62,9 +62,7 @@ public function toArray() : array
6262
}
6363

6464
return [
65-
$this->key => [
66-
'terms' => $array,
67-
],
65+
'terms' => $array,
6866
];
6967
}
7068

0 commit comments

Comments
 (0)