From a93af8651cb290951643e9f3c9c7f7cf77ed4107 Mon Sep 17 00:00:00 2001 From: Nicholas Knize Date: Mon, 15 Aug 2016 19:11:53 -0500 Subject: [PATCH] add geo distance script breaking changes to migration docs --- .../migration/migrate_5_0/scripting.asciidoc | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/docs/reference/migration/migrate_5_0/scripting.asciidoc b/docs/reference/migration/migrate_5_0/scripting.asciidoc index 0f50e6232c3..52a26c89d1b 100644 --- a/docs/reference/migration/migrate_5_0/scripting.asciidoc +++ b/docs/reference/migration/migrate_5_0/scripting.asciidoc @@ -314,4 +314,28 @@ instead the constructors on `TemplateQueryBuilder` should be used. ==== Template query The `template` query has been deprecated in favour of the search template api. The `template` query is scheduled -to be removed in the next major version. \ No newline at end of file +to be removed in the next major version. + +==== GeoPoint scripts + +The following helper methods have been removed from GeoPoint scripting: + +* `factorDistance` +* `factorDistanceWithDefault` +* `factorDistance02` +* `factorDistance13` +* `arcDistanceInKm` +* `arcDistanceInKmWithDefault` +* `arcDistanceInMiles` +* `arcDistanceInMilesWithDefault` +* `distanceWithDefault` +* `distanceInKm` +* `distanceInKmWithDefault` +* `distanceInMiles` +* `distanceInMilesWithDefault` +* `geohashDistanceInKm` +* `geohashDistanceInMiles` + +Instead use `arcDistance`, `arcDistanceWithDefault`, `planeDistance`, `planeDistanceWithDefault`, `geohashDistance`, +`geohashDistanceWithDefault` and convert from default units (meters) to desired units using the appropriate constance +(e.g., multiply by `0.001` to convert to Km). \ No newline at end of file