Context
The Go client has an embedding function registry that allows registering and looking up embedding functions by name. This enables auto-wiring embedding functions from server-side collection configuration. The Java client has no registry.
Missing API
public final class EmbeddingFunctionRegistry {
public static EmbeddingFunctionRegistry instance();
// Registration
void registerDense(String name, EmbeddingFunctionFactory factory);
void registerSparse(String name, SparseEmbeddingFunctionFactory factory);
void registerMultimodal(String name, MultimodalEmbeddingFunctionFactory factory);
// Lookup
EmbeddingFunction buildDense(String name, Map<String, Object> config);
boolean hasDense(String name);
List<String> listDense();
// Same for sparse and multimodal...
}
Use case
When getCollection() is called, the server returns the embedding function name and config in the collection metadata. The registry can automatically create the correct EmbeddingFunction instance, so the user doesn't need to pass it explicitly.
Reference
- Go client:
RegisterDense, RegisterSparse, RegisterMultimodal, BuildDense, BuildSparse, BuildMultimodal, HasDense, ListDense, etc.
Context
The Go client has an embedding function registry that allows registering and looking up embedding functions by name. This enables auto-wiring embedding functions from server-side collection configuration. The Java client has no registry.
Missing API
Use case
When
getCollection()is called, the server returns the embedding function name and config in the collection metadata. The registry can automatically create the correctEmbeddingFunctioninstance, so the user doesn't need to pass it explicitly.Reference
RegisterDense,RegisterSparse,RegisterMultimodal,BuildDense,BuildSparse,BuildMultimodal,HasDense,ListDense, etc.