From c4ce450425a5ad4f858cafbb40ba68d9061b3a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Prunayre?= Date: Wed, 19 Jun 2024 08:45:05 +0200 Subject: [PATCH] Indexing / Lower severity of getIndexField While indexing, a number of log error can be reported: ``` 2024-06-18T17:11:21,679 ERROR [geonetwork] - Failed to get index field 'resourceTitleObject' value on '10.17600/14000100', caused by Document with id 10.17600/14000100 not found ``` This is due to either remote record links not present in index eg. DOI or to an empty index and document search returns no document at starts. It is triggered mainly in https://github.com/geonetwork/core-geonetwork/blob/main/web/src/main/webapp/xslt/common/index-utils.xsl#L141 but the `recordLink` field is currently not used in main UI. Related to https://github.com/geonetwork/core-geonetwork/commit/e60699688eb3883ef582bdea76cb503b83ad92a4 and https://github.com/geonetwork/core-geonetwork/commit/20cc13b72f2645a416f7731bedff27909d727e37 --- core/src/main/java/org/fao/geonet/util/XslUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/fao/geonet/util/XslUtil.java b/core/src/main/java/org/fao/geonet/util/XslUtil.java index 50bd7d1da87..d6514ffd045 100644 --- a/core/src/main/java/org/fao/geonet/util/XslUtil.java +++ b/core/src/main/java/org/fao/geonet/util/XslUtil.java @@ -853,7 +853,7 @@ public static String getIndexField(Object appName, Object uuid, Object field, Ob final Map values = searchManager.getFieldsValues(id, fields, language); return values.get(fieldname); } catch (Exception e) { - Log.error(Geonet.GEONETWORK, "Failed to get index field '" + fieldname + "' value on '" + id + "', caused by " + e.getMessage()); + Log.warning(Geonet.GEONETWORK, "Failed to get index field '" + fieldname + "' value on '" + id + "', caused by " + e.getMessage()); } return ""; }