jenkins-bot has submitted this change and it was merged. Change subject: Specify nested_path in geo distance sort ......................................................................
Specify nested_path in geo distance sort per https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_21_search_changes.html this is a breaking change in ElasticSearch 2.1+. Bug: T137023 Change-Id: I53e30da6499418b5cf9b4d447c243b0b223f8840 (cherry picked from commit cb82bd76da0629677e1a01aeb1ebb35780e9e09f) --- M includes/api/ApiQueryGeoSearchElastic.php 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: MaxSem: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiQueryGeoSearchElastic.php b/includes/api/ApiQueryGeoSearchElastic.php index 3f8e456..da5f946 100644 --- a/includes/api/ApiQueryGeoSearchElastic.php +++ b/includes/api/ApiQueryGeoSearchElastic.php @@ -79,6 +79,7 @@ $query->addSort( [ '_geo_distance' => [ + 'nested_path' => 'coordinates', 'coordinates.coord' => [ 'lat' => $this->coord->lat, 'lon' => $this->coord->lon @@ -116,6 +117,7 @@ $ids[$id] = true; } } + usort( $coordinates, function ( $coord1, $coord2 ) { if ( $coord1->distance == $coord2->distance ) { return 0; -- To view, visit https://gerrit.wikimedia.org/r/293041 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I53e30da6499418b5cf9b4d447c243b0b223f8840 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/GeoData Gerrit-Branch: wmf/1.28.0-wmf.4 Gerrit-Owner: MaxSem <maxsem.w...@gmail.com> Gerrit-Reviewer: Aude <aude.w...@gmail.com> Gerrit-Reviewer: MaxSem <maxsem.w...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits