When trying to sort results by Search API Location field, no results is returned at all. It seems that distance sorting is not supported at the moment.
When trying to sort results by Search API Location field, no results is returned at all. It seems that distance sorting is not supported at the moment.
Comments
Comment #2
alex.bukach commentedHere's a patch providing Search API Location sort support.
Comment #4
skek commentedComment #5
alex.bukach commentedThanks for committing it so fast, @skek! I have found a minor issue with the previous patch: it causes a warning when
$query->getOption('search_api_location')is empty. Here's one more patch against the current version.Comment #7
skek commentedThanks for the patch @Alex Bukach! Applied!
Comment #9
alex.bukach commentedI have found an issue with distance sort: if the search point is not set, then attempt to execute distance sorting makes Elasticsearch throw an exception:
Comment #10
alex.bukach commentedComment #12
skek commented