# CassandraGraphVectorStore

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore)

## Signature

```python
CassandraGraphVectorStore(
    self,
    embedding: Embeddings,
    session: Session | None = None,
    keyspace: str | None = None,
    table_name: str = '',
    ttl_seconds: int | None = None,
    *,
    body_index_options: list[tuple[str, Any]] | None = None,
    setup_mode: SetupMode = SetupMode.SYNC,
    metadata_deny_list: Optional[list[str]] = None,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `embedding` | `Embeddings` | Yes | Embedding function to use. |
| `session` | `Session \| None` | No | Cassandra driver session. If not provided, it is resolved from cassio. (default: `None`) |
| `keyspace` | `str \| None` | No | Cassandra keyspace. If not provided, it is resolved from cassio. (default: `None`) |
| `table_name` | `str` | No | Cassandra table (required). (default: `''`) |
| `ttl_seconds` | `int \| None` | No | Optional time-to-live for the added texts. (default: `None`) |
| `body_index_options` | `list[tuple[str, Any]] \| None` | No | Optional options used to create the body index. Eg. body_index_options = [cassio.table.cql.STANDARD_ANALYZER] (default: `None`) |
| `setup_mode` | `SetupMode` | No | mode used to create the Cassandra table (SYNC, ASYNC or OFF). (default: `SetupMode.SYNC`) |
| `metadata_deny_list` | `Optional[list[str]]` | No | Optional list of metadata keys to not index. i.e. to fine-tune which of the metadata fields are indexed. Note: if you plan to have massive unique text metadata entries, consider not indexing them for performance (and to overcome max-length limitations). Note: the `metadata_indexing` parameter from langchain_community.utilities.cassandra.Cassandra is not exposed since CassandraGraphVectorStore only supports the deny_list option. (default: `None`) |

## Extends

- `GraphVectorStore`

## Constructors

```python
__init__(
    self,
    embedding: Embeddings,
    session: Session | None = None,
    keyspace: str | None = None,
    table_name: str = '',
    ttl_seconds: int | None = None,
    *,
    body_index_options: list[tuple[str, Any]] | None = None,
    setup_mode: SetupMode = SetupMode.SYNC,
    metadata_deny_list: Optional[list[str]] = None,
) -> None
```

| Name | Type |
|------|------|
| `embedding` | `Embeddings` |
| `session` | `Session \| None` |
| `keyspace` | `str \| None` |
| `table_name` | `str` |
| `ttl_seconds` | `int \| None` |
| `body_index_options` | `list[tuple[str, Any]] \| None` |
| `setup_mode` | `SetupMode` |
| `metadata_deny_list` | `Optional[list[str]]` |


## Properties

- `embedding`
- `vector_store`
- `embeddings`

## Methods

- [`add_nodes()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/add_nodes)
- [`aadd_nodes()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/aadd_nodes)
- [`similarity_search()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/similarity_search)
- [`asimilarity_search()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/asimilarity_search)
- [`similarity_search_by_vector()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/similarity_search_by_vector)
- [`asimilarity_search_by_vector()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/asimilarity_search_by_vector)
- [`metadata_search()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/metadata_search)
- [`ametadata_search()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/ametadata_search)
- [`get_by_document_id()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/get_by_document_id)
- [`aget_by_document_id()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/aget_by_document_id)
- [`get_node()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/get_node)
- [`ammr_traversal_search()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/ammr_traversal_search)
- [`mmr_traversal_search()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/mmr_traversal_search)
- [`atraversal_search()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/atraversal_search)
- [`traversal_search()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/traversal_search)
- [`from_texts()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/from_texts)
- [`afrom_texts()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/afrom_texts)
- [`from_documents()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/from_documents)
- [`afrom_documents()`](https://reference.langchain.com/python/langchain-community/graph_vectorstores/cassandra/CassandraGraphVectorStore/afrom_documents)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/graph_vectorstores/cassandra.py#L107)