Skip to content

Commit cadfe8a

Browse files
committed
RDBC-921: enable vectorSearch tests for v >= 7.0
1 parent 2500e14 commit cadfe8a

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

src/test/java/net/ravendb/client/documents/queries/vectorSearch/VectorSearchTest.java

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
import net.ravendb.client.documents.session.VectorEmbeddingFieldValueFactory;
1010
import net.ravendb.client.documents.indexes.IndexType;
1111
import com.google.common.collect.Sets;
12+
import net.ravendb.client.infrastructure.EnableOn70Server;
1213
import org.junit.jupiter.api.Test;
1314

1415
import java.util.Collections;
1516
import static org.junit.jupiter.api.Assertions.assertEquals;
1617
import static org.assertj.core.api.Assertions.assertThat;
1718

19+
1820
public class VectorSearchTest extends RemoteTestBase {
1921

2022
public static class User {
@@ -82,6 +84,7 @@ public void setTextualValue(String textualValue) {
8284
}
8385
}
8486

87+
@EnableOn70Server
8588
@Test
8689
public void shouldGenerateRqlForVectorSearchWithInt8QuantizedEmbeddingField() {
8790
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -108,6 +111,7 @@ public void shouldGenerateRqlForVectorSearchWithInt8QuantizedEmbeddingField() {
108111
}
109112
}
110113

114+
@EnableOn70Server
111115
@Test
112116
public void shouldGenerateRqlForVectorSearchWithTextEmbeddingUsingAiTask() {
113117
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -132,6 +136,7 @@ public void shouldGenerateRqlForVectorSearchWithTextEmbeddingUsingAiTask() {
132136
}
133137
}
134138

139+
@EnableOn70Server
135140
@Test
136141
public void shouldGenerateRqlForBasicVectorSearchWithNumericEmbeddingValues() {
137142
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -159,6 +164,7 @@ public void shouldGenerateRqlForBasicVectorSearchWithNumericEmbeddingValues() {
159164
}
160165
}
161166

167+
@EnableOn70Server
162168
@Test
163169
public void shouldGenerateRqlForVectorSearchWithBase64EncodedEmbedding() {
164170
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -185,6 +191,7 @@ public void shouldGenerateRqlForVectorSearchWithBase64EncodedEmbedding() {
185191
}
186192
}
187193

194+
@EnableOn70Server
188195
@Test
189196
public void shouldGenerateRqlForVectorSearchWithTextFieldAndInt8Quantization() {
190197
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -211,6 +218,7 @@ public void shouldGenerateRqlForVectorSearchWithTextFieldAndInt8Quantization() {
211218
}
212219
}
213220

221+
@EnableOn70Server
214222
@Test
215223
public void shouldGenerateRqlForVectorSearchUsingPropertySelectorForEmbeddingField() {
216224
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -237,6 +245,7 @@ public void shouldGenerateRqlForVectorSearchUsingPropertySelectorForEmbeddingFie
237245
}
238246
}
239247

248+
@EnableOn70Server
240249
@Test
241250
public void shouldGenerateRqlForVectorSearchWithPropertySelectorAndExplicitInt8Quantization() {
242251
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -264,6 +273,7 @@ public void shouldGenerateRqlForVectorSearchWithPropertySelectorAndExplicitInt8Q
264273
}
265274
}
266275

276+
@EnableOn70Server
267277
@Test
268278
public void shouldGenerateRqlForVectorSearchWithPropertySelectorAndExplicitBinaryQuantization() {
269279
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -290,6 +300,7 @@ public void shouldGenerateRqlForVectorSearchWithPropertySelectorAndExplicitBinar
290300
}
291301
}
292302

303+
@EnableOn70Server
293304
@Test
294305
public void shouldGenerateRqlForVectorSearchWithPropertySelectorForTextFieldConversion() {
295306
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -316,6 +327,7 @@ public void shouldGenerateRqlForVectorSearchWithPropertySelectorForTextFieldConv
316327
}
317328
}
318329

330+
@EnableOn70Server
319331
@Test
320332
public void shouldGenerateRqlForVectorSearchWithTextFieldUsingNamedAiTask() {
321333
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -344,6 +356,7 @@ public void shouldGenerateRqlForVectorSearchWithTextFieldUsingNamedAiTask() {
344356
}
345357
}
346358

359+
@EnableOn70Server
347360
@Test
348361
public void shouldGenerateRqlForVectorSearchWithBase64FieldUsingPropertySelector() {
349362
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -370,6 +383,7 @@ public void shouldGenerateRqlForVectorSearchWithBase64FieldUsingPropertySelector
370383
}
371384
}
372385

386+
@EnableOn70Server
373387
@Test
374388
public void shouldGenerateRqlForVectorSearchWithSingleToInt8ConversionQuantization() {
375389
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -398,6 +412,7 @@ public void shouldGenerateRqlForVectorSearchWithSingleToInt8ConversionQuantizati
398412
}
399413
}
400414

415+
@EnableOn70Server
401416
@Test
402417
public void shouldGenerateRqlForVectorSearchWithSingleToBinaryConversionQuantization() {
403418
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -426,6 +441,7 @@ public void shouldGenerateRqlForVectorSearchWithSingleToBinaryConversionQuantiza
426441
}
427442
}
428443

444+
@EnableOn70Server
429445
@Test
430446
public void shouldGenerateRqlForVectorSearchWithTextFieldAndInt8TargetQuantization() {
431447
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -454,6 +470,7 @@ public void shouldGenerateRqlForVectorSearchWithTextFieldAndInt8TargetQuantizati
454470
}
455471
}
456472

