Don't convert source to UTF-8 it might not be valid UTF-8

This commit is contained in:
Simon Willnauer 2017-01-27 22:31:44 +01:00
parent 2e48fb8294
commit e946ec0c33
1 changed files with 2 additions and 2 deletions

View File

@ -555,8 +555,8 @@ public class IndexShard extends AbstractIndexShardComponent implements IndicesCl
index = indexingOperationListeners.preIndex(shardId, index);
try {
if (logger.isTraceEnabled()) {
logger.trace("index [{}][{}] (seq# [{}], source {})",
index.type(), index.id(), index.seqNo(), index.source().utf8ToString());
// don't use index.source().utf8ToString() here source might not be valid UTF-8
logger.trace("index [{}][{}] (seq# [{}])", index.type(), index.id(), index.seqNo());
}
result = engine.index(index);
} catch (Exception e) {