From 5fb19ecf4ab922bf6c7d7e25a0946cb836e1bfa7 Mon Sep 17 00:00:00 2001 From: Yuxuan HU Date: Fri, 31 Oct 2025 15:41:09 +1100 Subject: [PATCH 1/3] update assets index schema --- .../portal_records_index_schema.json | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/server/src/test/resources/portal_records_index_schema.json b/server/src/test/resources/portal_records_index_schema.json index 9d851676..a0d75124 100644 --- a/server/src/test/resources/portal_records_index_schema.json +++ b/server/src/test/resources/portal_records_index_schema.json @@ -168,34 +168,7 @@ }, "assets": { "type": "object", - "properties": { - "href": { - "type": "text", - "index": false - }, - "title": { - "type": "text", - "fields": { - "keyword": { - "type": "keyword", - "ignore_above": 256 - } - } - }, - "type": { - "type": "keyword" - }, - "roles": { - "type": "keyword" - }, - "description": { - "type": "text" - }, - "extra_fields": { - "type": "object", - "enabled": true - } - } + "enabled": false }, "sci:citation": { "type": "text" From e09e8b4939e622aae6bdc5985386884056e3bca6 Mon Sep 17 00:00:00 2001 From: Yuxuan HU Date: Fri, 31 Oct 2025 17:00:14 +1100 Subject: [PATCH 2/3] skip unused test --- .../test/java/au/org/aodn/ogcapi/server/common/RestApiTest.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/test/java/au/org/aodn/ogcapi/server/common/RestApiTest.java b/server/src/test/java/au/org/aodn/ogcapi/server/common/RestApiTest.java index d6fae3fe..867402ee 100644 --- a/server/src/test/java/au/org/aodn/ogcapi/server/common/RestApiTest.java +++ b/server/src/test/java/au/org/aodn/ogcapi/server/common/RestApiTest.java @@ -641,6 +641,7 @@ public void verifySortByTemporalCorrect() throws IOException { * If this field exist, then */ @Test + @Disabled("Skipping temporarily because assets.summary no longer exists") public void verifyAssetSummarySearchWorks() throws IOException { super.insertJsonToElasticRecordIndex( "073fde5a-bff3-1c1f-e053-08114f8c5588.json", From cb715655fe314944a77e83f020aa15868456a9cf Mon Sep 17 00:00:00 2001 From: Yuxuan HU Date: Mon, 3 Nov 2025 14:27:29 +1100 Subject: [PATCH 3/3] update assets index schema --- .../ogcapi/server/core/model/enumeration/StacBasicField.java | 2 +- .../java/au/org/aodn/ogcapi/server/common/RestApiTest.java | 1 - server/src/test/resources/portal_records_index_schema.json | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/server/src/main/java/au/org/aodn/ogcapi/server/core/model/enumeration/StacBasicField.java b/server/src/main/java/au/org/aodn/ogcapi/server/core/model/enumeration/StacBasicField.java index b6928a6e..0e01aa13 100644 --- a/server/src/main/java/au/org/aodn/ogcapi/server/core/model/enumeration/StacBasicField.java +++ b/server/src/main/java/au/org/aodn/ogcapi/server/core/model/enumeration/StacBasicField.java @@ -23,7 +23,7 @@ public enum StacBasicField { Links("links", "links"), LinksTitle("links.title", "links.title"), Collection("collection", "collection", "collection.keyword"), - AssetsSummary("assets.summary", "assets.summary") + AssetsSummary("assets", "assets") ; // Field that use to do sort, elastic search treat FieldData (searchField) differently, a searchField is not diff --git a/server/src/test/java/au/org/aodn/ogcapi/server/common/RestApiTest.java b/server/src/test/java/au/org/aodn/ogcapi/server/common/RestApiTest.java index 867402ee..d6fae3fe 100644 --- a/server/src/test/java/au/org/aodn/ogcapi/server/common/RestApiTest.java +++ b/server/src/test/java/au/org/aodn/ogcapi/server/common/RestApiTest.java @@ -641,7 +641,6 @@ public void verifySortByTemporalCorrect() throws IOException { * If this field exist, then */ @Test - @Disabled("Skipping temporarily because assets.summary no longer exists") public void verifyAssetSummarySearchWorks() throws IOException { super.insertJsonToElasticRecordIndex( "073fde5a-bff3-1c1f-e053-08114f8c5588.json", diff --git a/server/src/test/resources/portal_records_index_schema.json b/server/src/test/resources/portal_records_index_schema.json index a0d75124..2cc63faa 100644 --- a/server/src/test/resources/portal_records_index_schema.json +++ b/server/src/test/resources/portal_records_index_schema.json @@ -167,8 +167,7 @@ } }, "assets": { - "type": "object", - "enabled": false + "type": "flattened" }, "sci:citation": { "type": "text"