When fixed, adapt the last commit of https://github.com/hibernate/hibernate-search/pull/1136
When querying on distance to reference coordinates, and when some document misses a value for the location field:
the Lucene backend computes the distance between the reference coordinates and (0,0)
the ElasticSearch backend simply returns a distance of Double.MAX_VALUE (~1*10^308)
This is illustrated by this commit, where I had to adapt a test in order to take into account the inconsistency between the two backends: https://github.com/hibernate/hibernate-search/pull/1136/commits/e41b842704b581b5a93ba24a6020436d85573378
I think we should make the behavior consistent.
IMO, the ElasticSearch backend's behavior is more sensible. Changing the Lucene backend's behavior could be considered as a breaking change. On the other hand, changing the behavior of ES might prove difficult.