Skip to content

Commit 7fb51cc

Browse files
author
ergun-kezer
committed
chore: address comments
1 parent 5bbe23c commit 7fb51cc

10 files changed

Lines changed: 158 additions & 1421 deletions

File tree

build.gradle

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,9 @@ dependencies {
366366
//api "io.github.jbellis:jvector-native:${jvector_version}"
367367
implementation 'org.agrona:agrona:1.23.1'
368368

369+
// Lucene sandbox v11 JAR
370+
implementation files("${project.buildDir}/libs/lucene-sandbox-faiss-11.0.0-SNAPSHOT.jar")
371+
369372
// Add this line for SLF4J 2.x compatibility
370373
implementation "org.apache.logging.log4j:log4j-slf4j2-impl:${versions.log4j}"
371374

@@ -392,12 +395,31 @@ tasks.register('cmakeFaiss', Exec) {
392395
"-DBUILD_TESTING=OFF"
393396
}
394397

398+
tasks.register('buildLuceneSandbox', Exec) {
399+
workingDir "${project.rootDir}/lucene"
400+
commandLine './gradlew', ':lucene:sandbox:jar'
401+
}
402+
403+
tasks.register('repackageLuceneSandboxFaiss', Jar) {
404+
dependsOn buildLuceneSandbox
405+
archiveBaseName = 'lucene-sandbox-faiss'
406+
archiveVersion = '11.0.0-SNAPSHOT'
407+
destinationDirectory = file("${project.buildDir}/libs")
408+
409+
from(zipTree("${project.rootDir}/lucene/lucene/sandbox/build/libs/lucene-sandbox-11.0.0-SNAPSHOT.jar")) {
410+
include 'org/apache/lucene/sandbox/codecs/faiss/**'
411+
exclude 'META-INF/services/**'
412+
}
413+
}
414+
395415
tasks.register('buildFaiss', Exec) {
396416
dependsOn cmakeFaiss
397417
workingDir nativeBuildDir
398418
commandLine 'cmake', '--build', '.', '--target', 'faiss_c', '--parallel'
399419
}
400420

421+
compileJava.dependsOn tasks.named('repackageLuceneSandboxFaiss')
422+
401423
test {
402424
systemProperty 'tests.security.manager', 'false'
403425
systemProperty 'opensearch.set.netty.runtime.available.processors', 'false'
@@ -635,8 +657,8 @@ run {
635657
testClusters.integTest.nodes.each { node ->
636658
node.systemProperty("java.library.path", nativeLibDir)
637659
node.jvmArgs(
638-
'-Xms2g', // Initial heap size
639-
'-Xmx2g', // Maximum heap size
660+
'-Xms8g', // Initial heap size
661+
'-Xmx8g', // Maximum heap size
640662
'-XX:+UnlockDiagnosticVMOptions',
641663
"-XX:CompilerDirectivesFile=${project.rootDir}/src/main/resources/hotspot_compiler",
642664
"--enable-native-access=ALL-UNNAMED",

src/main/java/org/apache/lucene/sandbox/codecs/faiss/FaissKnnVectorsFormat.java

Lines changed: 0 additions & 80 deletions
This file was deleted.

src/main/java/org/apache/lucene/sandbox/codecs/faiss/FaissKnnVectorsReader.java

Lines changed: 0 additions & 201 deletions
This file was deleted.

0 commit comments

Comments
 (0)