Skip to content

Commit 3aa135f

Browse files
committed
Add explanation of BytesRef encodings
1 parent 3cd7d84 commit 3aa135f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,9 @@ public int docId() {
917917
abstract void read(int docId, BytesRefBuilder builder) throws IOException;
918918
}
919919

920+
/**
921+
* Read BinaryDocValues encoded by {@link BinaryFieldMapper.CustomBinaryDocValuesField}
922+
*/
920923
static class BytesRefsFromBinary extends AbstractBytesRefsFromBinary {
921924
private final ByteArrayStreamInput in = new ByteArrayStreamInput();
922925
private final BytesRef scratch = new BytesRef();
@@ -959,6 +962,10 @@ public String toString() {
959962
}
960963
}
961964

965+
/**
966+
* Read BinaryDocValues with no additional structure in the BytesRefs.
967+
* Each BytesRef from the doc values maps directly to a value in the block loader.
968+
*/
962969
public static class BytesRefsFromSimpleBinary extends AbstractBytesRefsFromBinary {
963970
public BytesRefsFromSimpleBinary(BinaryDocValues docValues) {
964971
super(docValues);

0 commit comments

Comments
 (0)