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

shardFailures in SearchResponse showing from previous query #2148

Closed
lmader opened this issue Aug 7, 2012 · 4 comments
Closed

shardFailures in SearchResponse showing from previous query #2148

lmader opened this issue Aug 7, 2012 · 4 comments
Assignees

Comments

@lmader
Copy link

lmader commented Aug 7, 2012

Steps to repro issue with the shardFailures array showing msgs from a previous (not current) query:

  1. create something
    curl -XPUT localhost:9200/acme/blog/1111 -d '{"message":"foo"}'

  2. execute this query - it should succeed
    curl -XGET localhost:9200/acme/blog/_search -d '{"query":{"field":{"message":"foo"}}}'

  3. this is an invalid query and is expected to fail
    curl -XGET localhost:9200/acme/blog/_search -d '{"foobar":{"message":"foo"}}'

  4. now rerun the query from step 2. This query succeeds, and returns the hits, but also shows the shardFailures from the failed query in step 3
    curl -XGET localhost:9200/acme/blog/_search -d '{"query":{"field":{"message":"foo"}}}'

Here is the output I get from step 4) :

{"took":3,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0,"failures":[{"index":"acme","shard":1,"status":400,"reason":"SearchParseException[[acme][1]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"foobar":{"message":"foo"}}]]]; nested: SearchParseException[[acme][1]: from[-1],size[-1]: Parse Failure [No parser for element [foobar]]]; "},{"index":"acme","shard":0,"status":400,"reason":"SearchParseException[[acme][0]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"foobar":{"message":"foo"}}]]]; nested: SearchParseException[[acme][0]: from[-1],size[-1]: Parse Failure [No parser for element [foobar]]]; "},{"index":"acme","shard":4,"status":400,"reason":"SearchParseException[[acme][4]: from[-1],size[-1]: Parse Failure [Failed to parse source [{"foobar":{"message":"foo"}}]]]; nested: SearchParseException[[acme][4]: from[-1],size[-1]: Parse Failure [No parser for element [foobar]]]; "}]},"hits":{"total":1,"max_score":1.6931472,"hits":[{"_index":"acme","_type":"blog","_id":"1111","_score":1.6931472, "_source" : {"message" : "foo" }}]}}

@kimchy
Copy link
Member

kimchy commented Aug 8, 2012

This has been fixed in 0.19, doubled check but you can double check as well.

@ghost ghost assigned spinscale Oct 30, 2013
@spinscale
Copy link
Contributor

@lmader can you confirm if this is fixed for you or not?

@lmader
Copy link
Author

lmader commented Nov 1, 2013

I just re-tested this on elasticsearch 0.90.5 and I can confirm that this
is fixed. I think we noticed that it was fixed in 0.19.x as well.

On Wed, Oct 30, 2013 at 2:06 AM, Alexander Reelsen <notifications@github.com

wrote:

@lmader https://github.com/lmader can you confirm if this is fixed for
you or not?


Reply to this email directly or view it on GitHubhttps://github.com//issues/2148#issuecomment-27373841
.

@spinscale
Copy link
Contributor

Thanks a lot for your feedback! Closing this.

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