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

No way to request a batch? #13

Open
JBGruber opened this issue Dec 21, 2023 · 0 comments
Open

No way to request a batch? #13

JBGruber opened this issue Dec 21, 2023 · 0 comments

Comments

@JBGruber
Copy link
Member

Looks like to get a batch of say 1000 documents, one needs to go through _post directly, as there is no way to stop query() or documents(), once they start pulling results:

amcat = AmcatClient("http://localhost/amcat")
body = dict(queries="test", 
            fields=["_id", "text"],
            page=0, 
            per_page=10)
res = amcat._post("query", index="state_of_the_union", json=body, ignore_status=[404]).json()  
len(res['results'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant