Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.apache.lucene.store.IndexOutput;
import org.apache.lucene.tests.util.LuceneTestCase;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.index.codec.vectors.es818.ES818BinaryQuantizedVectorsFormat;
import org.elasticsearch.plugins.Plugin;
import org.elasticsearch.search.vectors.KnnSearchBuilder;
import org.elasticsearch.search.vectors.VectorData;
Expand Down Expand Up @@ -46,6 +47,7 @@ public class DirectIOIT extends ESIntegTestCase {

@BeforeClass
public static void checkSupported() throws IOException {
assumeTrue("test requires direct IO", ES818BinaryQuantizedVectorsFormat.USE_DIRECT_IO);
Path path = createTempDir("directIOProbe");
try (Directory dir = open(path); IndexOutput out = dir.createOutput("out", IOContext.DEFAULT)) {
out.writeString("test");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
*/
public class ES818BinaryQuantizedVectorsFormat extends FlatVectorsFormat {

static final boolean USE_DIRECT_IO = Boolean.parseBoolean(System.getProperty("vector.rescoring.directio", "true"));
public static final boolean USE_DIRECT_IO = Boolean.parseBoolean(System.getProperty("vector.rescoring.directio", "false"));

public static final String BINARIZED_VECTOR_COMPONENT = "BVEC";
public static final String NAME = "ES818BinaryQuantizedVectorsFormat";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ private Directory newFSDirectory() throws IOException {
}

static void checkDirectIOSupported() {
assumeTrue("test requires direct IO", ES818BinaryQuantizedVectorsFormat.USE_DIRECT_IO);
Path path = createTempDir("directIOProbe");
try (Directory dir = open(path); IndexOutput out = dir.createOutput("out", IOContext.DEFAULT)) {
out.writeString("test");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ private Directory newFSDirectory() throws IOException {
}

static void checkDirectIOSupported() {
assumeTrue("test requires direct IO", ES818BinaryQuantizedVectorsFormat.USE_DIRECT_IO);
Path path = createTempDir("directIOProbe");
try (Directory dir = open(path); IndexOutput out = dir.createOutput("out", IOContext.DEFAULT)) {
out.writeString("test");
Expand Down