Skip to content

Commit 6c7fa08

Browse files
committed
fix buildSearchQueryPayloadCollection: add body.aggs on result
1 parent 60616ea commit 6c7fa08

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ElasticEngine.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ public function buildSearchQueryPayloadCollection(Builder $builder, array $optio
136136
->setIfNotEmpty('body._source', $builder->select)
137137
->setIfNotEmpty('body.collapse.field', $builder->collapse)
138138
->setIfNotEmpty('body.sort', $builder->orders)
139+
->setIfNotEmpty('body.aggs', $builder->aggregates)
139140
->setIfNotEmpty('body.explain', $options['explain'] ?? null)
140141
->setIfNotEmpty('body.profile', $options['profile'] ?? null)
141142
->setIfNotNull('body.from', $builder->offset)

0 commit comments

Comments
 (0)