File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
server/src/main/java/org/elasticsearch/index/codec/vectors/es93 Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 2121
2222import org .apache .lucene .codecs .hnsw .FlatVectorsScorer ;
2323import org .apache .lucene .codecs .lucene90 .IndexedDISI ;
24+ import org .apache .lucene .codecs .lucene95 .HasIndexSlice ;
2425import org .apache .lucene .codecs .lucene95 .OrdToDocDISIReaderConfiguration ;
2526import org .apache .lucene .index .FloatVectorValues ;
2627import org .apache .lucene .index .VectorEncoding ;
@@ -63,6 +64,10 @@ abstract class OffHeapBFloat16VectorValues extends FloatVectorValues {
6364 this .flatVectorsScorer = flatVectorsScorer ;
6465 bfloatBytes = new byte [dimension * BFloat16 .BYTES ];
6566 value = new float [dimension ];
67+
68+ assert (this instanceof HasIndexSlice ) == false
69+ : "BFloat16 should not implement HasIndexSlice until a bfloat16 scorer is created,"
70+ + " else Lucene99MemorySegmentFlatVectorsScorer will try to access 4-byte floats here" ;
6671 }
6772
6873 @ Override
You can’t perform that action at this time.
0 commit comments