-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support for Elasticsearch 6.3 "missing" in Composite Aggregation #3540
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
Comments
Relates elastic/elasticsearch#29465
@hanswieheiri would sending a query with the low level client, and returning a high level response work in the meantime? var searchResponse = client.LowLevel.Search<SearchResponse<MyDocument>>("index", "type",
PostData.Serializable(new
{
aggs = new {
my_buckets = new {
composite = new {
sources = new[] {
new {
product = new {
terms = new {
field = "product",
missing = "my_missing_value"
}
}
}
}
}
}
}
})); which would serialize to {
"aggs": {
"my_buckets": {
"composite": {
"sources": [
{
"product": {
"terms": {
"field": "product",
"missing": "my_missing_value"
}
}
}
]
}
}
}
} |
Hi @russcam I agree it's not quite the same. Using the low level client kind of makes sense but I have a complicated logic in my "query". I.e. I would have to rebuild a lot! Is it maybe possible to modify the JSON string before its sent to Elastic? |
I'm OK with adding |
In the meantime I wrapped The wrapper I injected in Ugly but it works for now. |
We'll look to add this in for the 6.6.0 release @hanswieheiri |
Closing this; will be in the next release, |
NEST/Elasticsearch.Net version: 6.4.1
Elasticsearch version: 6.3.0
Description of the problem including expected versus actual behavior:
I am using
ICompositeAggregationSource
where the fieldmissing_bucket
was newly added (that's compatible with Elasticsearch version 6.4.0). In 6.3.0 that field was calledmissing
.Is there a way to force serialization that would serialize
bool? MissingBucket { get; set; }
asmissing
instead ofmissing_bucket
.Thanks for your help.
The text was updated successfully, but these errors were encountered: