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

Add geo_bounds aggregation support for geo_shape #55328

Merged
merged 9 commits into from
Apr 22, 2020
Prev Previous commit
Next Next commit
revert the upgraded cluster skipping tests
talevy committed Apr 20, 2020
commit 2548f967d151ddcc1acb73baf290ae496fd8d113
5 changes: 0 additions & 5 deletions x-pack/qa/rolling-upgrade/build.gradle
Original file line number Diff line number Diff line change
@@ -142,11 +142,6 @@ for (Version bwcVersion : bwcVersions.wireCompatible) {
nonInputProperties.systemProperty('tests.rest.cluster', "${-> testClusters."${baseName}".allHttpSocketURI.join(",")}")
nonInputProperties.systemProperty('tests.clustername', "${-> testClusters."${baseName}".getName()}")
systemProperty 'tests.rest.suite', 'upgraded_cluster'
if (bwcVersion.onOrAfter("8.0.0")) {
systemProperty 'tests.rest.blacklist', [
'upgraded_cluster/100_geo_shape_doc_values/Test upgraded 8.x cluster with 8.x and 7.x geo_shape fields'
]
}
systemProperty 'tests.upgrade_from_version', oldVersion
}

Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
- do:
index:
index: old_locations
id: mixed_point_with_doc_value
id: mixed_point_without_doc_value
body: { location: "POINT(11.25 43.24)" }

- do:
Original file line number Diff line number Diff line change
@@ -25,48 +25,6 @@
- do:
indices.refresh: {}

- do:
search:
rest_total_hits_as_int: true
index: "*locations"
size: 10
body:
query:
match_all: {}
- match: {hits.total: 3 }
- length: {hits.hits: 3 }

- do:
catch: bad_request
search:
rest_total_hits_as_int: true
index: old_locations
size: 0
body:
aggs:
my_agg:
geo_bounds:
field: location
wrap_longitude: true

- do:
search:
rest_total_hits_as_int: true
index: "*locations"
size: 0
body:
aggs:
my_agg:
geo_bounds:
field: location
wrap_longitude: true
- match: {hits.total: 1 }
- match: { aggregations.my_agg.bounds.top_left.lat: -21.760000032372773 }
- match: { aggregations.my_agg.bounds.top_left.lon: 34.24999997019768 }
- match: { _shards.failures.0.index: old_locations }
- match: { _shards.failures.0.reason.type: illegal_argument_exception }
- match: { _shards.failures.0.reason.reason: "Can't load fielddata on [location] because fielddata is unsupported on fields of type [geo_shape]. Use doc values instead." }

- do:
search:
rest_total_hits_as_int: true