Skip to content

Instantly share code, notes, and snippets.

@benwtrent
Created November 10, 2022 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benwtrent/f3a6c4a9ce9749e702285dc82f39a129 to your computer and use it in GitHub Desktop.
Save benwtrent/f3a6c4a9ce9749e702285dc82f39a129 to your computer and use it in GitHub Desktop.
PyLucene94Codec extension
package org.apache.pylucene.codecs;
import org.apache.lucene.codecs.lucene94.Lucene94Codec;
import org.apache.lucene.codecs.KnnVectorsFormat;
public class PyLucene94Codec extends Lucene94Codec {
private long pythonObject;
public void pythonExtension(long pythonObject){
this.pythonObject = pythonObject;
}
public long pythonExtension() {
return this.pythonObject;
}
public void finalize() throws Throwable {
pythonDecRef();
}
public native void pythonDecRef();
/** Instantiates a new codec. */
public PyLucene94Codec() {
super();
}
public native KnnVectorsFormat getKnnVectorsFormatForField(String field);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment