Class MilvusCollectionConfig

java.lang.Object
com.google.genkit.plugins.milvus.MilvusCollectionConfig

public final class MilvusCollectionConfig extends Object
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.

  • Method Details

    • getCollectionName

      public String getCollectionName()
      Returns the Milvus collection name.
      Returns:
      the collection name
    • getEmbedderName

      public String 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 (default 768).
      Returns:
      the embedding dimension
    • getMetric

      public MilvusCollectionConfig.Metric getMetric()
      Returns the vector similarity metric (default MilvusCollectionConfig.Metric.COSINE).
      Returns:
      the metric
    • isCreateCollectionIfNotExists

      public boolean isCreateCollectionIfNotExists()
      Returns whether to create the collection on first use if it does not exist (default true).
      Returns:
      true if the collection should be created when missing
    • getAdditionalMetadata

      public Map<String,Object> getAdditionalMetadata()
      Returns additional metadata merged into every indexed document.
      Returns:
      the additional metadata
    • builder

      public static MilvusCollectionConfig.Builder builder()
      Creates a new builder.
      Returns:
      a new builder