I'm upgrading my Elasticsearch cluster from 6.8.X to 7.5.X. I have this breaking change; basically in the REST response, there is a {hits: {total: { value: 123 } } }
object instead of a {hits: { total: 123 } }
int value.
Elasticsearch provides an parameter that you can add to your searches rest_total_hits_as_int
; however, I cannot figure out how to set this on queries being formatted by their java RestHighLevelClient
or in their SearchRequest
object. (I'm currently using the ES 6.8.0 libraries.)
When I send a request from the 6.8 client to a 7.5 cluster, I always get 0
total hits. I get an error when I send a request from the 7.5 client to the 6.8 cluster. (Not backwards compatible.)
Is there a migration path that I'm missing?