Skip to content

Commit 812af2a

Browse files
Rassyanmridula-s109
authored andcommitted
Reload KnnVectorsFormat in Lucene SPI registry. (elastic#129197)
In order for plugins to extend Lucene's KnnVectorsFormat, we need to reload it along with other Lucene SPIs when the plugin classloader is created. This commit adds the call to KnnVectorsFormat.reloadKnnVectorsFormat(loader) in reloadLuceneSPI method, allowing full extension of Lucene's vector functionality through plugins.
1 parent d3d26cd commit 812af2a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/main/java/org/elasticsearch/plugins/PluginsService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import org.apache.logging.log4j.Logger;
1414
import org.apache.lucene.codecs.Codec;
1515
import org.apache.lucene.codecs.DocValuesFormat;
16+
import org.apache.lucene.codecs.KnnVectorsFormat;
1617
import org.apache.lucene.codecs.PostingsFormat;
1718
import org.elasticsearch.ElasticsearchException;
1819
import org.elasticsearch.action.admin.cluster.node.info.PluginsAndModules;
@@ -477,6 +478,7 @@ static void reloadLuceneSPI(ClassLoader loader) {
477478
// Codecs:
478479
PostingsFormat.reloadPostingsFormats(loader);
479480
DocValuesFormat.reloadDocValuesFormats(loader);
481+
KnnVectorsFormat.reloadKnnVectorsFormat(loader);
480482
Codec.reloadCodecs(loader);
481483
}
482484

0 commit comments

Comments
 (0)