elasticsearch - No query registered for [query]]
The exception basically means "There is no known query type called query
". I'm guessing that your client library is automatically inserting the top-level query
property, so your generated query actually looks like this:
{ "query" : { "query" : { "match_all" : {} } }}
If your client can dump the JSON representation of the query, that can help a lot in debugging.
Try removing the query
portion from your text file so that it is just the match_all
query, see if that works for you.
your query string should be
String query = "{\"match_all\":{}}";
you can see from here
https://discuss.elastic.co/t/parsingexception-in-elastic-5-0-0/64626