Created
November 10, 2022 14:31
-
-
Save benwtrent/f3a6c4a9ce9749e702285dc82f39a129 to your computer and use it in GitHub Desktop.
PyLucene94Codec extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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