Class QdrantCollectionConfig.Builder

java.lang.Object
com.google.genkit.plugins.qdrant.QdrantCollectionConfig.Builder
Enclosing class:
QdrantCollectionConfig

public static final class QdrantCollectionConfig.Builder extends Object
  • Method Details

    • collectionName

      public QdrantCollectionConfig.Builder collectionName(String collectionName)
      Sets the collection name.
      Parameters:
      collectionName - the collection name
      Returns:
      this builder
    • embedderName

      public QdrantCollectionConfig.Builder embedderName(String embedderName)
      Sets the embedder name.
      Parameters:
      embedderName - the embedder name
      Returns:
      this builder
    • dimension

      public QdrantCollectionConfig.Builder dimension(int dimension)
      Sets the embedding dimension.
      Parameters:
      dimension - the embedding dimension (must be >= 1)
      Returns:
      this builder
    • distance

      Sets the distance function.
      Parameters:
      distance - the distance function
      Returns:
      this builder
    • textPayloadKey

      public QdrantCollectionConfig.Builder textPayloadKey(String textPayloadKey)
      Sets the payload key that stores the document text.
      Parameters:
      textPayloadKey - the text payload key
      Returns:
      this builder
    • createCollectionIfNotExists

      public QdrantCollectionConfig.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

      public QdrantCollectionConfig.Builder addAdditionalMetadata(String key, Object value)
      Adds a metadata entry merged into every indexed document's payload.
      Parameters:
      key - the metadata key
      value - the metadata value
      Returns:
      this builder
    • build

      public QdrantCollectionConfig build()
      Builds a new QdrantCollectionConfig.
      Returns:
      a new config instance