Skip to content

Commit dda00b7

Browse files
authored
Restore original "is within leaf" value in SparseVectorFieldMapper (#118380) (#118456)
1 parent e355d98 commit dda00b7

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
@@ -171,6 +171,7 @@ public void parse(DocumentParserContext context) throws IOException {
171171
);
172172
}
173173

174+
final boolean isWithinLeaf = context.path().isWithinLeafObject();
174175
String feature = null;
175176
try {
176177
// make sure that we don't expand dots in field names while parsing
@@ -205,7 +206,7 @@ public void parse(DocumentParserContext context) throws IOException {
205206
context.addToFieldNames(fieldType().name());
206207
}
207208
} finally {
208-
context.path().setWithinLeafObject(false);
209+
context.path().setWithinLeafObject(isWithinLeaf);
209210
}
210211
}
211212

0 commit comments

Comments
 (0)