For those experiencing the same issue, if you use Gradle, it downloads the library as a .zip
file. While I am not entirely sure if this resolves the problem, adding unzipping modules seems to help:
configurations {
knnZip
}
dependencies {
knnZip 'org.opensearch.plugin:opensearch-knn:2.15.0.0@zip'
}
task unzipKnn(type: Copy) {
from zipTree(configurations.knnZip.singleFile)
into "$buildDir/libs/opensearch-knn"
}
tasks.named('build') {
dependsOn 'unzipKnn'
}
sourceSets {
main {
runtimeClasspath += fileTree(dir: "$buildDir/libs/opensearch-knn", include: '**/*.jar')
}
}
then clean build as ./gradlew clean build
.