Closed
Description
Similar issue from #5007
NEST/Elasticsearch.Net version:
7.17
Elasticsearch version:
8.10 / 8.15
.NET runtime version:
8
Operating system version:
Windows 11
Description of the problem including expected versus actual behavior:
A clear and concise description of what the bug is.
"message": "An error has occurred.",
"exceptionMessage": "expected:'Number Token', actual:'\"NaN\"', at offset:179002",
"exceptionType": "Elasticsearch.Net.UnexpectedElasticsearchClientException",
Steps to reproduce:
- One field, which is mapped as double, more than 1 data but values are all 1
- While querying aggregation with MatrixStats, skewness and kurtosis is "NaN", which is right calculation but got the exception while creating a response
- Seems Extended Stats are patched but not MatrixStats
var searchResponse = await _Nest.SearchAsync<Document>(s => s
.Index(indexName)
.Size(0)
.Query(_ => queryContainer)
.Aggregations(a => a
.MatrixStats("matrix_stats", m => m
.Field(new[] { field })
)
.ExtendedStats("extended_stats", e => e
.Field(field)
)
.Percentiles("percentiles", p => p
.Field(field)
.Percents(5.0, 25.0, 50.0, 75.0, 95.0)
)
.Missing("missing", m => m
.Field(field)
)
)
.TrackTotalHits()
);
Expected behavior
A clear and concise description of what you expected to happen.
SearchApi shouldn't be failed while returns query
Provide ConnectionSettings
(if relevant):
Provide DebugInformation
(if relevant):