Skip to content

Commit bcba5bf

Browse files
authored
Restore original "is within leaf" value in SparseVectorFieldMapper (#118380)
1 parent b40a520 commit bcba5bf

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

docs/changelog/118380.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 118380
2+
summary: Restore original "is within leaf" value in `SparseVectorFieldMapper`
3+
area: Mapping
4+
type: bug
5+
issues: []

server/src/main/java/org/elasticsearch/index/mapper/vectors/SparseVectorFieldMapper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ public void parse(DocumentParserContext context) throws IOException {
200200
);
201201
}
202202

203+
final boolean isWithinLeaf = context.path().isWithinLeafObject();
203204
String feature = null;
204205
try {
205206
// make sure that we don't expand dots in field names while parsing
@@ -234,7 +235,7 @@ public void parse(DocumentParserContext context) throws IOException {
234235
context.addToFieldNames(fieldType().name());
235236
}
236237
} finally {
237-
context.path().setWithinLeafObject(false);
238+
context.path().setWithinLeafObject(isWithinLeaf);
238239
}
239240
}
240241

0 commit comments

Comments
 (0)