Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversAmazon KendraArcee RetrieverArxivAzure Cognitive SearchBM25ChaindeskChatGPT PluginCohere RerankerDocArrayElasticSearch BM25Google Cloud Enterprise SearchGoogle DriveGoogle Vertex AI SearchKay.aikNNLOTR (Merger Retriever)MetalPinecone Hybrid SearchPubMedRePhraseQuerySEC filingSelf-querying retrieverDeep LakeChromaDashVectorElasticsearchMilvusMyScaleOpenSearchPineconeQdrantRedisSupabaseTimescale Vector (Postgres) self-queryingVectaraWeaviateSVMTavily Search APITF-IDFVespaWeaviate Hybrid SearchWikipediayou-retrieverZepToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsRetrieversSelf-querying retrieverOpenSearchOn this pageOpenSearchOpenSearch is a scalable, flexible, and extensible open-source software suite for search, analytics, and observability applications licensed under Apache 2.0. OpenSearch is a distributed search and analytics engine based on Apache Lucene.In this notebook, we'll demo the SelfQueryRetriever with an OpenSearch vector store.Creating an OpenSearch vector store‚ÄãFirst, we'll want to create an OpenSearch vector store and seed it with some data. We've created a small demo set of documents that contain summaries of movies.Note: The self-query retriever requires you to have lark installed (pip install lark). We also need the opensearch-py package.pip install lark opensearch-pyfrom langchain.schema import Documentfrom langchain.embeddings.openai import OpenAIEmbeddingsfrom langchain.vectorstores import OpenSearchVectorSearchimport osimport getpassos.environ["OPENAI_API_KEY"] = getpass.getpass("OpenAI API Key:")embeddings = OpenAIEmbeddings()    OpenAI API Key: ¬∑¬∑¬∑¬∑¬∑¬∑¬∑¬∑docs = [    Document(        page_content="A bunch of scientists bring back dinosaurs and mayhem
OpenSearch is a scalable, flexible, and extensible open-source software suite for search, analytics, and observability applications licensed under Apache 2.0. OpenSearch is a distributed search and analytics engine based on Apache Lucene.
OpenSearch is a scalable, flexible, and extensible open-source software suite for search, analytics, and observability applications licensed under Apache 2.0. OpenSearch is a distributed search and analytics engine based on Apache Lucene. ->: Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversAmazon KendraArcee RetrieverArxivAzure Cognitive SearchBM25ChaindeskChatGPT PluginCohere RerankerDocArrayElasticSearch BM25Google Cloud Enterprise SearchGoogle DriveGoogle Vertex AI SearchKay.aikNNLOTR (Merger Retriever)MetalPinecone Hybrid SearchPubMedRePhraseQuerySEC filingSelf-querying retrieverDeep LakeChromaDashVectorElasticsearchMilvusMyScaleOpenSearchPineconeQdrantRedisSupabaseTimescale Vector (Postgres) self-queryingVectaraWeaviateSVMTavily Search APITF-IDFVespaWeaviate Hybrid SearchWikipediayou-retrieverZepToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsRetrieversSelf-querying retrieverOpenSearchOn this pageOpenSearchOpenSearch is a scalable, flexible, and extensible open-source software suite for search, analytics, and observability applications licensed under Apache 2.0. OpenSearch is a distributed search and analytics engine based on Apache Lucene.In this notebook, we'll demo the SelfQueryRetriever with an OpenSearch vector store.Creating an OpenSearch vector store‚ÄãFirst, we'll want to create an OpenSearch vector store and seed it with some data. We've created a small demo set of documents that contain summaries of movies.Note: The self-query retriever requires you to have lark installed (pip install lark). We also need the opensearch-py package.pip install lark opensearch-pyfrom langchain.schema import Documentfrom langchain.embeddings.openai import OpenAIEmbeddingsfrom langchain.vectorstores import OpenSearchVectorSearchimport osimport getpassos.environ["OPENAI_API_KEY"] = getpass.getpass("OpenAI API Key:")embeddings = OpenAIEmbeddings()    OpenAI API Key: ¬∑¬∑¬∑¬∑¬∑¬∑¬∑¬∑docs = [    Document(        page_content="A bunch of scientists bring back dinosaurs and mayhem