Hi,
From my experience I would say that the Search API of Twitter is not reliable.
You just gave an example but there are many others that slipped out of my mind since I last played with it.
The problem is that it is the only solution you have on Twitter to get back to previous tweets published.
Another solution you could use is to have a fallback stream installed on another computer and using another account, but the complexity of such solution is a bit higher.
Also, you need to consider something else:
The streaming API push the Tweets approximately in the history order, such as you can receive the following ids order:
1, 2, 4, 3, STREAM_STOPPED
With such case, the solution I provided will not work for you because it will perform the search with a sinceId of 3.
It means that the tweet with Id 4 that you already retrieved will be part of the search result set.
Consequently, you need to store the 10 last ids you retrieved and ensure during the recovery stage that you do not push these ids into the queue.
Are my explanations clear enough?
Linvi
From my experience I would say that the Search API of Twitter is not reliable.
You just gave an example but there are many others that slipped out of my mind since I last played with it.
The problem is that it is the only solution you have on Twitter to get back to previous tweets published.
Another solution you could use is to have a fallback stream installed on another computer and using another account, but the complexity of such solution is a bit higher.
Also, you need to consider something else:
The streaming API push the Tweets approximately in the history order, such as you can receive the following ids order:
1, 2, 4, 3, STREAM_STOPPED
With such case, the solution I provided will not work for you because it will perform the search with a sinceId of 3.
It means that the tweet with Id 4 that you already retrieved will be part of the search result set.
Consequently, you need to store the 10 last ids you retrieved and ensure during the recovery stage that you do not push these ids into the queue.
Are my explanations clear enough?
Linvi