Skip to content

Commit f0fce25

Browse files
committed
fix
1 parent 8ccfb80 commit f0fce25

File tree

1 file changed

+3
-2
lines changed
  • server/src/main/java/org/elasticsearch/index/engine

1 file changed

+3
-2
lines changed

server/src/main/java/org/elasticsearch/index/engine/Engine.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,14 +301,15 @@ public DenseVectorStats denseVectorStats(MappingLookup mappingLookup) {
301301
protected final DenseVectorStats denseVectorStats(IndexReader indexReader, List<DenseVectorFieldMapper> fields) {
302302
// we don't wait for a pending refreshes here since it's a stats call instead we mark it as accessed only which will cause
303303
// the next scheduled refresh to go through and refresh the stats as well
304+
var stats = new DenseVectorStats();
304305
for (LeafReaderContext readerContext : indexReader.leaves()) {
305306
try {
306-
return getDenseVectorStats(readerContext.reader(), fields);
307+
stats.add(getDenseVectorStats(readerContext.reader(), fields));
307308
} catch (IOException e) {
308309
logger.trace(() -> "failed to get dense vector stats for [" + readerContext + "]", e);
309310
}
310311
}
311-
return new DenseVectorStats();
312+
return stats;
312313
}
313314

314315
private DenseVectorStats getDenseVectorStats(final LeafReader atomicReader, List<DenseVectorFieldMapper> fieldMappers)

0 commit comments

Comments
 (0)