Skip to content

Commit

Permalink
Adding fix for test knn index replication integ test failure
Browse files Browse the repository at this point in the history
Signed-off-by: Mohit Kumar <[email protected]>
  • Loading branch information
mohitamg committed Feb 7, 2025
1 parent 17ee1c7 commit 6a7eeb2
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import org.opensearch.client.RequestOptions
import org.opensearch.client.indices.CreateIndexRequest
import org.opensearch.common.xcontent.XContentType
import org.opensearch.common.CheckedRunnable
import static org.opensearch.test.OpenSearchTestCase.assertBusy
import org.opensearch.test.OpenSearchTestCase.assertBusy
import org.opensearch.client.indices.PutMappingRequest
import org.junit.Assert
import java.util.Locale
Expand Down Expand Up @@ -94,7 +94,8 @@ class BasicReplicationIT : MultiClusterRestTestCase() {
val leaderIndexName = randomAlphaOfLength(10).toLowerCase(Locale.ROOT)
val followerIndexNameInitial = randomAlphaOfLength(10).toLowerCase(Locale.ROOT)
val followerIndexName = randomAlphaOfLength(10).toLowerCase(Locale.ROOT)
val KNN_INDEX_MAPPING = "{\"properties\":{\"my_vector1\":{\"type\":\"knn_vector\",\"dimension\":2},\"my_vector2\":{\"type\":\"knn_vector\",\"dimension\":4}}}"
val KNN_INDEX_MAPPING = "{\"settings\":{\"index\":{\"knn\":true}},\"mappings\":{\"properties\":{\"my_vector1\":{\"type\":\"knn_vector\",\"dimension\":2},\"my_vector2\":{\"type\":\"knn_vector\",\"dimension\":4}}}}"

// create knn-index on leader cluster
try {
val createIndexResponse = leaderClient.indices().create(
Expand Down

0 comments on commit 6a7eeb2

Please sign in to comment.