Package com.datastax.astra.client.model
Class CollectionOptions.CollectionOptionsBuilder
java.lang.Object
com.datastax.astra.client.model.CollectionOptions.CollectionOptionsBuilder
- Enclosing class:
CollectionOptions
Builder for
CollectionInfo
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the output.defaultIdType
(CollectionIdTypes idType) Builder Pattern with the Identifiers.indexingAllow
(String... properties) Builder pattern.indexingDeny
(@NonNull String... properties) Builder pattern.vector
(int dimension, @NonNull SimilarityMetric function) Builder pattern.vectorDimension
(int size) Builder pattern.Enable Vectorization within the collection.Enable Vectorization within the collection.Enable Vectorization within the collection.vectorSimilarity
(@NonNull SimilarityMetric function) Builder pattern.
-
Constructor Details
-
CollectionOptionsBuilder
public CollectionOptionsBuilder()Default constructor.
-
-
Method Details
-
defaultIdType
Builder Pattern with the Identifiers.- Parameters:
idType
- type of ids- Returns:
- self reference
-
vectorDimension
Builder pattern.- Parameters:
size
- size- Returns:
- self reference
-
vectorSimilarity
public CollectionOptions.CollectionOptionsBuilder vectorSimilarity(@NonNull @NonNull SimilarityMetric function) Builder pattern.- Parameters:
function
- function- Returns:
- self reference
-
indexingDeny
public CollectionOptions.CollectionOptionsBuilder indexingDeny(@NonNull @NonNull String... properties) Builder pattern.- Parameters:
properties
- size- Returns:
- self reference
-
indexingAllow
Builder pattern.- Parameters:
properties
- size- Returns:
- self reference
-
vector
public CollectionOptions.CollectionOptionsBuilder vector(int dimension, @NonNull @NonNull SimilarityMetric function) Builder pattern.- Parameters:
dimension
- dimensionfunction
- function- Returns:
- self reference
-
vectorize
Enable Vectorization within the collection.- Parameters:
provider
- provider Name (LLM)modeName
- mode name- Returns:
- self reference
-
vectorize
public CollectionOptions.CollectionOptionsBuilder vectorize(String provider, String modeName, String sharedSecretKey) Enable Vectorization within the collection.- Parameters:
provider
- provider Name (LLM)modeName
- mode namesharedSecretKey
- name of the key in the system- Returns:
- self reference
-
vectorize
public CollectionOptions.CollectionOptionsBuilder vectorize(String provider, String modeName, String sharedSecretKey, Map<String, Object> parameters) Enable Vectorization within the collection.- Parameters:
provider
- provider Name (LLM)modeName
- mode namesharedSecretKey
- name of the key in the systemparameters
- expected parameters for vectorize- Returns:
- self reference
-
build
Build the output.- Returns:
- collection definition
-