Skip to content

Commit a675520

Browse files
committed
Change to an abstract class
1 parent 40811eb commit a675520

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

server/src/main/java/org/elasticsearch/index/codec/vectors/DirectIOCapableFlatVectorsFormat.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
import java.io.IOException;
1616

17-
public interface DirectIOCapableFlatVectorsFormat {
18-
FlatVectorsReader fieldsReader(SegmentReadState state, boolean useDirectIO) throws IOException;
17+
public abstract class DirectIOCapableFlatVectorsFormat extends AbstractFlatVectorsFormat {
18+
protected DirectIOCapableFlatVectorsFormat(String name) {
19+
super(name);
20+
}
21+
22+
public abstract FlatVectorsReader fieldsReader(SegmentReadState state, boolean useDirectIO) throws IOException;
1923
}

server/src/main/java/org/elasticsearch/index/codec/vectors/es93/DirectIOCapableLucene99FlatVectorsFormat.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import java.io.IOException;
2929
import java.util.Set;
3030

31-
public class DirectIOCapableLucene99FlatVectorsFormat extends AbstractFlatVectorsFormat implements DirectIOCapableFlatVectorsFormat {
31+
public class DirectIOCapableLucene99FlatVectorsFormat extends DirectIOCapableFlatVectorsFormat {
3232

3333
static final String NAME = "Lucene99FlatVectorsFormat";
3434

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2044,8 +2044,7 @@ public BBQHnswIndexOptions(int m, int efConstruction, RescoreVector rescoreVecto
20442044
@Override
20452045
KnnVectorsFormat getVectorsFormat(ElementType elementType) {
20462046
assert elementType == ElementType.FLOAT;
2047-
var format = new ES93HnswBinaryQuantizedVectorsFormat(m, efConstruction, onDiskRescore);
2048-
return format;
2047+
return new ES93HnswBinaryQuantizedVectorsFormat(m, efConstruction, onDiskRescore);
20492048
}
20502049

20512050
@Override

0 commit comments

Comments
 (0)