Package com.google.genkit.plugins.qdrant
Class QdrantCollectionConfig.Builder
java.lang.Object
com.google.genkit.plugins.qdrant.QdrantCollectionConfig.Builder
- Enclosing class:
QdrantCollectionConfig
Builder for
QdrantCollectionConfig.-
Method Summary
Modifier and TypeMethodDescriptionaddAdditionalMetadata(String key, Object value) Adds a metadata entry merged into every indexed document's payload.build()Builds a newQdrantCollectionConfig.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.distance(QdrantCollectionConfig.Distance distance) Sets the distance function.embedderName(String embedderName) Sets the embedder name.textPayloadKey(String textPayloadKey) Sets the payload key that stores the document text.
-
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
-
distance
Sets the distance function.- Parameters:
distance- the distance function- Returns:
- this builder
-
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
Adds a metadata entry merged into every indexed document's payload.- Parameters:
key- the metadata keyvalue- the metadata value- Returns:
- this builder
-
build
Builds a newQdrantCollectionConfig.- Returns:
- a new config instance
-