I'm creating a histogram and running into issues where extended_bounds
is pulling back a lot more buckets than it should. The upper and low bounds of the histogram can vary dramatically in my plugin and the interval size is set dynamically to give me 500 buckets in my histogram. In an example, I'm pulling back buckets where the histogram is between 1080 and 1100 with an interval of 0.04. This request is pulling back 5,100 buckets instead of 500 because it returns buckets from 960-1164 instead of 1080-1100. I found the hard_bounds
option that has been added to Elasticsearch. While adding this does return buckets in the correct range, it does not seem to obey the min_doc_count=0
command. I'm expecting it to return 500 buckets even if there are not documents to return. While using the hard_bounds
option, it will not return any buckets instead of returning 500 empty buckets. Is there a work around for this?
It appears I am able to use both the extended_bounds
and the hard_bounds
on the same histogram request. I was not aware of this. Adding both parameters to my histogram allows me to pull back buckets with zero documents and also only the requested range.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.