|
49 | 49 | import org.opensearch.index.query.TermQueryBuilder;
|
50 | 50 | import org.opensearch.knn.index.SpaceType;
|
51 | 51 | import org.opensearch.knn.index.VectorDataType;
|
52 |
| -import org.opensearch.knn.index.mapper.KNNVectorFieldMapper; |
| 52 | +import org.opensearch.knn.index.mapper.KNNVectorFieldType; |
53 | 53 | import org.opensearch.knn.index.query.KNNQuery;
|
54 | 54 | import org.opensearch.knn.index.query.KNNQueryBuilder;
|
55 | 55 | import org.opensearch.neuralsearch.util.NeuralSearchClusterTestUtils;
|
@@ -85,7 +85,7 @@ public void testDoToQuery_whenOneSubquery_thenBuildSuccessfully() {
|
85 | 85 | HybridQueryBuilder queryBuilder = new HybridQueryBuilder();
|
86 | 86 | Index dummyIndex = new Index("dummy", "dummy");
|
87 | 87 | QueryShardContext mockQueryShardContext = mock(QueryShardContext.class);
|
88 |
| - KNNVectorFieldMapper.KNNVectorFieldType mockKNNVectorField = mock(KNNVectorFieldMapper.KNNVectorFieldType.class); |
| 88 | + KNNVectorFieldType mockKNNVectorField = mock(KNNVectorFieldType.class); |
89 | 89 | when(mockQueryShardContext.index()).thenReturn(dummyIndex);
|
90 | 90 | when(mockKNNVectorField.getDimension()).thenReturn(4);
|
91 | 91 | when(mockKNNVectorField.getVectorDataType()).thenReturn(VectorDataType.FLOAT);
|
@@ -115,7 +115,7 @@ public void testDoToQuery_whenMultipleSubqueries_thenBuildSuccessfully() {
|
115 | 115 | HybridQueryBuilder queryBuilder = new HybridQueryBuilder();
|
116 | 116 | Index dummyIndex = new Index("dummy", "dummy");
|
117 | 117 | QueryShardContext mockQueryShardContext = mock(QueryShardContext.class);
|
118 |
| - KNNVectorFieldMapper.KNNVectorFieldType mockKNNVectorField = mock(KNNVectorFieldMapper.KNNVectorFieldType.class); |
| 118 | + KNNVectorFieldType mockKNNVectorField = mock(KNNVectorFieldType.class); |
119 | 119 | when(mockQueryShardContext.index()).thenReturn(dummyIndex);
|
120 | 120 | when(mockKNNVectorField.getDimension()).thenReturn(4);
|
121 | 121 | when(mockKNNVectorField.getVectorDataType()).thenReturn(VectorDataType.FLOAT);
|
@@ -366,7 +366,7 @@ public void testToXContent_whenIncomingJsonIsCorrect_thenSuccessful() {
|
366 | 366 | HybridQueryBuilder queryBuilder = new HybridQueryBuilder();
|
367 | 367 | Index dummyIndex = new Index("dummy", "dummy");
|
368 | 368 | QueryShardContext mockQueryShardContext = mock(QueryShardContext.class);
|
369 |
| - KNNVectorFieldMapper.KNNVectorFieldType mockKNNVectorField = mock(KNNVectorFieldMapper.KNNVectorFieldType.class); |
| 369 | + KNNVectorFieldType mockKNNVectorField = mock(KNNVectorFieldType.class); |
370 | 370 | when(mockQueryShardContext.index()).thenReturn(dummyIndex);
|
371 | 371 | when(mockKNNVectorField.getDimension()).thenReturn(4);
|
372 | 372 | when(mockQueryShardContext.fieldMapper(eq(VECTOR_FIELD_NAME))).thenReturn(mockKNNVectorField);
|
@@ -583,7 +583,7 @@ public void testRewrite_whenMultipleSubQueries_thenReturnBuilderForEachSubQuery(
|
583 | 583 | queryBuilder.add(termSubQuery);
|
584 | 584 |
|
585 | 585 | QueryShardContext mockQueryShardContext = mock(QueryShardContext.class);
|
586 |
| - KNNVectorFieldMapper.KNNVectorFieldType mockKNNVectorField = mock(KNNVectorFieldMapper.KNNVectorFieldType.class); |
| 586 | + KNNVectorFieldType mockKNNVectorField = mock(KNNVectorFieldType.class); |
587 | 587 | Index dummyIndex = new Index("dummy", "dummy");
|
588 | 588 | when(mockQueryShardContext.index()).thenReturn(dummyIndex);
|
589 | 589 | when(mockKNNVectorField.getDimension()).thenReturn(4);
|
|
0 commit comments