File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
server/src/main/java/org/elasticsearch/index/engine Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments