Skip to content

Commit 47c53dd

Browse files
committed
[bugfix] Don't silently swallow the inability to index field values in the Lucene Full Text Index
1 parent 030537c commit 47c53dd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

extensions/indexes/lucene/src/main/java/org/exist/indexing/lucene/LuceneFieldConfig.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ private Field convertToField(String content) {
245245
default:
246246
return new TextField(fieldName, content, store ? Field.Store.YES : Field.Store.NO);
247247
}
248-
} catch (NumberFormatException | XPathException e) {
249-
// wrong type: ignore
250-
LOG.trace("Cannot convert field {} to type {}. Content was: {}", fieldName, Type.getTypeName(type), content);
248+
} catch (final NumberFormatException | XPathException e) {
249+
// NOTE(AR) report inability to index value
250+
LOG.warn("Cannot convert field {} to type {}. Content was: {}", fieldName, Type.getTypeName(type), content);
251251
}
252252
return null;
253253
}
@@ -288,8 +288,8 @@ private Field convertToDocValue(final String content) {
288288
default -> new BinaryDocValuesField(fieldName, new BytesRef(content));
289289
};
290290
} catch (final NumberFormatException | XPathException e) {
291-
// wrong type: ignore
292-
LOG.error("Cannot convert field {} to type {}. Content was: {}", fieldName, Type.getTypeName(type), content);
291+
// NOTE(AR) report inability to index value
292+
LOG.warn("Cannot convert field {} to type {}. Content was: {}", fieldName, Type.getTypeName(type), content);
293293
return null;
294294
}
295295
}

0 commit comments

Comments
 (0)