9
9
import net .ravendb .client .documents .session .VectorEmbeddingFieldValueFactory ;
10
10
import net .ravendb .client .documents .indexes .IndexType ;
11
11
import com .google .common .collect .Sets ;
12
+ import net .ravendb .client .infrastructure .EnableOn70Server ;
12
13
import org .junit .jupiter .api .Test ;
13
14
14
15
import java .util .Collections ;
15
16
import static org .junit .jupiter .api .Assertions .assertEquals ;
16
17
import static org .assertj .core .api .Assertions .assertThat ;
17
18
19
+
18
20
public class VectorSearchTest extends RemoteTestBase {
19
21
20
22
public static class User {
@@ -82,6 +84,7 @@ public void setTextualValue(String textualValue) {
82
84
}
83
85
}
84
86
87
+ @ EnableOn70Server
85
88
@ Test
86
89
public void shouldGenerateRqlForVectorSearchWithInt8QuantizedEmbeddingField () {
87
90
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -108,6 +111,7 @@ public void shouldGenerateRqlForVectorSearchWithInt8QuantizedEmbeddingField() {
108
111
}
109
112
}
110
113
114
+ @ EnableOn70Server
111
115
@ Test
112
116
public void shouldGenerateRqlForVectorSearchWithTextEmbeddingUsingAiTask () {
113
117
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -132,6 +136,7 @@ public void shouldGenerateRqlForVectorSearchWithTextEmbeddingUsingAiTask() {
132
136
}
133
137
}
134
138
139
+ @ EnableOn70Server
135
140
@ Test
136
141
public void shouldGenerateRqlForBasicVectorSearchWithNumericEmbeddingValues () {
137
142
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -159,6 +164,7 @@ public void shouldGenerateRqlForBasicVectorSearchWithNumericEmbeddingValues() {
159
164
}
160
165
}
161
166
167
+ @ EnableOn70Server
162
168
@ Test
163
169
public void shouldGenerateRqlForVectorSearchWithBase64EncodedEmbedding () {
164
170
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -185,6 +191,7 @@ public void shouldGenerateRqlForVectorSearchWithBase64EncodedEmbedding() {
185
191
}
186
192
}
187
193
194
+ @ EnableOn70Server
188
195
@ Test
189
196
public void shouldGenerateRqlForVectorSearchWithTextFieldAndInt8Quantization () {
190
197
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -211,6 +218,7 @@ public void shouldGenerateRqlForVectorSearchWithTextFieldAndInt8Quantization() {
211
218
}
212
219
}
213
220
221
+ @ EnableOn70Server
214
222
@ Test
215
223
public void shouldGenerateRqlForVectorSearchUsingPropertySelectorForEmbeddingField () {
216
224
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -237,6 +245,7 @@ public void shouldGenerateRqlForVectorSearchUsingPropertySelectorForEmbeddingFie
237
245
}
238
246
}
239
247
248
+ @ EnableOn70Server
240
249
@ Test
241
250
public void shouldGenerateRqlForVectorSearchWithPropertySelectorAndExplicitInt8Quantization () {
242
251
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -264,6 +273,7 @@ public void shouldGenerateRqlForVectorSearchWithPropertySelectorAndExplicitInt8Q
264
273
}
265
274
}
266
275
276
+ @ EnableOn70Server
267
277
@ Test
268
278
public void shouldGenerateRqlForVectorSearchWithPropertySelectorAndExplicitBinaryQuantization () {
269
279
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -290,6 +300,7 @@ public void shouldGenerateRqlForVectorSearchWithPropertySelectorAndExplicitBinar
290
300
}
291
301
}
292
302
303
+ @ EnableOn70Server
293
304
@ Test
294
305
public void shouldGenerateRqlForVectorSearchWithPropertySelectorForTextFieldConversion () {
295
306
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -316,6 +327,7 @@ public void shouldGenerateRqlForVectorSearchWithPropertySelectorForTextFieldConv
316
327
}
317
328
}
318
329
330
+ @ EnableOn70Server
319
331
@ Test
320
332
public void shouldGenerateRqlForVectorSearchWithTextFieldUsingNamedAiTask () {
321
333
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -344,6 +356,7 @@ public void shouldGenerateRqlForVectorSearchWithTextFieldUsingNamedAiTask() {
344
356
}
345
357
}
346
358
359
+ @ EnableOn70Server
347
360
@ Test
348
361
public void shouldGenerateRqlForVectorSearchWithBase64FieldUsingPropertySelector () {
349
362
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -370,6 +383,7 @@ public void shouldGenerateRqlForVectorSearchWithBase64FieldUsingPropertySelector
370
383
}
371
384
}
372
385
386
+ @ EnableOn70Server
373
387
@ Test
374
388
public void shouldGenerateRqlForVectorSearchWithSingleToInt8ConversionQuantization () {
375
389
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -398,6 +412,7 @@ public void shouldGenerateRqlForVectorSearchWithSingleToInt8ConversionQuantizati
398
412
}
399
413
}
400
414
415
+ @ EnableOn70Server
401
416
@ Test
402
417
public void shouldGenerateRqlForVectorSearchWithSingleToBinaryConversionQuantization () {
403
418
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -426,6 +441,7 @@ public void shouldGenerateRqlForVectorSearchWithSingleToBinaryConversionQuantiza
426
441
}
427
442
}
428
443
444
+ @ EnableOn70Server
429
445
@ Test
430
446
public void shouldGenerateRqlForVectorSearchWithTextFieldAndInt8TargetQuantization () {
431
447
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -454,6 +470,7 @@ public void shouldGenerateRqlForVectorSearchWithTextFieldAndInt8TargetQuantizati
454
470
}
455
471
}
456
472
473
+ @ EnableOn70Server
457
474
@ Test
458
475
public void shouldGenerateRqlForVectorSearchWithTextAiTaskAndBinaryQuantization () {
459
476
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -483,6 +500,7 @@ public void shouldGenerateRqlForVectorSearchWithTextAiTaskAndBinaryQuantization(
483
500
}
484
501
}
485
502
503
+ @ EnableOn70Server
486
504
@ Test
487
505
public void shouldGenerateRqlForVectorSearchWithWithFieldMethodAndPropertySelector () {
488
506
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -510,6 +528,7 @@ public void shouldGenerateRqlForVectorSearchWithWithFieldMethodAndPropertySelect
510
528
}
511
529
}
512
530
531
+ @ EnableOn70Server
513
532
@ Test
514
533
public void shouldGenerateRqlForVectorSearchWithExactMatchingParameter () {
515
534
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -537,6 +556,7 @@ public void shouldGenerateRqlForVectorSearchWithExactMatchingParameter() {
537
556
}
538
557
}
539
558
559
+ @ EnableOn70Server
540
560
@ Test
541
561
public void shouldGenerateRqlForVectorSearchWithSimilarityCandidatesAndExactParameters () {
542
562
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -566,6 +586,7 @@ public void shouldGenerateRqlForVectorSearchWithSimilarityCandidatesAndExactPara
566
586
}
567
587
}
568
588
589
+ @ EnableOn70Server
569
590
@ Test
570
591
public void shouldGenerateRqlForVectorSearchWithExactParameterAndEmbeddingField () {
571
592
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -593,6 +614,7 @@ public void shouldGenerateRqlForVectorSearchWithExactParameterAndEmbeddingField(
593
614
}
594
615
}
595
616
617
+ @ EnableOn70Server
596
618
@ Test
597
619
public void shouldGenerateRqlForVectorSearchWithExactParameterAndTextEmbeddingWithSimilarity () {
598
620
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -621,6 +643,7 @@ public void shouldGenerateRqlForVectorSearchWithExactParameterAndTextEmbeddingWi
621
643
}
622
644
}
623
645
646
+ @ EnableOn70Server
624
647
@ Test
625
648
public void shouldGenerateRqlForVectorSearchWithMultipleTextQueriesAsInput () {
626
649
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -648,6 +671,7 @@ public void shouldGenerateRqlForVectorSearchWithMultipleTextQueriesAsInput() {
648
671
}
649
672
}
650
673
674
+ @ EnableOn70Server
651
675
@ Test
652
676
public void shouldGenerateRqlForVectorSearchWithMultipleEmbeddingVectorsAsInput () {
653
677
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -678,6 +702,7 @@ public void shouldGenerateRqlForVectorSearchWithMultipleEmbeddingVectorsAsInput(
678
702
}
679
703
}
680
704
705
+ @ EnableOn70Server
681
706
@ Test
682
707
public void shouldGenerateRqlForVectorSearchWithMultipleEmbeddingsAndInt8Quantization () {
683
708
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -709,6 +734,7 @@ public void shouldGenerateRqlForVectorSearchWithMultipleEmbeddingsAndInt8Quantiz
709
734
}
710
735
}
711
736
737
+ @ EnableOn70Server
712
738
@ Test
713
739
public void shouldGenerateRqlForVectorSearchWithMultipleTextsAiTaskAndBinaryQuantization () {
714
740
VectorEmbeddingFieldFactory vectorFieldFactory = new VectorEmbeddingFieldFactory ();
@@ -739,6 +765,7 @@ public void shouldGenerateRqlForVectorSearchWithMultipleTextsAiTaskAndBinaryQuan
739
765
}
740
766
}
741
767
768
+ @ EnableOn70Server
742
769
@ Test
743
770
public void shouldGenerateRqlForVectorSearchWithFieldNameAsString () {
744
771
VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory ();
@@ -764,6 +791,7 @@ public void shouldGenerateRqlForVectorSearchWithFieldNameAsString() {
764
791
}
765
792
}
766
793
794
+ @ EnableOn70Server
767
795
@ Test
768
796
public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndOptions () {
769
797
VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory ();
@@ -791,6 +819,7 @@ public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndOptions() {
791
819
}
792
820
}
793
821
822
+ @ EnableOn70Server
794
823
@ Test
795
824
public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndExactParameter () {
796
825
VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory ();
@@ -817,6 +846,7 @@ public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndExactParamet
817
846
}
818
847
}
819
848
849
+ @ EnableOn70Server
820
850
@ Test
821
851
public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndMultipleEmbeddings () {
822
852
VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory ();
@@ -846,6 +876,7 @@ public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndMultipleEmbe
846
876
}
847
877
}
848
878
879
+ @ EnableOn70Server
849
880
@ Test
850
881
public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndByTextFactory () {
851
882
VectorEmbeddingFieldValueFactory valueFactory = new VectorEmbeddingFieldValueFactory ();
@@ -871,6 +902,7 @@ public void shouldGenerateRqlForVectorSearchWithFieldNameAsStringAndByTextFactor
871
902
}
872
903
}
873
904
905
+ @ EnableOn70Server
874
906
@ Test
875
907
public void shouldCreateIndexDefinitionWithVectorSearchFieldAndProperConfiguration () {
876
908
try (IDocumentStore store = getDocumentStore ()) {
@@ -898,6 +930,7 @@ public void shouldCreateIndexDefinitionWithVectorSearchFieldAndProperConfigurati
898
930
}
899
931
}
900
932
933
+ @ EnableOn70Server
901
934
@ Test
902
935
public void shouldCreateIndexWithVectorSearchConfigurationUsingClassBasedDefinition () {
903
936
try (IDocumentStore store = getDocumentStore ()) {
0 commit comments