For instance, sorting on a field that has null values for some documents, without specifying the value to use as a replacement, will result in a non-error HTTP status code 200 , with search results, *but* the returned JSON will contain a non-empty "_shards.failures" array.
Example:
{code} { "took" : 5, "timed_out" : false, "_shards" : { "total" : 3, "successful" : 1, "failed" : 2, "failures" : [ { "shard" : 0, "index" : "guests", "node" : "BmJBXb6JRDm89f6ljEA9HA", "reason" : { "type" : "search_parse_exception", "reason" : "No mapping found for [uniqueNumericField] in order to sort on" } } ] }, ... } {code}
We should report such failures, be it only in a debug log. Maybe we should even throw an exception? |
|