You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.
PSAW uses desc sort when making queries involving time intervals and uses last record in the previous request to set the next 'before' value for paging. However because the 'before' and 'after' values are not inclusive in Pushshift, if multiple records with same timestamp occur on the temporal boundaries of the paging requests there will be missing records in the retrieved results. Switching to asc sort will also produce missing records for the same reasons albeit different ones.
Example:
start = 1527811200
end = 1559347200
gen = api.search_comments(after=start, before=end,
subreddit='jobs', aggs='subreddit')
next(gen)
The max results per request has been changed from 500 to 1000 since you asked this. Probably resolves your specific problem, but I'm gonna leave this open for now because I think the edge case that produced your issue is still a vulnerability that hasn't been fully addressed.
PSAW uses desc sort when making queries involving time intervals and uses last record in the previous request to set the next 'before' value for paging. However because the 'before' and 'after' values are not inclusive in Pushshift, if multiple records with same timestamp occur on the temporal boundaries of the paging requests there will be missing records in the retrieved results. Switching to asc sort will also produce missing records for the same reasons albeit different ones.
Example:
Output:
{'subreddit': [{'doc_count': 353029, 'key': 'jobs'}]}
There should be 353029 records, however when the data is retrieved there are only 353024.
Output:
353024
This discrepancy happens even though all shards are up, in fact if they weren't aggs would be reporting a different value.
(Please note at the moment of writing this 4 shards are down so the test cannot be performed until that is fixed)
Quick check if all shards are up on this data range
The text was updated successfully, but these errors were encountered: