-
-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for interval
field for Date histogram
#2037
Comments
@PSeitz Can you take care of this? We can also discuss long term plans to ditch the JSON representation of aggregations in tantivy, and just have agregation definition "objects" in there. We would then have a JSON -> Aggregation definition object translation layer in quickwit instead. |
Elastic search 7.2:
Mapping Elastic search and OpenSearch should not be mixed in the same API endpoint, if they are not compatible, which seems to be the the case for date histogram. So I think we need an explicit OpenSearch endpoint in quickwit. We don't need separate structs, it could be just a union which then gets validated for elastic search or open search compatibility. As of now, I don't think we gain something by ditching the JSON representation of aggregations in tantivy, but it would cause a lot of code duplication. |
oh yes sorry for my lack of accuracy, @PSeitz you indeed mentioned the solution of having a dedicated endpoint for OpenSearch.
Agreed. But we only need to handle fixed intervals in
Looking at the history of Elasticsearch, I don't see this as an incompatibility but as a support for older elasticsearch version. And when I look at this opensearch issue I would expect them to remove the interval support in the future (though it can take some time). I think it's overkill to distinguish OpenSearch and Elasticsearch API just for this |
@PSeitz Just to confirm that I did not find other queries with an API difference between Elasticsearch en OpenSearch for the I had a look at the following queries: |
@PSeitz do you need more info on your side? |
Looking at the OpenSearch docs, it's unclear if they handle calendar aware intervals or not. |
For |
|
you mean |
So we could implement the interval halfway, only for values higher than 1. I think it would be better if airmail could call the new API. |
Ok, I have just understood how this was broken before... I thought the issue was only on |
As described in quickwit-oss/quickwit#3250, we need to support the OpenSearch API too...
To reach that for the date histogram, we need to support the
interval
field in addition to thefixed_interval
field (there is acalendar_interval
field but we don't support it yet).We discussed this issue with @PSeitz, we have 2 ways of doing it:
interval
on theDateHistogramAggregationReq
and adding some validation/preprocessing so that we:interval
andfixed_interval
orinterval
andcalendar_interval
are presentinterval
is present, use it to populatefixed_interval
as we only supportfixed_interval
for now.The text was updated successfully, but these errors were encountered: