mirror of https://github.com/apache/lucene.git
Add support for reloading the SPI for KnnVectorsFormat class (#13394)
Signed-off-by: Navneet Verma <navneev@amazon.com>
This commit is contained in:
parent
80304802a5
commit
6efce2189e
|
@ -413,6 +413,8 @@ Other
|
|||
* GITHUB#13077: Add public getter for SynonymQuery#field (Andrey Bozhko)
|
||||
|
||||
|
||||
* GITHUB#13393: Add support for reloading the SPI for KnnVectorsFormat class (Navneet Verma)
|
||||
|
||||
======================== Lucene 9.10.0 =======================
|
||||
|
||||
API Changes
|
||||
|
|
|
@ -68,6 +68,19 @@ public abstract class KnnVectorsFormat implements NamedSPILoader.NamedSPI {
|
|||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reloads the KnnVectorsFormat list from the given {@link ClassLoader}.
|
||||
*
|
||||
* <p><b>NOTE:</b> Only new KnnVectorsFormat are added, existing ones are never removed or
|
||||
* replaced.
|
||||
*
|
||||
* <p><em>This method is expensive and should only be called for discovery of new KnnVectorsFormat
|
||||
* on the given classpath/classloader!</em>
|
||||
*/
|
||||
public static void reloadKnnVectorsFormat(ClassLoader classloader) {
|
||||
Holder.getLoader().reload(classloader);
|
||||
}
|
||||
|
||||
/** looks up a format by name */
|
||||
public static KnnVectorsFormat forName(String name) {
|
||||
return Holder.getLoader().lookup(name);
|
||||
|
|
Loading…
Reference in New Issue