Class CollectionDefinition
java.lang.Object
com.datastax.astra.client.collections.definition.CollectionDefinition
Set of options to define and initialize a collection.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Subclass representing the indexing options.static class
Subclass representing the indexing options. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionBuilder pattern.Gets defaultIdAccess the indexing options.Access the vector options.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 metric) Builder pattern.
-
Constructor Details
-
CollectionDefinition
public CollectionDefinition()Default constructor.
-
-
Method Details
-
getVector
Access the vector options.- Returns:
- vector options
-
getIndexing
Access the indexing options.- Returns:
- indexing options
-
getDefaultId
Gets defaultId- Returns:
- value of defaultId
-
defaultId
Builder pattern.- Parameters:
type
- default id type- Returns:
- self reference
-
vectorDimension
Builder pattern.- Parameters:
size
- size- Returns:
- self reference
-
vectorSimilarity
Builder pattern.- Parameters:
metric
- similarity metric- Returns:
- self reference
-
indexingDeny
Builder pattern.- Parameters:
properties
- size- Returns:
- self reference
-
indexingAllow
Builder pattern.- Parameters:
properties
- size- Returns:
- self reference
-
vector
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
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 CollectionDefinition 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
-