We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e080067 commit 2efb9c2Copy full SHA for 2efb9c2
1 file changed
plugins/OpenSearch/v1/dataStreams/scripts/search.js
@@ -1,4 +1,4 @@
1
-if (data.aggregations && data.aggregations.length > 0) {
+if (data.aggregations && Object.keys(data.aggregations).length > 0) {
2
3
const agg = data.aggregations[Object.keys(data.aggregations).at(-1)]; // last aggregation to support pipelining
4
0 commit comments