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

asyncSearch get returns irrelevant results #1280

Closed
lizozom opened this issue Aug 12, 2020 · 3 comments
Closed

asyncSearch get returns irrelevant results #1280

lizozom opened this issue Aug 12, 2020 · 3 comments

Comments

@lizozom
Copy link

lizozom commented Aug 12, 2020

There's an issue with the implementation of the elasticsearch client's asyncSearch.get endpoint, that is used to fetch the data from a running async search.

Instead of returning the data from the asyncId, it seems to return a list of unrelated async search IDs from the .async-search index.

This behavior can be reproduced by using this PR and going to discover.
Same code works correctly if I use the new ES client with a transport request, instead of the asyncSearch one.

image

@delvedor
Copy link
Member

Hello! Can you please create a snippet of code that just uses the client that reproduces the issue?

@stale
Copy link

stale bot commented Aug 29, 2020

We understand that this might be important for you, but this issue has been automatically marked as stale because it has not had recent activity either from our end or yours.
It will be closed if no further activity occurs, please write a comment if you would like to keep this going.

Note: in the past months we have built a new client, that has just landed in master. If you want to open an issue or a pr for the legacy client, you should do that in https://github.com/elastic/elasticsearch-js-legacy

@stale stale bot added the stale label Aug 29, 2020
@delvedor delvedor removed the stale label Sep 1, 2020
@lizozom
Copy link
Author

lizozom commented Sep 7, 2020

I just created a PR to use the new asyncSearch endpoints, so I'm closing the issue.

The problem was that due to a badly formatted request, I was running a "SELECT ALL" query.
Coincidentally, data from the .async-search index is returned first, resulting in this weird behavior.
As soon as I fixed the query, everything works as expected.

@lizozom lizozom closed this as completed Sep 7, 2020
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