Package com.google.genkit.plugins.milvus
Class MilvusCollectionConfig
java.lang.Object
com.google.genkit.plugins.milvus.MilvusCollectionConfig
Configuration for a single Milvus collection managed by
MilvusPlugin.
Each config registers a retriever and indexer named milvus/<collectionName>. The
collection is created in Milvus "quick setup" mode (auto id primary key, a vector field,
and dynamic fields) storing the document text under text and its metadata as a JSON
string under metadata.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder forMilvusCollectionConfig.static enumVector similarity metric used by the Milvus index. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a new builder.Returns additional metadata merged into every indexed document.Returns the Milvus collection name.intReturns the embedding dimension (default768).Returns the name of the embedder used to vectorize documents and queries.Returns the vector similarity metric (defaultMilvusCollectionConfig.Metric.COSINE).booleanReturns whether to create the collection on first use if it does not exist (defaulttrue).
-
Method Details
-
getCollectionName
Returns the Milvus collection name.- Returns:
- the collection name
-
getEmbedderName
Returns the name of the embedder used to vectorize documents and queries.- Returns:
- the embedder name
-
getDimension
public int getDimension()Returns the embedding dimension (default768).- Returns:
- the embedding dimension
-
getMetric
Returns the vector similarity metric (defaultMilvusCollectionConfig.Metric.COSINE).- Returns:
- the metric
-
isCreateCollectionIfNotExists
public boolean isCreateCollectionIfNotExists()Returns whether to create the collection on first use if it does not exist (defaulttrue).- Returns:
trueif the collection should be created when missing
-
getAdditionalMetadata
Returns additional metadata merged into every indexed document.- Returns:
- the additional metadata
-
builder
Creates a new builder.- Returns:
- a new builder
-