remote::elasticsearch
Description
Elasticsearch is a vector database provider for OGX. It allows you to store and query vectors directly within an Elasticsearch database. That means you're not limited to storing vectors in memory or in a separate service.
Features
Elasticsearch supports:
- Store embeddings and their metadata
- Vector search
- Full-text search
- Fuzzy search
- Hybrid search
- Document storage
- Metadata filtering
- Inference service
- Machine Learning integrations
Usage
To use Elasticsearch in your OGX project, follow these steps:
- Install the necessary dependencies.
- Configure your OGX project to use Elasticsearch.
- Start storing and querying vectors.
Installation
You can test Elasticsearch locally by running this script in the terminal:
curl -fsSL https://elastic.co/start-local | sh
Or you can start a free trial on Elastic Cloud. For more information on how to deploy Elasticsearch, see the official documentation.
Documentation
See Elasticsearch's documentation for more details about Elasticsearch in general.
Configuration
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
elasticsearch_api_key | str | None | No | The API key for the Elasticsearch instance | |
elasticsearch_url | str | None | No | localhost:9200 | The URL of the Elasticsearch instance |
persistence | KVStoreReference | None | No | Config for KV store backend (SQLite only for now) | |
persistence.namespace | str | No | Key prefix for KVStore backends | |
persistence.backend | str | No | Name of backend from storage.backends | |
metadata_store | SqlStoreReference | None | No | SQL store reference for tenant-isolated vector store metadata | |
metadata_store.table_name | str | No | Name of the table to use for the SqlStore | |
metadata_store.backend | str | No | Name of backend from storage.backends |
Sample Configuration
elasticsearch_url: ${env.ELASTICSEARCH_URL:=localhost:9200}
elasticsearch_api_key: ${env.ELASTICSEARCH_API_KEY:=}
persistence:
namespace: vector_io::elasticsearch
backend: kv_default