-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add support for reloading the SPI for KnnVectorsFormat class #13393
Description
Description
Description
Lucene uses SPI to get the instance for various classes like Codec, KNNVectorsFormat etc.
Currently Codec class provide a way to reload the SPIs by providing an interface which takes a ClassLoader and reload the SPIs. Ref: https://github.com/apache/lucene/blob/branch_9_10/lucene/core/src/java/org/apache/lucene/codecs/Codec.java#L126-L137
but similar functionality is not present in the KNNVectorsFormat.(I checked main branch and branch_9_10 too). Ref: https://github.com/apache/lucene/blob/branch_9_10/lucene/core/src/java/org/apache/lucene/codecs/KnnVectorsFormat.java
I am not sure if this is a miss or there is some other way to reload the SPI of KNNVectorsFormat class.
Solution
What I am looking for here is to add the support for reload SPI function in KNNVectorsFormat class too so that external libraries/application can load their own KNNVectorsFormat.
I am willing to pick up this issue and contribute back.
@benwtrent please let me know your thoughts on this