Class WeaviateCollectionConfig.Builder
java.lang.Object
com.google.genkit.plugins.weaviate.WeaviateCollectionConfig.Builder
- Enclosing class:
WeaviateCollectionConfig
Builder for WeaviateCollectionConfig.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the WeaviateCollectionConfig.contentField(String contentField) Sets the field name for document content.createCollectionIfMissing(boolean createCollectionIfMissing) Sets whether to create the collection if it doesn't exist.defaultLimit(int defaultLimit) Sets the default limit for retrieval.distanceMeasure(WeaviateCollectionConfig.DistanceMeasure distanceMeasure) Sets the distance measure for similarity search.Sets the embedder instance directly.embedderName(String embedderName) Sets the embedder name to resolve from registry.Sets the collection label for display.metadataField(String metadataField) Sets the field name for document metadata.Sets the collection name.vectorDimension(int vectorDimension) Sets the vector dimension for the collection.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
name
Sets the collection name.- Parameters:
name- the collection name- Returns:
- this builder
-
label
Sets the collection label for display.- Parameters:
label- the display label- Returns:
- this builder
-
contentField
Sets the field name for document content.- Parameters:
contentField- the content field name- Returns:
- this builder
-
metadataField
Sets the field name for document metadata.- Parameters:
metadataField- the metadata field name- Returns:
- this builder
-
distanceMeasure
public WeaviateCollectionConfig.Builder distanceMeasure(WeaviateCollectionConfig.DistanceMeasure distanceMeasure) Sets the distance measure for similarity search.- Parameters:
distanceMeasure- the distance measure- Returns:
- this builder
-
embedder
Sets the embedder instance directly.- Parameters:
embedder- the embedder- Returns:
- this builder
-
embedderName
Sets the embedder name to resolve from registry.- Parameters:
embedderName- the embedder name (e.g., "googleai/text-embedding-004")- Returns:
- this builder
-
defaultLimit
Sets the default limit for retrieval.- Parameters:
defaultLimit- the default limit- Returns:
- this builder
-
createCollectionIfMissing
public WeaviateCollectionConfig.Builder createCollectionIfMissing(boolean createCollectionIfMissing) Sets whether to create the collection if it doesn't exist.- Parameters:
createCollectionIfMissing- true to create if missing- Returns:
- this builder
-
vectorDimension
Sets the vector dimension for the collection.- Parameters:
vectorDimension- the vector dimension- Returns:
- this builder
-
build
Builds the WeaviateCollectionConfig.- Returns:
- the config
-