Hello,
I have a problem.
Sorting by _geo_distance works for:
[query] => Array(
[bool] => Array
(
[must] => Array
(
[multi_match] => Array
(
[query] => test
[fields] => Array
(
[0] => title^2
[1] => tag_suggest^2
[2] => description
)
[fuzziness] => 2
)
)
[filter] => Array
(
[geo_distance] => Array
(
[distance] => 500km
[location] => Array
(
[lat] => 52.406374
[lon] => 16.925168100000064
)
)
)
)
)
[suggest] => Array(
[my-suggestion] => Array(
[text] => test
[term] => Array
(
[field] => title
)
)
)
[sort] => Array
(
[_geo_distance] => Array
(
[location] => Array
(
[lat] => 52.406374
[lon] => 16.925168100000064
)
[order] => asc
[unit] => km
[distance_type] => plane
)
)
)
But sorting by _geo_distance not working, when i add to filter "[must][term]".
[query] => Array
(
[bool] => Array
(
[must] => Array
(
[multi_match] => Array
(
[query] => test
[fields] => Array
(
[0] => title^2
[1] => tag_suggest^2
[2] => description
)
[fuzziness] => 2
)
)
[filter] => Array
(
[geo_distance] => Array
(
[distance] => 500km
[location] => Array
(
[lat] => 52.406374
[lon] => 16.925168100000064
)
)
[must] => Array
(
[term] => Array
(
[is_active] => 1
)
)
)
)
)
[suggest] => Array
(
[my-suggestion] => Array
(
[text] => test
[term] => Array
(
[field] => title
)
)
)
[sort] => Array
(
[_geo_distance] => Array
(
[location] => Array
(
[lat] => 52.406374
[lon] => 16.925168100000064
)
[order] => asc
[unit] => km
[distance_type] => plane
)
)
)
Please help.