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

Return value from search subscribe #4

Closed
kjetilhp opened this issue Feb 1, 2019 · 2 comments
Closed

Return value from search subscribe #4

kjetilhp opened this issue Feb 1, 2019 · 2 comments

Comments

@kjetilhp
Copy link

kjetilhp commented Feb 1, 2019

I'm trying to do a simple search and process the result inside subscribe, but it seems that the return values and the typing does not match

.search(...).subscribe(res => {
  // according to typing I should get a SearchResponse having hits, took etc.
  // but get an array where the first element is the searchresponse and the 
  // second is the http return code
})

see picture
image

@kamilmysliwiec
Copy link
Member

It looks like an issue with the underlying @types/elasticsearch(?)

@piotr-zurek
Copy link

piotr-zurek commented Aug 7, 2019

I facing the same issue. ES logs shows that response from ES API is just an object but .search() callback return array with 1 element.

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