Class MilvusVectorStore.MilvusVectorStoreConfig.Builder

java.lang.Object
org.springframework.ai.vectorstore.MilvusVectorStore.MilvusVectorStoreConfig.Builder
Enclosing class:
MilvusVectorStore.MilvusVectorStoreConfig

public static class MilvusVectorStore.MilvusVectorStoreConfig.Builder extends Object
  • Method Details

    • withMetricType

      public MilvusVectorStore.MilvusVectorStoreConfig.Builder withMetricType(io.milvus.param.MetricType metricType)
      Configures the Milvus metric type to use. Leave null or blank to use the metric metric: https://milvus.io/docs/metric.md#floating
      Parameters:
      metricType - the metric type to use
      Returns:
      this builder
    • withIndexType

      public MilvusVectorStore.MilvusVectorStoreConfig.Builder withIndexType(io.milvus.param.IndexType indexType)
      Configures the Milvus index type to use. Leave null or blank to use the default index.
      Parameters:
      indexType - the index type to use
      Returns:
      this builder
    • withIndexParameters

      public MilvusVectorStore.MilvusVectorStoreConfig.Builder withIndexParameters(String indexParameters)
      Configures the Milvus index parameters to use. Leave null or blank to use the default index parameters.
      Parameters:
      indexParameters - the index parameters to use
      Returns:
      this builder
    • withDatabaseName

      public MilvusVectorStore.MilvusVectorStoreConfig.Builder withDatabaseName(String databaseName)
      Configures the Milvus database name to use. Leave null or blank to use the default database.
      Parameters:
      databaseName - the database name to use
      Returns:
      this builder
    • withCollectionName

      public MilvusVectorStore.MilvusVectorStoreConfig.Builder withCollectionName(String collectionName)
      Configures the Milvus collection name to use. Leave null or blank to use the default collection name.
      Parameters:
      collectionName - the collection name to use
      Returns:
      this builder
    • withEmbeddingDimension

      public MilvusVectorStore.MilvusVectorStoreConfig.Builder withEmbeddingDimension(int newEmbeddingDimension)
      Configures the size of the embedding. Defaults to 1536, inline with OpenAIs embeddings.
      Parameters:
      newEmbeddingDimension - The dimension of the embedding
      Returns:
      this builder
    • build

      Returns the immutable configuration.
      Returns:
      the immutable configuration