Hello,
I have nodejs/typescipt function that I would like to get the aggregations. buckets result. However, I get the error Property 'buckets' does not exist on type 'AggregationsCardinalityAggregate'.
The basic code is console.log(res?.aggregations?.unique_val.buckets) which throws the error. I am able get the object using console.log(res?.aggregations?.unique_val)
can you please let me know why I cannot get any of key/val day within the aggregations?.unique_val object. Here is result json from the search
You're looking for res?.aggregations?.unique_val but your response clearly shows res?.aggregations?.unique_industries. Is that a typo, or could that be your underlying issue?
Hello, I have nodejs/typescipt function that I would like to get the aggregations. buckets result. However, I get the error Property 'buckets' does not exist on type 'AggregationsCardinalityAggregate'.
The basic code is console.log(res?.aggregations?.unique_val.buckets) which throws the error. I am able get the object using console.log(res?.aggregations?.unique_val)
can you please let me know why I cannot get any of key/val day within the aggregations?.unique_val object. Here is result json from the search
Your Environment
@elastic/elasticsearch
version: 8.11.1