I have a rather large (or at least non-small) logs use-case, with an index per day with many types. Many of those types have a "status" field, some in nested objects and some right at _source level. I have struggled to rename all the non-integer versions of the fields named "status" to other things (such as "delivery_status" for mail logs).
One user wants to sort on response.status but it keeps erroring out with the well-known "Number Format Exception [Invalid shift value....]". I have dug through the day's index and found some "status":null entries.
Can anyone tell me whether these are the likely cause of the NumberFormatException, and whether there's any way to do a filtered query around them?
I have done: curl 'localhost:9200/logs-2015.06.12/sometype/_search?pretty=1&size=10' -d '{"query":{"filtered":{"filter":{"exists":{"field":"response.status"}}}}' and if I add a sort clause on that field it still fails in that way.
I am adding "default_value":0 clauses to all the various "status" fields in the template, for future indices, but short of re-indexing past days (and they tend to be in the 1G doc range), I'm hoping a query can be made to handle them.
Thanks for whatever you might be able to tell me.