What shall I do if the PIT in ElasticSearch is expired?

223 Views Asked by At

I'm trying using the Point In Time API for pagination implementation and I got the exception message below while using an expired pit id:

pplication exception:  ResponseError: search_phase_execution_exception
    Root causes:
        search_context_missing_exception: No search context found for id [129]

It always happens if some users open my web page and try scroll the list after a long time, for example, he/she leaves the tablet and comes back after two hours.

My question is what shall I do while the pit id is expired? If the only thing I can do is that showing an error message on my web page?

1

There are 1 best solutions below

1
On

you would need to track where the user was with this request and then make a new one from that page, Elasticsearch cannot handle this for you though