I am writing a python program which will query elasticsearch index . I am using a match all query in the while loop which looks for the new documents . First problem is that I always get all the documents every time I query however I am only interested in the new documents since the last query .
Is there a way I can only read new documents instead of running while loopAlso is there a way where elasticsearch can alert that it has received new documents since the last query . I can then query only new documents