Delete documents from the Elasticsearch index.
from_documents(documents[, embedding, ...])
Construct ElasticsearchStore wrapper from documents.
from_texts(texts[, embedding, metadatas, ...])
Construct ElasticsearchStore wrapper from raw documents.
get_user_agent()
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, fetch_k, filter])
Return Elasticsearch documents most similar to query.
similarity_search_by_vector(embedding[, k])
Return docs most similar to embedding vector.
similarity_search_by_vector_with_relevance_scores(...)
Return Elasticsearch documents most similar to query, along with scores.
similarity_search_with_relevance_scores(query)
Return docs and relevance scores in the range [0, 1].
similarity_search_with_score(query[, k, filter])
Return Elasticsearch documents most similar to query, along with scores.
static ApproxRetrievalStrategy(query_model_id: Optional[str] = None, hybrid: Optional[bool] = False, rrf: Optional[Union[dict, bool]] = True) → ApproxRetrievalStrategy[source]¶
Used to perform approximate nearest neighbor search
using the HNSW algorithm.
At build index time, this strategy will create a
dense vector field in the index and store the
embedding vectors in the index.
At query time, the text will either be embedded using the
provided embedding function or the query_model_id
will be used to embed the text using the model
deployed to Elasticsearch.
if query_model_id is used, do not provide an embedding function.