diff --git a/server/src/main/java/org/elasticsearch/index/mapper/IdLoader.java b/server/src/main/java/org/elasticsearch/index/mapper/IdLoader.java index 2f45d37fed51b..6fc9820a081db 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/IdLoader.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/IdLoader.java @@ -77,8 +77,8 @@ public IdLoader.Leaf leaf(LeafStoredFieldLoader loader, LeafReader reader, int[] int docId = docIdsInLeaf[i]; var routingBuilder = builders[i]; - tsIdDocValues.advanceExact(docId); - assert tsIdDocValues.getValueCount() == 1; + boolean found = tsIdDocValues.advanceExact(docId); + assert found; BytesRef tsid = tsIdDocValues.lookupOrd(tsIdDocValues.ordValue()); timestampDocValues.advanceExact(docId); assert timestampDocValues.docValueCount() == 1;