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

Use source_excludes in docs_get #246

Closed
Jensxy opened this issue Mar 10, 2019 · 3 comments
Closed

Use source_excludes in docs_get #246

Jensxy opened this issue Mar 10, 2019 · 3 comments
Milestone

Comments

@Jensxy
Copy link

Jensxy commented Mar 10, 2019

Hi guys,

I like to use source_excludes in the docs_get function. Something similar to GET twitter/_doc/1/_source?_source_includes=*.id&_source_excludes=entities. Is that somehow possible? I want to use docs_get because I think it is faster than Search to retrieve exactly one document, right?

If I would use Search, I would use the following body.

    body <- '{
                   "query": {
                   "ids" : {
                   "values" : ["id_1"]
                   }
                   },
                   "_source": {
                   "excludes": ["source_1", "source_2"]
                   }
  }'

Best regards,
Jens

@sckott
Copy link
Contributor

sckott commented Mar 11, 2019

thanks, i'll take a look soon

@sckott sckott modified the milestones: v0.9, v1.0 Mar 11, 2019
@sckott
Copy link
Contributor

sckott commented Mar 11, 2019

i don't know which is faster, haven't compared times.

@sckott
Copy link
Contributor

sckott commented Mar 11, 2019

added, on branch r6-conn, remotes::install_github("ropensci/elastic@r6-conn")

@sckott sckott closed this as completed Mar 11, 2019
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

2 participants