Open tsullivan opened 1 week ago
If the sort field is absent from some of the indices, the value of the search_after field may automatically become 9223372036854776000
This has come up in an Elasticsearch issue that has a comment with some context: https://github.com/elastic/elasticsearch/issues/73772#issuecomment-854756782. Presumably, the bug is that the JSON parser is rounding a different value into 9223372036854776000
.
Pinging @elastic/appex-sharedux (Team:SharedUX)
There is a workaround for this issue:
- Search the data in Discover and sort by the timestamp field
This bug only happens when users try to sort by a field that has sparse values. To avoid the issue: users should not sort the data in Discover by a field that has sparse values, or just not select any field to sort by.
Description
CSV Export uses a point-in-time context to page through the data needed to export. When retrieving any page of data after the first page, the export mechanism adds a
search_after
field to the query, which is set to the last sort value from the previous page of results.If the sort field is absent from some of the indices, the value of the
search_after
field may automatically become9223372036854776000
. Using this value in thesearch_after
field causes Elasticsearch to return an error:Steps to reproduce
xpack.reporting.csv.scroll.size: 1
Use test data with a sparse timestamp field:
test
that does NOT use a time field.Result:
search_after
worked)