Hello again,
When using PIT with a sort clause, the response does not include the sort array in hits. Because of this, we cannot retrieve the last sort value to use in search_after.
Sample:
POST /siren/post/_pit?keep_alive=10m
POST /siren/post/_search
{
"_source": ["user_id", "created_at"],
"size": 2,
"track_total_hits": false,
"pit": {
"id": "THE_PIT_ID"
},
"query": {
"bool": {
"filter": [
{ "term": { "user_id": "123" } },
{
"join": {
"indices": ["comment"],
"on": ["comment.id", "id"],
"request": { "query": { "match_all": {} } }
}
}
]
}
},
"sort": [
{ "_id": "asc" }
]
}
Read and tried things in this documentation link
Thanks