Cassandra(
self,
embedding: Embeddings,
session: Optional[Session] = None,| Name | Type | Description |
|---|---|---|
embedding* | Embeddings | Embedding function to use. |
session | Optional[Session] | Default: NoneCassandra driver session. If not provided, it is resolved from cassio. |
keyspace | Optional[str] | Default: None |
table_name | str | Default: '' |
ttl_seconds | Optional[int] | Default: None |
body_index_options | Optional[List[Tuple[str, Any]]] | Default: None |
setup_mode | SetupMode | Default: SetupMode.SYNC |
metadata_indexing | Union[Tuple[str, Iterable[str]], str] | Default: 'all' |
Cassandra keyspace. If not provided, it is resolved from cassio.
Cassandra table (required).
Optional time-to-live for the added texts.
Optional options used to create the body index. Eg. body_index_options = [cassio.table.cql.STANDARD_ANALYZER]
mode used to create the Cassandra table (SYNC, ASYNC or OFF).
Optional specification of a metadata indexing policy, i.e. to fine-tune which of the metadata fields are indexed. It can be a string ("all" or "none"), or a 2-tuple. The following means that all fields except 'f1', 'f2' ... are NOT indexed: metadata_indexing=("allowlist", ["f1", "f2", ...]) The following means all fields EXCEPT 'g1', 'g2', ... are indexed: metadata_indexing("denylist", ["g1", "g2", ...]) The default is to index every metadata field. Note: if you plan to have massive unique text metadata entries, consider not indexing them for performance (and to overcome max-length limitations).