mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
Added tests + docs + CI for Elasticsearch
This commit is contained in:
parent
f1c8a200c8
commit
12f8d96f48
9 changed files with 209 additions and 115 deletions
104
docs/docs/providers/vector_io/remote_elasticsearch.mdx
Normal file
104
docs/docs/providers/vector_io/remote_elasticsearch.mdx
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
---
|
||||
description: |
|
||||
[Elasticsearch](https://www.elastic.co/) is a vector database provider for Llama Stack.
|
||||
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 Llama Stack project, follow these steps:
|
||||
|
||||
1. Install the necessary dependencies.
|
||||
2. Configure your Llama Stack project to use Elasticsearch.
|
||||
3. Start storing and querying vectors.
|
||||
|
||||
## Installation
|
||||
|
||||
You can test Elasticsearch locally by running this script in the terminal:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://elastic.co/start-local | sh
|
||||
```
|
||||
|
||||
Or you can [start a free trial](https://www.elastic.co/cloud/cloud-trial-overview?utm_campaign=llama-stack-integration) on Elastic Cloud.
|
||||
For more information on how to deploy Elasticsearch, see the [official documentation](https://www.elastic.co/docs/deploy-manage/deploy).
|
||||
|
||||
## Documentation
|
||||
See [Elasticsearch's documentation](https://www.elastic.co/docs/solutions/search) for more details about Elasticsearch in general.
|
||||
sidebar_label: Remote - Elasticsearch
|
||||
title: remote::elasticsearch
|
||||
---
|
||||
|
||||
# remote::elasticsearch
|
||||
|
||||
## Description
|
||||
|
||||
|
||||
[Elasticsearch](https://www.elastic.co/) is a vector database provider for Llama Stack.
|
||||
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 Llama Stack project, follow these steps:
|
||||
|
||||
1. Install the necessary dependencies.
|
||||
2. Configure your Llama Stack project to use Elasticsearch.
|
||||
3. Start storing and querying vectors.
|
||||
|
||||
## Installation
|
||||
|
||||
You can test Elasticsearch locally by running this script in the terminal:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://elastic.co/start-local | sh
|
||||
```
|
||||
|
||||
Or you can [start a free trial](https://www.elastic.co/cloud/cloud-trial-overview?utm_campaign=llama-stack-integration) on Elastic Cloud.
|
||||
For more information on how to deploy Elasticsearch, see the [official documentation](https://www.elastic.co/docs/deploy-manage/deploy).
|
||||
|
||||
## Documentation
|
||||
See [Elasticsearch's documentation](https://www.elastic.co/docs/solutions/search) for more details about Elasticsearch in general.
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
| Field | Type | Required | Default | Description |
|
||||
|-------|------|----------|---------|-------------|
|
||||
| `api_key` | `str \| None` | No | | The API key for the Elasticsearch instance |
|
||||
| `hosts` | `str \| None` | No | localhost:9200 | The URL of the Elasticsearch instance |
|
||||
| `persistence` | `llama_stack.core.storage.datatypes.KVStoreReference \| None` | No | | Config for KV store backend (SQLite only for now) |
|
||||
|
||||
## Sample Configuration
|
||||
|
||||
```yaml
|
||||
hosts: ${env.ELASTICSEARCH_API_KEY:=None}
|
||||
api_key: ${env.ELASTICSEARCH_URL:=localhost:9200}
|
||||
persistence:
|
||||
namespace: vector_io::elasticsearch
|
||||
backend: kv_default
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue