I have a script which stores incoming tweets for a phrase (e.g. "python") into database table "A" using twitter streaming api. Later, another script searches the same phrase using twitter search api and stores results into table "B". My question is why there are some tweets in "A" that are not in "B" and vice versa.
I can think of one reason to have tweets in "B" and not in "A":
"A" only contains tweets that are posted after streaming api started while search api returns results from the last week. If streaming api has been running for more than a week, then there must not any tweet in "B" that is not in "A".
I know two reasons to have some tweets in "A" and not in "B":
I'd like to make sure if I got it correct or not.
For "B" not in "A" you are correct. A big indication of that is from the Search API link you included:
It allows queries against the indices of recent or popular Tweets...
For "A" not in "B" you're correct as well but with minor mistakes.
Few others depending on your use https://dev.twitter.com/streaming/overview/messages-types