I get this error "n of N shards failed" in the bottom right notification in Discover tab, when I add a scripted field such as:
_msg painless return doc['err_msg'].value || doc['message'].value; String
I tried many variants like:
Both fields exist, the error still happen with return doc['err_msg'].value || doc['err_stack'].value
for example (but anyway, that script should still work for non-existing fields)
There are many similar topics
https://discuss.elastic.co/search?q=scripted%20field%20conditional%20category%3A7 but I couldn't find one that worked in my case
I don't see specific errors in kibana or elasticsearch logs
Kibana and ES version 6.4.0