Apache Cassandra

Estimated reading: 4 minutes 139 views

The Cassandra and Cassandra Graph components can be used with Cassandra clusters that support vector search, including Astra DB.

For more information, see the following:

a. Hidden parameters
b. Search results output
c. Vector store instances
d. Vector search in Cassandra

Cassandra

Use the Cassandra component to read or write to a Cassandra vector store using a CassandraVectorStore instance.

Cassandra parameters

NameTypeDescription
database_refStringInput parameter. Contact points for the database or an Astra database ID.
usernameStringInput parameter. Username for the database. Leave empty for Astra DB.
tokenSecretStringInput parameter. User password for the database or an Astra application token.
keyspaceStringInput parameter. The name of the keyspace containing the vector store specified in Table Name (table_name).
table_nameStringInput parameter. The name of the table or collection that is the Cassandra vector store.
ttl_secondsIntegerInput parameter. Time-to-live for added texts, if supported by the cluster. Only relevant for writes.
batch_sizeIntegerInput parameter. Amount of records to process in a single batch.
setup_modeStringInput parameter. Configuration mode for setting up a Cassandra table.
cluster_kwargsDictInput parameter. Additional keyword arguments for a Cassandra cluster.
search_queryStringInput parameter. Query string for similarity search. Only relevant for reads.
ingest_dataDataInput parameter. Data to be loaded into the vector store as raw chunks and embeddings. Only relevant for writes.
embeddingEmbeddingsInput parameter. Embedding function to use.
number_of_resultsIntegerInput parameter. Number of results to return in search. Only relevant for reads.
search_typeStringInput parameter. Type of search to perform. Only relevant for reads.
search_score_thresholdFloatInput parameter. Minimum similarity score for search results. Only relevant for reads.
search_filterDictInput parameter. An optional dictionary of metadata search filters to apply in addition to vector search. Only relevant for reads.
body_searchStringInput parameter. Document textual search terms. Only relevant for reads.
enable_body_searchBooleanInput parameter. Flag to enable body search. Only relevant for reads.

Cassandra Graph

The Cassandra Graph component uses a CassandraGraphVectorStore instance for graph traversal and graph-based document retrieval in a compatible Cassandra cluster. It also supports writing to the vector store.

Cassandra Graph parameters

Name Display Name Info
database_ref Contact Points / Astra Database ID Input parameter. The contact points for the database or an Astra database ID. Required.
username Username Input parameter. The username for the database. Leave empty for Astra DB.
token Password / Astra DB Token Input parameter. The user password for the database or an Astra application token. Required.
keyspace Keyspace Input parameter. The name of the keyspace containing the vector store specified in Table Name (table_name). Required.
table_name Table Name Input parameter. The name of the table or collection that is the vector store. Required.
setup_mode Setup Mode Input parameter. The configuration mode for setting up the Cassandra table. The options are Sync (default) or Off.
cluster_kwargs Cluster arguments Input parameter. An optional dictionary of additional keyword arguments for the Cassandra cluster.
search_query Search Query Input parameter. The query string for similarity search. Only relevant for reads.
ingest_data Ingest Data Input parameter. Data to be loaded into the vector store as raw chunks and embeddings. Only relevant for writes.
embedding Embedding Input parameter. The embedding model to use.
number_of_results Number of Results Input parameter. The number of results to return in similarity search. Only relevant for reads. Default: 4.
search_type Search Type Input parameter. The search type to use. The options are Traversal (default), MMR Traversal, Similarity, Similarity with score threshold, or MMR (Max Marginal Relevance).
depth Depth of traversal Input parameter. The maximum depth of edges to traverse. Only relevant if Search Type (search_type) is Traversal or MMR Traversal. Default: 1.
search_score_threshold Search Score Threshold Input parameter. The minimum similarity score threshold for search results. Only relevant for reads using the Similarity with score threshold search type.
search_filter Search Metadata Filter Input parameter. An optional dictionary of metadata search filters to apply in addition to graph traversal and similarity search.
Share this Doc

Apache Cassandra

Or copy link

CONTENTS