From a5ebbcdc09a5eb246d5b8f7562dbac676c77d93b Mon Sep 17 00:00:00 2001 From: Jim Ferenczi Date: Tue, 17 Sep 2024 23:40:49 +0100 Subject: [PATCH] fix another test --- .../index/mapper/vectors/DenseVectorFieldMapperTests.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapperTests.java index 3f274a7a5b0bc..eaebe250ddf73 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapperTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/vectors/DenseVectorFieldMapperTests.java @@ -1550,7 +1550,8 @@ protected void assertFetch(MapperService mapperService, String field, Object val ValueFetcher nativeFetcher = ft.valueFetcher(searchExecutionContext, format); ParsedDocument doc = mapperService.documentMapper().parse(source); withLuceneIndex(mapperService, iw -> iw.addDocuments(doc.docs()), ir -> { - Source s = SourceProvider.fromStoredFields().getSource(ir.leaves().get(0), 0); + Source s = SourceProvider.fromLookup(mapperService.mappingLookup(), mapperService.getMapperMetrics().sourceFieldMetrics()) + .getSource(ir.leaves().get(0), 0); nativeFetcher.setNextReader(ir.leaves().get(0)); List fromNative = nativeFetcher.fetchValues(s, 0, new ArrayList<>()); DenseVectorFieldType denseVectorFieldType = (DenseVectorFieldType) ft;