diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/PropertiesProcessor.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/PropertiesProcessor.java index 2731083d94cdca28e1343deb787db5e47f386a91..0c57b5604f23ac785db30faf22e7e524c6004595 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/PropertiesProcessor.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/schema/converter/PropertiesProcessor.java @@ -173,6 +173,9 @@ public class PropertiesProcessor { if ("array".equals(entry.getValue().getType())) { Items items = entry.getValue().getItems(); + if(Objects.isNull(items)){ + return Stream.empty(); + } if(Objects.nonNull(items.getProperties()) && !items.getProperties().isEmpty()){ Map<String, String> type = entry.getValue().getIndexingType(); diff --git a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapper.java b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapper.java index 59fb3ecdf1fcc0052140425142c9cda84f8f836b..1af15db2113aa32ac21032b247c72a5bb4a9a68f 100644 --- a/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapper.java +++ b/indexer-core/src/main/java/org/opengroup/osdu/indexer/service/StorageIndexerPayloadMapper.java @@ -42,6 +42,7 @@ public class StorageIndexerPayloadMapper { Map<String, Object> dataMap = new HashMap<>(); if (storageSchema.isDataSchemaMissing()) { + this.log.warning(String.format("record-id: %s | schema mismatching: %s ", recordId, storageSchema.getKind())); return dataMap; } @@ -65,8 +66,8 @@ public class StorageIndexerPayloadMapper { if (Objects.isNull(elasticType)) { this.jobStatus - .addOrUpdateRecordStatus(recordId, IndexingStatus.WARN, HttpStatus.SC_BAD_REQUEST, "e.getMessage()", - String.format("record-id: %s | %s", recordId, "e.getMessage()")); + .addOrUpdateRecordStatus(recordId, IndexingStatus.WARN, HttpStatus.SC_BAD_REQUEST, + String.format("record-id: %s | %s for entry %s", recordId, "Not resolvable elastic type", name)); continue; } @@ -128,14 +129,14 @@ public class StorageIndexerPayloadMapper { this.attributeParsingService.tryParseGeojson(recordId, name, value, dataMap); break; case NESTED: - // don't do anything , each nested property will be mapped separately + // don't do anything , each nested property will be parsed separately break; case FLATTENED: - // flattened type inner properties won't be mapped as they types not present in schema + // flattened type inner properties will be added "as is" without parsing as they types not present in schema this.attributeParsingService.tryParseFlattened(recordId, name, value, dataMap); break; case OBJECT: - // object type inner properties won't be mapped as they types not present in schema + // object type inner properties will be added "as is" without parsing as they types not present in schema this.attributeParsingService.tryParseObject(recordId, name, value, dataMap); break; case UNDEFINED: