Package com.google.genkit.plugins.milvus
Class MilvusCollectionConfig.Builder
java.lang.Object
com.google.genkit.plugins.milvus.MilvusCollectionConfig.Builder
- Enclosing class:
MilvusCollectionConfig
Builder for
MilvusCollectionConfig.-
Method Summary
Modifier and TypeMethodDescriptionaddAdditionalMetadata(String key, Object value) Adds a metadata entry merged into every indexed document.build()Builds a newMilvusCollectionConfig.collectionName(String collectionName) Sets the collection name.createCollectionIfNotExists(boolean createCollectionIfNotExists) Sets whether to create the collection on first use if it does not exist.dimension(int dimension) Sets the embedding dimension.embedderName(String embedderName) Sets the embedder name.metric(MilvusCollectionConfig.Metric metric) Sets the vector similarity metric.
-
Method Details
-
collectionName
Sets the collection name.- Parameters:
collectionName- the collection name- Returns:
- this builder
-
embedderName
Sets the embedder name.- Parameters:
embedderName- the embedder name- Returns:
- this builder
-
dimension
Sets the embedding dimension.- Parameters:
dimension- the embedding dimension (must be>= 1)- Returns:
- this builder
-
metric
Sets the vector similarity metric.- Parameters:
metric- the metric- Returns:
- this builder
-
createCollectionIfNotExists
public MilvusCollectionConfig.Builder createCollectionIfNotExists(boolean createCollectionIfNotExists) Sets whether to create the collection on first use if it does not exist.- Parameters:
createCollectionIfNotExists- whether to create the collection when missing- Returns:
- this builder
-
addAdditionalMetadata
Adds a metadata entry merged into every indexed document.- Parameters:
key- the metadata keyvalue- the metadata value- Returns:
- this builder
-
build
Builds a newMilvusCollectionConfig.- Returns:
- a new config instance
-