You can use function range queries : ...&group.query={!frange l=0 u=3}geodist()...
.
You should use incl=false
or incu=false
in the parameters to prevent having duplicates in the resulting groups (something equivalent to ranges [0 To 3] and ]3 TO 5]
, or [0 To 3[ and [3 TO 5]
).
A query would look like :
q=*:*&spatial=true&pt=0.0,0.0&sfield=geofield&group=true&group.query={!frange l=0 u=3}geodist()&group.query={!frange l=3 u=5 incl=false}geodist()
You can also use geodist()
as a group function like : group.func=geodist(geofield,0.0,0.0)
but it would make it more difficult to control the granularity (ranges) this way.