Skip to content

Commit 06be8a5

Browse files
committed
Range buckets have from and to
1 parent 6505cbd commit 06be8a5

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/Response/Result/Aggregation/Bucket.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,30 @@ class Bucket
1919
*/
2020
private $position;
2121

22+
/**
23+
* @var int|float|null
24+
*/
25+
private $from;
26+
27+
/**
28+
* @var int|float|null
29+
*/
30+
private $to;
31+
2232

2333
public function __construct(
2434
$key
2535
, int $docCount
2636
, ?int $position = NULL
37+
, $from = NULL
38+
, $to = NULL
2739
)
2840
{
2941
$this->key = $key;
3042
$this->docCount = $docCount;
3143
$this->position = $position;
44+
$this->from = $from;
45+
$this->to = $to;
3246
}
3347

3448

@@ -49,4 +63,16 @@ public function position() : ?int
4963
return $this->position;
5064
}
5165

66+
67+
public function from()
68+
{
69+
return $this->from;
70+
}
71+
72+
73+
public function to()
74+
{
75+
return $this->to;
76+
}
77+
5278
}

0 commit comments

Comments
 (0)