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

Fetching multiple documents from a single request #135

Open
flavioamieiro opened this issue Sep 21, 2015 · 5 comments
Open

Fetching multiple documents from a single request #135

flavioamieiro opened this issue Sep 21, 2015 · 5 comments

Comments

@flavioamieiro
Copy link
Member

This issue was opened by @fccoelho in NAMD/pypln.api#39 but I'm migrating it here because it implies a (big) change in the REST API itself.

"""
The overhead of making a request for each document one wants to download from a large corpus is too large to be acceptable. A batch download should be available which requires a single request. The set of documents could be returned as a tar-ball.

This issue supersedes NAMD/pypln.api#29
"""

@flavioamieiro
Copy link
Member Author

Honestly, I'm not really sure how to address this issue. I really think the biggest overhead in requests is the one addressed by #134. At first glance, I can't think of a clean way of having one endpoint for multiple entities in our REST api.

I would love @israelst 's opinion on this.

@israelst
Copy link
Contributor

Is It about url? I think it depends on the maximum amount of entities.

Some say that querystring is the solution for this: /resource?properties=property1,property2, property3
Google and Facebook do this way.

@flavioamieiro
Copy link
Member Author

@israelst actually, we are talking about getting multiple documents (not properties from a single document - this was implemented in #134).

Should we have an endpoint that allows you to get more than one entity at the same time? I think that, following what you said, it would look something like /documents?ids=1,2,3,65462 and return an array of documents.

@fccoelho
Copy link
Member

Independently of how it is done I think this end point should be at the
level of the corpus.

On Wed, Sep 23, 2015 at 11:46 AM, Flávio Amieiro [email protected]
wrote:

@israelst https://github.com/israelst actually, we are talking about
getting multiple documents (not properties from a single document - this
was implemented in #134 #134).

Should we have an endpoint that allows you to get more than one entity at
the same time? I think that, following what you said, it would look
something like /documents?ids=1,2,3,65462 and return an array of
documents.


Reply to this email directly or view it on GitHub
#135 (comment).

Flávio Codeço Coelho

+55(21) 3799-5551
Professor
Escola de Matemática Aplicada
Fundação Getulio Vargas
Praia de Botafogo, 190 sala 312
Rio de Janeiro - RJ
22250-900
Brasil

@israelst
Copy link
Contributor

I was thinking exactly on something like /documents?ids=1,2,3,65462.

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

3 participants