Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove geo_point properties deprecated in 2.3 or 2.4 #321

Merged
merged 1 commit into from
Sep 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions mappings/partial/centroid.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
// @ref: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-geo-point-type.html
var schema = {
'type': 'geo_point',

/* `lat_lon` enabled since both the geo distance and bounding box filters can either be executed using in memory checks, or using the indexed lat lon values */
'lat_lon': true,

/* store geohashes (with prefixes) in order to facilitate the geohash_cell filter */
'geohash': true,
'geohash_prefix': true,
'geohash_precision': 18
'type': 'geo_point'
};

module.exports = schema;
90 changes: 15 additions & 75 deletions test/fixtures/expected.json
Original file line number Diff line number Diff line change
Expand Up @@ -1690,11 +1690,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down Expand Up @@ -2017,11 +2013,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down Expand Up @@ -2344,11 +2336,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down Expand Up @@ -2671,11 +2659,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down Expand Up @@ -2998,11 +2982,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down Expand Up @@ -3325,11 +3305,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down Expand Up @@ -3652,11 +3628,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down Expand Up @@ -3979,11 +3951,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down Expand Up @@ -4306,11 +4274,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down Expand Up @@ -4633,11 +4597,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down Expand Up @@ -4960,11 +4920,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down Expand Up @@ -5287,11 +5243,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down Expand Up @@ -5614,11 +5566,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down Expand Up @@ -5941,11 +5889,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down Expand Up @@ -6268,11 +6212,7 @@
}
},
"center_point": {
"type": "geo_point",
"lat_lon": true,
"geohash": true,
"geohash_prefix": true,
"geohash_precision": 18
"type": "geo_point"
},
"shape": {
"type": "geo_shape",
Expand Down
20 changes: 0 additions & 20 deletions test/partial-centroid.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,6 @@ module.exports.tests.type = function(test, common) {
});
};

// this should always be enabled for geo_distance filter
// queries to execute correctly
module.exports.tests.latlon = function(test, common) {
test('latlon enabled', function(t) {
t.equal(schema.lat_lon, true, 'correct value');
t.end();
});
};

// this should always be enabled for geohash_cell filter
// queries to execute correctly
module.exports.tests.geohash = function(test, common) {
test('geohash enabled', function(t) {
t.equal(schema.geohash, true, 'correct value');
t.equal(schema.geohash_prefix, true, 'correct value');
t.equal(schema.geohash_precision, 18, 'correct value');
t.end();
});
};

module.exports.all = function (tape, common) {

function test(name, testFunction) {
Expand Down