from_existing_index(embedding, index_name[, ...])
Connect to an existing Redis index.
from_texts(texts, embedding[, metadatas, ...])
Create a Redis vectorstore from raw documents.
from_texts_return_keys(texts, embedding[, ...])
Create a Redis vectorstore from raw documents.
max_marginal_relevance_search(query[, k, ...])
Return docs selected using the maximal marginal relevance.
max_marginal_relevance_search_by_vector(...)
Return docs selected using the maximal marginal relevance.
search(query, search_type, **kwargs)
Return docs most similar to query using specified search type.
similarity_search(query[, k])
Returns the most similar indexed documents to the query text.
similarity_search_by_vector(embedding[, k])
Return docs most similar to embedding vector.
similarity_search_limit_score(query[, k, ...])
Returns the most similar indexed documents to the query text within the score_threshold range.
similarity_search_with_relevance_scores(query)
Return docs and relevance scores in the range [0, 1].
similarity_search_with_score(query[, k])
Return docs most similar to query.
__init__(redis_url: str, index_name: str, embedding_function: Callable, content_key: str = 'content', metadata_key: str = 'metadata', vector_key: str = 'content_vector', relevance_score_fn: Optional[Callable[[float], float]] = None, distance_metric: Literal['COSINE', 'IP', 'L2'] = 'COSINE', **kwargs: Any)[source]¶
Initialize with necessary components.
async aadd_documents(documents: List[Document], **kwargs: Any) → List[str]¶
Run more documents through the embeddings and add to the vectorstore.
Parameters