Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document the inexactness of --limit when searching #647

Open
dolsysmith opened this issue Jul 12, 2022 · 2 comments
Open

Document the inexactness of --limit when searching #647

dolsysmith opened this issue Jul 12, 2022 · 2 comments
Labels
good first issue Good for newcomers

Comments

@dolsysmith
Copy link

Running the following command yields 599 Tweets, not 500:

twarc2 search --limit 500 "blacklivesmatter" results.jsonl

Is that expected behavior? (Just wanting to confirm.)

@edsu
Copy link
Member

edsu commented Jul 12, 2022

That is the expected behavior yes. It could be documented better though :-)

@edsu edsu changed the title Inexact behavior with the --limit option Document the inexactness of --limit when searching Jul 12, 2022
@igorbrigadir
Copy link
Contributor

Yeah it's because the limit is counted after retrieval, so it pages through results, which by default are 100 max, but can get fewer from the API, so you can get: 99, 100, 100, 100, 100, and then because you're still on 499, which is less than 500, it will have to make 1 extra call and get another 100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants