You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
execute this query - it should succeed
curl -XGET localhost:9200/acme/blog/_search -d '{"query":{"field":{"message":"foo"}}}'
this is an invalid query and is expected to fail
curl -XGET localhost:9200/acme/blog/_search -d '{"foobar":{"message":"foo"}}'
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" }}]}}
The text was updated successfully, but these errors were encountered:
Steps to repro issue with the shardFailures array showing msgs from a previous (not current) query:
create something
curl -XPUT localhost:9200/acme/blog/1111 -d '{"message":"foo"}'
execute this query - it should succeed
curl -XGET localhost:9200/acme/blog/_search -d '{"query":{"field":{"message":"foo"}}}'
this is an invalid query and is expected to fail
curl -XGET localhost:9200/acme/blog/_search -d '{"foobar":{"message":"foo"}}'
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" }}]}}
The text was updated successfully, but these errors were encountered: