From 6b7379a60578055145b777c30e2d3b8b6f2b55fa Mon Sep 17 00:00:00 2001 From: Stijn Caerts Date: Mon, 9 Oct 2023 11:41:59 +0200 Subject: [PATCH 1/3] do not index proj:geometry and proj:centroid as geo fields --- CHANGELOG.md | 1 + .../stac_fastapi/elasticsearch/database_logic.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c743ba6..6cd2b837 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Corrected the closing of client connections in ES index management functions [#132](https://github.com/stac-utils/stac-fastapi-elasticsearch/issues/132) - Corrected the automatic converstion of float values to int when building Filter Clauses [#135](https://github.com/stac-utils/stac-fastapi-elasticsearch/issues/135) +- Do not index `proj:geometry` and `proj:centroid` fields as geo shapes [#154](https://github.com/stac-utils/stac-fastapi-elasticsearch/issues/154) ## [v0.3.0] diff --git a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py index 6a7a1f27..f80c470c 100644 --- a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py +++ b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py @@ -67,13 +67,13 @@ { "proj_centroid": { "match": "proj:centroid", - "mapping": {"type": "geo_point"}, + "mapping": {"type": "object", "enabled": False}, } }, { "proj_geometry": { "match": "proj:geometry", - "mapping": {"type": "geo_shape"}, + "mapping": {"type": "object", "enabled": False}, } }, { From 1f26818876ada89a637f3e1a3b5dd884967bb523 Mon Sep 17 00:00:00 2001 From: Stijn Caerts Date: Tue, 24 Oct 2023 10:14:00 +0200 Subject: [PATCH 2/3] restore proj:centroid mapping as geo_point as it is supposed to be in WGS84 --- .../elasticsearch/stac_fastapi/elasticsearch/database_logic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py index 0c27abe4..e59f4041 100644 --- a/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py +++ b/stac_fastapi/elasticsearch/stac_fastapi/elasticsearch/database_logic.py @@ -81,7 +81,7 @@ { "proj_centroid": { "match": "proj:centroid", - "mapping": {"type": "object", "enabled": False}, + "mapping": {"type": "geo_point"}, } }, { From 8912e814185e520d391062b5c065c337244307f1 Mon Sep 17 00:00:00 2001 From: Stijn Caerts Date: Tue, 24 Oct 2023 16:56:03 +0200 Subject: [PATCH 3/3] Remove reference to proj;centroid in CHANGELOG Co-authored-by: Phil Varner --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca44270a..28088184 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Corrected the closing of client connections in ES index management functions [#132](https://github.com/stac-utils/stac-fastapi-elasticsearch/issues/132) - Corrected the automatic converstion of float values to int when building Filter Clauses [#135](https://github.com/stac-utils/stac-fastapi-elasticsearch/issues/135) -- Do not index `proj:geometry` and `proj:centroid` fields as geo shapes [#154](https://github.com/stac-utils/stac-fastapi-elasticsearch/issues/154) +- Do not index `proj:geometry` field as geo_shape [#154](https://github.com/stac-utils/stac-fastapi-elasticsearch/issues/154) - Remove unsupported characters from Elasticsearch index names [#153](https://github.com/stac-utils/stac-fastapi-elasticsearch/issues/153) ## [v0.3.0]