Skip to content

No way to request a batch? #13

Open
@JBGruber

Description

@JBGruber

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'])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions