]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
DRYD-1952: Public Browser > Add contentPlace field (#486)
authorSpiros Dimopulos <spiros@wantedpixel.com>
Thu, 11 Dec 2025 08:22:30 +0000 (10:22 +0200)
committerGitHub <noreply@github.com>
Thu, 11 Dec 2025 08:22:30 +0000 (10:22 +0200)
* DRYD-1952: added contentPlaces in contentSubjectList;

* DRYD-1952: added contentPlaces in all tenant bindings that override es config;

* DRYD-1952: set using RefNameUtils.getDisplayName for refNames, otherwise directly using the content value;

3rdparty/nuxeo/nuxeo-platform-elasticsearch/src/main/java/org/collectionspace/services/nuxeo/elasticsearch/DefaultESDocumentWriter.java
services/common/src/main/cspace/config/services/tenants/anthro/anthro-tenant-bindings.delta.xml
services/common/src/main/cspace/config/services/tenants/bonsai/bonsai-tenant-bindings.delta.xml
services/common/src/main/cspace/config/services/tenants/fcart/fcart-tenant-bindings.delta.xml
services/common/src/main/cspace/config/services/tenants/lhmc/lhmc-tenant-bindings.delta.xml
services/common/src/main/cspace/config/services/tenants/materials/materials-tenant-bindings.delta.xml
services/common/src/main/cspace/config/services/tenants/tenant-bindings-proto-unified.xml

index 039b2ec96188e7b5a909c4b7dce65e6a969aba3d..e9dea8ffed58fd99bb1c7cbb298c94ba8d3b2f1e 100644 (file)
@@ -298,6 +298,7 @@ private void denormExhibitionRecords(CoreSession session, String csid, String te
                final List<String> fields = Arrays.asList("contentConcepts",
                        "contentEvents",
                        "contentPersons",
+                       "contentPlaces",
                        "contentOrganizations");
 
                for (String field : fields) {
@@ -306,7 +307,18 @@ private void denormExhibitionRecords(CoreSession session, String csid, String te
                        for (String content  : contentList) {
                                if (content != null) {
                                        final ObjectNode node = objectMapper.createObjectNode();
-                                       node.put("subject", RefNameUtils.getDisplayName(content));
+                                       String subjectValue;
+
+                                       if (RefNameUtils.isTermRefname(content)) {
+                                               try {
+                                                       subjectValue = RefNameUtils.getDisplayName(content);
+                                               } catch (Exception e) {
+                                                       subjectValue = content;
+                                               }
+                                       } else {
+                                               subjectValue = content;
+                                       }
+                                       node.put("subject", subjectValue);
                                        denormContentSubject.add(node);
                                }
                        }
index ea4c9abfe18dd76293140443949d66d11b5e1651..0729f76811758516a3a7b5594e0687652a346563 100644 (file)
@@ -58,6 +58,7 @@
                                                        "collectionobjects_common:contentEvents",
                                                        "collectionobjects_common:contentOrganizations",
                                                        "collectionobjects_common:contentPersons",
+                                                       "collectionobjects_common:contentPlaces",
                                                        "collectionobjects_common:fieldCollectionDateGroup",
                                                        "collectionobjects_common:fieldCollectors",
                                                        "collectionobjects_common:materialGroupList",
                                                                }
                                                        }
                                                },
+                                               "collectionobjects_common:contentPlaces": {
+                                                       "type": "keyword",
+                                                       "copy_to": "all_field"
+                                               },
                                                "collectionobjects_common:techniqueGroupList": {
                                                        "type": "object",
                                                        "properties": {
index 127c7ae7c2bddd94b290766403e67635e680d57a..2f12109df35452e0597f3661755cd2aa178600dc 100644 (file)
@@ -29,6 +29,7 @@
                                                        "collectionobjects_common:contentEvents",
                                                        "collectionobjects_common:contentOrganizations",
                                                        "collectionobjects_common:contentPersons",
+                                                       "collectionobjects_common:contentPlaces",
                                                        "collectionobjects_common:materialGroupList",
                                                        "collectionobjects_common:measuredPartGroupList",
                                                        "collectionobjects_common:numberOfObjects",
                                                                }
                                                        }
                                                },
+                                               "collectionobjects_common:contentPlaces": {
+                                                       "type": "keyword",
+                                                       "copy_to": "all_field"
+                                               },
                                                "collectionobjects_common:techniqueGroupList": {
                                                        "type": "object",
                                                        "properties": {
index 65e77ea661f62e14591d14e9d819c9a844ea8c9a..0045ce02871372cd816476ec0dca2861db58452b 100644 (file)
@@ -38,6 +38,7 @@
                                                        "collectionobjects_common:contentEvents",
                                                        "collectionobjects_common:contentOrganizations",
                                                        "collectionobjects_common:contentPersons",
+                                                       "collectionobjects_common:contentPlaces",
                                                        "collectionobjects_common:materialGroupList",
                                                        "collectionobjects_common:measuredPartGroupList",
                                                        "collectionobjects_common:numberOfObjects",
                                                                }
                                                        }
                                                },
+                                               "collectionobjects_common:contentPlaces": {
+                                                       "type": "keyword",
+                                                       "copy_to": "all_field"
+                                               },
                                                "collectionobjects_common:techniqueGroupList": {
                                                        "type": "object",
                                                        "properties": {
index e907d2d101f601522ef61a47e66a78a2723a32af..f836218cc5718631927a5fe10b41a4a4100b9e1e 100644 (file)
@@ -29,6 +29,7 @@
                                                        "collectionobjects_common:contentEvents",
                                                        "collectionobjects_common:contentOrganizations",
                                                        "collectionobjects_common:contentPersons",
+                                                       "collectionobjects_common:contentPlaces",
                                                        "collectionobjects_common:materialGroupList",
                                                        "collectionobjects_common:measuredPartGroupList",
                                                        "collectionobjects_common:numberOfObjects",
                                                                }
                                                        }
                                                },
+                                               "collectionobjects_common:contentPlaces": {
+                                                       "type": "keyword",
+                                                       "copy_to": "all_field"
+                                               },
                                                "collectionobjects_common:techniqueGroupList": {
                                                        "type": "object",
                                                        "properties": {
index 3057e9c2f4c8ac228c3eafd4870fae6002fbd907..64e57db8e80229f554d1347ebf180ccc9263a53d 100644 (file)
@@ -75,6 +75,7 @@
                     "collectionobjects_common:contentEvents",
                     "collectionobjects_common:contentOrganizations",
                     "collectionobjects_common:contentPersons",
+                    "collectionobjects_common:contentPlaces",
                     "collectionobjects_common:objectHistoryNote",
                     "collectionobjects_common:objectNumber",
                     "collectionobjects_common:objectStatusList",
                       }
                     }
                   },
+                  "collectionobjects_common:contentPlaces": {
+                    "type": "keyword",
+                    "copy_to": "all_field"
+                  },
                   "collectionobjects_common:materialGroupList": {
                     "type": "object",
                     "properties": {
index 7622f7829dadf74663a00a9678da570db6fffa19..91411631c451362f4c041d1d01986738e471be5a 100644 (file)
                                                        "collectionobjects_common:contentEvents",
                                                        "collectionobjects_common:contentOrganizations",
                                                        "collectionobjects_common:contentPersons",
+                                                       "collectionobjects_common:contentPlaces",
                                                        "collectionobjects_common:materialGroupList",
                                                        "collectionobjects_common:measuredPartGroupList",
                                                        "collectionobjects_common:numberOfObjects",
                                                                }
                                                        }
                                                },
+                                               "collectionobjects_common:contentPlaces": {
+                                                       "type": "keyword",
+                                                       "copy_to": "all_field"
+                                               },
                                                "collectionobjects_common:techniqueGroupList": {
                                                        "type": "object",
                                                        "properties": {