Skip to content

Commit 3b0d35b

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

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

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

0 commit comments

Comments
 (0)