|
3 | 3 | * SPDX-License-Identifier: Apache-2.0
|
4 | 4 | */
|
5 | 5 |
|
6 |
| -package org.opensearch.knn.index.codec.KNN950Codec; |
| 6 | +package org.opensearch.knn.index.codec.KNN990Codec; |
7 | 7 |
|
8 | 8 | import lombok.SneakyThrows;
|
9 | 9 | import org.apache.lucene.codecs.Codec;
|
|
14 | 14 | import java.util.Optional;
|
15 | 15 | import java.util.function.Function;
|
16 | 16 |
|
17 |
| -import static org.opensearch.knn.index.codec.KNNCodecVersion.V_9_5_0; |
| 17 | +import static org.opensearch.knn.index.codec.KNNCodecVersion.V_9_9_0; |
18 | 18 |
|
19 |
| -public class KNN950CodecTests extends KNNCodecTestCase { |
| 19 | +public class KNN990CodecTests extends KNNCodecTestCase { |
20 | 20 |
|
21 | 21 | @SneakyThrows
|
22 | 22 | public void testMultiFieldsKnnIndex() {
|
23 |
| - testMultiFieldsKnnIndex(KNN950Codec.builder().delegate(V_9_5_0.getDefaultCodecDelegate()).build()); |
| 23 | + testMultiFieldsKnnIndex(KNN990Codec.builder().delegate(V_9_9_0.getDefaultCodecDelegate()).build()); |
24 | 24 | }
|
25 | 25 |
|
26 | 26 | @SneakyThrows
|
27 | 27 | public void testBuildFromModelTemplate() {
|
28 |
| - testBuildFromModelTemplate((KNN950Codec.builder().delegate(V_9_5_0.getDefaultCodecDelegate()).build())); |
| 28 | + testBuildFromModelTemplate((KNN990Codec.builder().delegate(V_9_9_0.getDefaultCodecDelegate()).build())); |
29 | 29 | }
|
30 | 30 |
|
31 | 31 | // Ensure that the codec is able to return the correct per field knn vectors format for codec
|
32 | 32 | public void testCodecSetsCustomPerFieldKnnVectorsFormat() {
|
33 |
| - final Codec codec = new KNN950Codec(); |
34 |
| - assertTrue(codec.knnVectorsFormat() instanceof KNN950PerFieldKnnVectorsFormat); |
| 33 | + final Codec codec = new KNN990Codec(); |
| 34 | + assertTrue(codec.knnVectorsFormat() instanceof KNN990PerFieldKnnVectorsFormat); |
35 | 35 | }
|
36 | 36 |
|
37 | 37 | // IMPORTANT: When this Codec is moved to a backwards Codec, this test needs to be removed, because it attempts to
|
38 | 38 | // write with a read only codec, which will fail
|
39 | 39 | @SneakyThrows
|
40 | 40 | public void testKnnVectorIndex() {
|
41 | 41 | Function<MapperService, PerFieldKnnVectorsFormat> perFieldKnnVectorsFormatProvider = (
|
42 |
| - mapperService) -> new KNN950PerFieldKnnVectorsFormat(Optional.of(mapperService)); |
| 42 | + mapperService) -> new KNN990PerFieldKnnVectorsFormat(Optional.of(mapperService)); |
43 | 43 |
|
44 |
| - Function<PerFieldKnnVectorsFormat, Codec> knnCodecProvider = (knnVectorFormat) -> KNN950Codec.builder() |
45 |
| - .delegate(V_9_5_0.getDefaultCodecDelegate()) |
| 44 | + Function<PerFieldKnnVectorsFormat, Codec> knnCodecProvider = (knnVectorFormat) -> KNN990Codec.builder() |
| 45 | + .delegate(V_9_9_0.getDefaultCodecDelegate()) |
46 | 46 | .knnVectorsFormat(knnVectorFormat)
|
47 | 47 | .build();
|
48 | 48 |
|
|
0 commit comments