Class Hybrid
java.lang.Object
com.datastax.astra.client.core.hybrid.Hybrid
Hybrid object that can be used to store both vector and lexical information.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a lexical field.Add a lexical field.vector(float[] embeddings) Add a vector that will be serialized as a float array.vector(DataAPIVector vector) Add a vector that will be serialized as a base64 encoded string..Add a vectorize field.Add a vectorize field.
-
Constructor Details
-
Hybrid
public Hybrid()Default constructor. -
Hybrid
Constructor with text.- Parameters:
text- text to use
-
Hybrid
Constructor with custom document.- Parameters:
doc- document to use
-
-
Method Details
-
vectorize
Add a vectorize field.- Parameters:
vectorize- vectorize to use- Returns:
- this
-
vectorize
Add a vectorize field.- Parameters:
vectorize- vectorize to use- Returns:
- this
-
lexical
Add a lexical field.- Parameters:
lexical- lexical to use- Returns:
- this
-
lexical
Add a lexical field.- Parameters:
lexical- lexical to use- Returns:
- this
-
vector
Add a vector that will be serialized as a float array.- Parameters:
embeddings- embeddings to use- Returns:
- this
-
vector
Add a vector that will be serialized as a base64 encoded string..- Parameters:
vector- vector to use- Returns:
- this
-