janhoy commented on code in PR #1151:
URL: https://github.com/apache/solr/pull/1151#discussion_r4767268813
##########
solr/core/src/java/org/apache/solr/update/DocumentBuilder.java:
##########
@@ -163,21 +168,20 @@ public static Document toDocument(
&& field.getValueCount() > 1
&& !(sfield.getType() instanceof DenseVectorField)) {
- // Ensure we do not flood the logs with extremely long values
- String fieldValue = field.getValue().toString();
- if (fieldValue.length() > MAX_VALUES_AS_STRING_LENGTH) {
- assert fieldValue.endsWith("]");
- fieldValue = fieldValue.substring(0, MAX_VALUES_AS_STRING_LENGTH -
4) + "...]";
+ if (log.isTraceEnabled()) {
+ log.trace(
+ "{}multiple values encountered for non multiValued field {}: {}",
Review Comment:
It is the doc id prefix: `getID()` renders `[doc=x] ` (empty without a
uniqueKey), same as in the exception message.
##########
solr/core/src/java/org/apache/solr/update/DocumentBuilder.java:
##########
@@ -363,6 +369,27 @@ private static boolean addCopyFields(
return used;
}
+ private static void traceFieldError(
Review Comment:
Keeping this PR to option B; a shared value-redaction utility (option C)
would be a good follow-up JIRA.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]