lucene icon indicating copy to clipboard operation
lucene copied to clipboard

Backport Faiss-based vector format to 10.x

Open kaivalnp opened this issue 6 months ago • 0 comments

Description

Backport #14178 to 10.x

Summary of changes

  • Support for JDK21 via MR-JAR and runtime lookup (similar to other Panama-based classes here). This was tricky because some functions were renamed from JDK21 (https://openjdk.org/jeps/442) -> JDK22 (https://openjdk.org/jeps/454, where it was finalized) -- I'm using method handles to bind to the correct function at runtime
  • Allow native access to the libfaiss_c.so shared library from tests, enforced by the security manager
  • Change GH action to run on JDK21
  • Misc changes for the lower Java language level + 10.x branch

I also ran the Faiss tests offline with JDK 21, 22, 23, 24 using:

gradlew -p lucene/sandbox -Dtests.faiss.run=true test --tests "org.apache.lucene.sandbox.codecs.faiss.*"

..and they all passed!

Diff of relevant files

https://gist.github.com/kaivalnp/77fb274ebd3de22c500396e80bb5df3c

kaivalnp avatar Jun 24 '25 23:06 kaivalnp