473+
@EnableOn70Server
457474
@Test
458475
public void shouldGenerateRqlForVectorSearchWithTextAiTaskAndBinaryQuantization() {
459476
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -483,6 +500,7 @@ public void shouldGenerateRqlForVectorSearchWithTextAiTaskAndBinaryQuantization(
483500
}
484501
}
485502

503+
@EnableOn70Server
486504
@Test
487505
public void shouldGenerateRqlForVectorSearchWithWithFieldMethodAndPropertySelector() {
488506
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -510,6 +528,7 @@ public void shouldGenerateRqlForVectorSearchWithWithFieldMethodAndPropertySelect
510528
}
511529
}
512530

531+
@EnableOn70Server
513532
@Test
514533
public void shouldGenerateRqlForVectorSearchWithExactMatchingParameter() {
515534
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -537,6 +556,7 @@ public void shouldGenerateRqlForVectorSearchWithExactMatchingParameter() {
537556
}
538557
}
539558

559+
@EnableOn70Server
540560
@Test
541561
public void shouldGenerateRqlForVectorSearchWithSimilarityCandidatesAndExactParameters() {
542562
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -566,6 +586,7 @@ public void shouldGenerateRqlForVectorSearchWithSimilarityCandidatesAndExactPara
566586
}
567587
}
568588

589+
@EnableOn70Server
569590
@Test
570591
public void shouldGenerateRqlForVectorSearchWithExactParameterAndEmbeddingField() {
571592
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -593,6 +614,7 @@ public void shouldGenerateRqlForVectorSearchWithExactParameterAndEmbeddingField(
593614
}
594615
}
595616

617+
@EnableOn70Server
596618
@Test
597619
public void shouldGenerateRqlForVectorSearchWithExactParameterAndTextEmbeddingWithSimilarity() {
598620
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -621,6 +643,7 @@ public void shouldGenerateRqlForVectorSearchWithExactParameterAndTextEmbeddingWi
621643
}
622644
}
623645

646+
@EnableOn70Server
624647
@Test
625648
public void shouldGenerateRqlForVectorSearchWithMultipleTextQueriesAsInput() {
626649
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -648,6 +671,7 @@ public void shouldGenerateRqlForVectorSearchWithMultipleTextQueriesAsInput() {
648671
}
649672
}
650673

674+
@EnableOn70Server
651675
@Test
652676
public void shouldGenerateRqlForVectorSearchWithMultipleEmbeddingVectorsAsInput() {
653677
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -678,6 +702,7 @@ public void shouldGenerateRqlForVectorSearchWithMultipleEmbeddingVectorsAsInput(
678702
}
679703
}
680704

705+
@EnableOn70Server
681706
@Test
682707
public void shouldGenerateRqlForVectorSearchWithMultipleEmbeddingsAndInt8Quantization() {
683708
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -709,6 +734,7 @@ public void shouldGenerateRqlForVectorSearchWithMultipleEmbeddingsAndInt8Quantiz
709734
}
710735
}
711736

737+
@EnableOn70Server
712738
@Test
713739
public void shouldGenerateRqlForVectorSearchWithMultipleTextsAiTaskAndBinaryQuantization() {
714740
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory();
@@ -739,6 +765,7 @@ public void shouldGenerateRqlForVectorSearchWithMultipleTextsAiTaskAndBinaryQuan
739765
}
740766
}
741767

768+
@EnableOn70Server
742769
@Test
743770
public void shouldGenerateRqlForVectorSearchWithFieldNameAsString() {
744771
VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory();
@@ -764,6 +791,7 @@ public void shouldGenerateRqlForVectorSearchWithFieldNameAsString() {
764791
}
765792
}
766793

794+
@EnableOn70Server
767795
@Test
768796
public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndOptions() {
769797
VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory();
@@ -791,6 +819,7 @@ public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndOptions() {
791819
}
792820
}
793821

822+
@EnableOn70Server
794823
@Test
795824
public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndExactParameter() {
796825
VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory();
@@ -817,6 +846,7 @@ public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndExactParamet
817846
}
818847
}
819848

849+
@EnableOn70Server
820850
@Test
821851
public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndMultipleEmbeddings() {
822852
VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory();
@@ -846,6 +876,7 @@ public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndMultipleEmbe
846876
}
847877
}
848878

879+
@EnableOn70Server
849880
@Test
850881
public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndByTextFactory() {
851882
VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory();
@@ -871,6 +902,7 @@ public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndByTextFactor
871902
}
872903
}
873904

905+
@EnableOn70Server
874906
@Test
875907
public void shouldCreateIndexDefinitionWithVectorSearchFieldAndProperConfiguration() {
876908
try (IDocumentStore store = getDocumentStore()) {
@@ -898,6 +930,7 @@ public void shouldCreateIndexDefinitionWithVectorSearchFieldAndProperConfigurati
898930
}
899931
}
900932

933+
@EnableOn70Server
901934
@Test
902935
public void shouldCreateIndexWithVectorSearchConfigurationUsingClassBasedDefinition() {
903936
try (IDocumentStore store = getDocumentStore()) {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package net.ravendb.client.infrastructure;
2+
3+
public @interface EnableOn70Server {
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package net.ravendb.client.infrastructure;
2+
3+
public class EnableOn70ServerCondition {
4+
}

0 commit comments

Comments
 (0)