OpenSearchVectorSearch(
self,
opensearch_url: str,
index_name: str,
embedding_function: Embeddings,
**kwargs:| Name | Type |
|---|---|
| opensearch_url | str |
| index_name | str |
| embedding_function | Embeddings |
Amazon OpenSearch Vector Engine vector store.
Example:
.. code-block:: python
from langchain_community.vectorstores import OpenSearchVectorSearch opensearch_vector_search = OpenSearchVectorSearch( "http://localhost:9200", "embeddings", embedding_function )
Deletes a given index from vectorstore.
If given index present in vectorstore, returns True else False.
Create a new Index with given arguments
Run more texts through the embeddings and add to the vectorstore.
Asynchronously run more texts through the embeddings and add to the vectorstore.
Add the given texts and embeddings to the vectorstore.
Delete documents from the Opensearch index.
Asynchronously delete by vector ID or other criteria.
Configures a search pipeline for hybrid search. Args: pipeline_name: Name of the pipeline keyword_weight: Weight for keyword search vector_weight: Weight for vector search Returns: response: Acknowledgement of the pipeline creation. (if there is any error while configuring the pipeline, it will return None) Raises: Exception: If an error occurs
Checks if a search pipeline exists.
Get information about a search pipeline.
Return docs most similar to query.
By default, supports Approximate Search. Also supports Script Scoring and Painless Scripting.
Return docs most similar to the embedding vector.
Return docs and it's scores most similar to query.
By default, supports Approximate Search. Also supports Script Scoring and Painless Scripting.
Return docs and it's scores most similar to the embedding vector.
By default, supports Approximate Search. Also supports Script Scoring and Painless Scripting.
Return docs selected using the maximal marginal relevance.
Maximal marginal relevance optimizes for similarity to query AND diversity among selected documents.
Construct OpenSearchVectorSearch wrapper from raw texts.
Asynchronously construct OpenSearchVectorSearch wrapper from raw texts.
Construct OpenSearchVectorSearch wrapper from pre-vectorized embeddings.
Asynchronously construct OpenSearchVectorSearch wrapper from pre-vectorized embeddings.