Hi,
I am trying out the elasticsearch javascript connection driver. It is
working fine, but I am facing a problem with the error handling. To me it
seems to be an elasticsearch rest api problem.
I am creating a request with the following body:
{
"facets": {},
"query": {
"simple_query_string": {
"query": "test",
"fields": ["_all"],
"analyzer": "snowball"
}
}
}
This is working fine with elasticsearch 0.90.9+, however as expected, it
does not work with 0.90.7. This is all logical since it is something that
is introduced in 0.90.9. The problem is the error handling. In the response
I get the following message:
{
"error": "SearchPhaseExecutionException[Failed to execute phase [query],
all shards failed; shardFailures {[8ClRn1lKRdeaawyrWGTUtw][myimages][0]:
SearchParseException[[myimages][0]: from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"facets":{},"query":{"simple_query_string":{"query":"test","fields":["_all"],"analyzer":"snowball"}}}]]];
nested: QueryParsingException[[myimages] No query registered for
[simple_query_string]]; }{[8ClRn1lKRdeaawyrWGTUtw][mymusic][0]:
SearchParseException[[mymusic][0]: from[-1],size[-1]: Parse Failure [Failed
to parse source
[{"facets":{},"query":{"simple_query_string":{"query":"test","fields":["_all"],"analyzer":"snowball"}}}]]];
nested: QueryParsingException[[mymusic] No query registered for
[simple_query_string]]; }{[8ClRn1lKRdeaawyrWGTUtw][kibana-int][0]:
SearchParseException[[kibana-int][0]: from[-1],size[-1]: Parse Failure
[Failed to parse source
[{"facets":{},"query":{"simple_query_string":{"query":"test","fields":["_all"],"analyzer":"snowball"}}}]]];
nested: QueryParsingException[[kibana-int] No query registered for
[simple_query_string]]; }]",
"status": 400
}
The response using the javascript driver (in the browser) is a
ConnectionFailure. I would like to obtain the message
"QueryParsingException[[kibana-int] No query registered for
[simple_query_string]]" out of this, that would really help. This is doable
using the elasticsearch logs but I cannot present this message using
javascript to the client.
Reproduction of this error is easy with my plugin at
http://www.gridshore.nl/esgui with a local elasticsearch running on 0.90.7
Anybody has an idea how to improve this?
thanks
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/43180d10-d272-4750-ad4d-68dee4f55306%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.