From 5be66a0f3c4fc12c9560cf1198bc7faa89b3d180 Mon Sep 17 00:00:00 2001 From: Shreyansh Ray Date: Fri, 10 Jan 2025 16:56:50 +0530 Subject: [PATCH] Nit fixes in Search path for testing --- .../src/main/java/org/opensearch/search/fetch/FetchPhase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/org/opensearch/search/fetch/FetchPhase.java b/server/src/main/java/org/opensearch/search/fetch/FetchPhase.java index dd8f8965fa96d..a54f07ab943de 100644 --- a/server/src/main/java/org/opensearch/search/fetch/FetchPhase.java +++ b/server/src/main/java/org/opensearch/search/fetch/FetchPhase.java @@ -375,7 +375,7 @@ private HitContext prepareNonNestedHitContext( //if (fieldsVisitor.source() != null) { hitContext.sourceLookup().setSource(fieldsVisitor.source()); try { - Map sourceAsMap = buildUsingDocValues(docId, subReaderContext.reader(), context.mapperService(), context.indexShard()); + Map sourceAsMap = buildUsingDocValues(subDocId, subReaderContext.reader(), context.mapperService(), context.indexShard()); sourceAsMap = unflatten(sourceAsMap); try (XContentBuilder builder = XContentFactory.jsonBuilder()) { builder.map(sourceAsMap);