Skip to content

Commit f10ebf6

Browse files
committed
[bugfix] Don't silently swallow the inability to index field values in the Lucene Full Text Index
1 parent 652d4be commit f10ebf6

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
@@ -248,9 +248,9 @@ private Field convertToField(String content) {
248248
default:
249249
return new TextField(fieldName, content, store ? Field.Store.YES : Field.Store.NO);
250250
}
251-
} catch (NumberFormatException | XPathException e) {
252-
// wrong type: ignore
253-
LOG.trace("Cannot convert field {} to type {}. Content was: {}", fieldName, Type.getTypeName(type), content);
251+
} catch (final NumberFormatException | XPathException e) {
252+
// NOTE(AR) report inability to index value
253+
LOG.warn("Cannot convert field {} to type {}. Content was: {}", fieldName, Type.getTypeName(type), content);
254254
}
255255
return null;
256256
}
@@ -297,8 +297,8 @@ private Field convertToDocValue(final String content) {
297297
return new BinaryDocValuesField(fieldName, new BytesRef(content));
298298
}
299299
} catch (final NumberFormatException | XPathException e) {
300-
// wrong type: ignore
301-
LOG.error("Cannot convert field {} to type {}. Content was: {}", fieldName, Type.getTypeName(type), content);
300+
// NOTE(AR) report inability to index value
301+
LOG.warn("Cannot convert field {} to type {}. Content was: {}", fieldName, Type.getTypeName(type), content);
302302
return null;
303303
}
304304
}

0 commit comments

Comments
 (0)