OpenSearch Setup
This guide explains how to set up OpenSearch locally using Docker Compose. OpenSearch is an open-source search engine that is compatible with Elasticsearch and can be used as a drop-in replacement for the vector search capabilities in TextLayer Core.Prerequisites
- Docker installed on your machine
- Docker Compose installed on your machine
Connection Details
When connecting to OpenSearch from TextLayer Core, use the following environment variables:Dashboard Access
You can access the OpenSearch Dashboard at http://localhost:5601/app/dev_tools/console with the following credentials:- Username: admin
- Password:
{your-secure-password}
Docker Compose Configuration
Create adocker-compose.yml file with the following configuration:
Starting OpenSearch
To start OpenSearch and the dashboard, run the following command in the directory containing yourdocker-compose.yml file:
Connecting from Python
When connecting to OpenSearch from your Python application, make sure to setuse_ssl=False for local development: