Skip to content

Commit 1111dce

Browse files
committed
Fix BinaryDocValuesSyntheticFieldLoaderLayer#valueCount
1 parent c1965a1 commit 1111dce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

server/src/main/java/org/elasticsearch/index/mapper/BinaryDocValuesSyntheticFieldLoaderLayer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ protected BinaryDocValuesSyntheticFieldLoaderLayer(String name) {
3131

3232
@Override
3333
public long valueCount() {
34-
return bytesValues.docValueCount();
34+
return bytesValues == null ? 0 : bytesValues.docValueCount();
3535
}
3636

3737
@Override
3838
public DocValuesLoader docValuesLoader(LeafReader leafReader, int[] docIdsInLeaf) throws IOException {
3939
var docValues = leafReader.getBinaryDocValues(name);
4040
if (docValues == null) {
41+
bytesValues = null;
4142
return null;
4243
}
4344

0 commit comments

Comments
 (0)