Skip to content

Commit

Permalink
Merge branch 'opensearch-project:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Vikasht34 authored Aug 2, 2024
2 parents 25320ff + ea8a635 commit 6af5d8f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
Build-k-NN-Linux:
strategy:
matrix:
java: [11, 17, 21]
java: [21]

name: Build and Test k-NN Plugin on Linux
runs-on: ubuntu-latest
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
Build-k-NN-MacOS:
strategy:
matrix:
java: [ 11, 17, 21 ]
java: [ 21 ]

name: Build and Test k-NN Plugin on MacOS
needs: Get-CI-Image-Tag
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
Build-k-NN-Windows:
strategy:
matrix:
java: [ 11, 17, 21 ]
java: [ 21 ]

name: Build and Test k-NN Plugin on Windows
needs: Get-CI-Image-Tag
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/backwards_compatibility_tests_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
Restart-Upgrade-BWCTests-k-NN:
strategy:
matrix:
java: [ 11, 17 ]
java: [ 21 ]
os: [ubuntu-latest]
bwc_version : [ "2.0.1", "2.1.0", "2.2.1", "2.3.0", "2.4.1", "2.5.0", "2.6.0", "2.7.0", "2.8.0", "2.9.0", "2.10.0", "2.11.0", "2.12.0", "2.13.0", "2.14.0", "2.15.0", "2.16.0-SNAPSHOT"]
opensearch_version : [ "3.0.0-SNAPSHOT" ]
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
Rolling-Upgrade-BWCTests-k-NN:
strategy:
matrix:
java: [ 11, 17 ]
java: [ 21 ]
os: [ubuntu-latest]
bwc_version: [ "2.16.0-SNAPSHOT" ]
opensearch_version: [ "3.0.0-SNAPSHOT" ]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 11
java-version: 21
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Enhancements
### Bug Fixes
### Infrastructure
* Removed JDK 11 and 17 version from CI runs [#1921](https://github.com/opensearch-project/k-NN/pull/1921)
### Documentation
### Maintenance
### Refactoring
Expand All @@ -20,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
### Infrastructure
### Documentation
### Maintenance
* Fix a flaky unit test:testMultiFieldsKnnIndex, which was failing due to inconsistent merge behaviors [#1924](https://github.com/opensearch-project/k-NN/pull/1924)
### Refactoring
* Introduce KNNVectorValues interface to iterate on different types of Vector values during indexing and search [#1897](https://github.com/opensearch-project/k-NN/pull/1897)
* Clean up parsing for query [#1824](https://github.com/opensearch-project/k-NN/pull/1824)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,28 +137,27 @@ public void testMultiFieldsKnnIndex(Codec codec) throws Exception {
Document doc = new Document();
doc.add(vectorField);
writer.addDocument(doc);
writer.close();
// ensuring the refresh happens, to create the segment and hnsw file
writer.flush();

/**
* Add doc with field "my_vector"
*/
IndexWriterConfig iwc1 = newIndexWriterConfig();
iwc1.setMergeScheduler(new SerialMergeScheduler());
iwc1.setCodec(ACTUAL_CODEC);
writer = new RandomIndexWriter(random(), dir, iwc1);
float[] array1 = { 6.0f, 14.0f };
VectorField vectorField1 = new VectorField("my_vector", array1, sampleFieldType);
Document doc1 = new Document();
doc1.add(vectorField1);
writer.addDocument(doc1);
// ensuring the refresh happens, to create the segment and hnsw file
writer.flush();
IndexReader reader = writer.getReader();
writer.close();
ResourceWatcherService resourceWatcherService = createDisabledResourceWatcherService();
NativeMemoryLoadStrategy.IndexLoadStrategy.initialize(resourceWatcherService);
List<String> hnswfiles = Arrays.stream(dir.listAll()).filter(x -> x.contains("hnsw")).collect(Collectors.toList());

// there should be 2 hnsw index files created. one for test_vector and one for my_vector
assertEquals(hnswfiles.size(), 2);
assertEquals(2, hnswfiles.size());
assertEquals(hnswfiles.stream().filter(x -> x.contains("test_vector")).collect(Collectors.toList()).size(), 1);
assertEquals(hnswfiles.stream().filter(x -> x.contains("my_vector")).collect(Collectors.toList()).size(), 1);

Expand Down

0 comments on commit 6af5d8f

Please sign in to comment.