AI Data Sources - Elasticsearch
| Feature Name | AI Data Sources - Elasticsearch |
| Feature ID | CrestApps.OrchardCore.AI.DataSources.Elasticsearch |
Adds Elasticsearch support for AI data source document embeddings, vector search, and indexing.
Overview
This module provides Elasticsearch support for AI data source knowledge base indexes. It enables vector search and document embedding storage using Elasticsearch's k-NN capabilities, allowing AI tools to perform Retrieval-Augmented Generation (RAG) searches against Elasticsearch indexes.
When AI profiles are configured with data sources, the system needs to search and retrieve relevant documents to provide context to AI models. This module handles:
- Index schema management — Creates and manages Elasticsearch mappings for knowledge base indexes with dense vector fields for embeddings.
- Document indexing — Indexes source documents with their embeddings into Elasticsearch knowledge base indexes.
- Vector search — Performs k-NN similarity searches to find the most relevant documents for a given query.
- Filter execution — Executes Elasticsearch DSL filter queries translated from OData for filtered vector search.
- OData filter translation — Translates OData filter expressions into Elasticsearch-compatible bool queries targeting root-level filter fields.
- Batch document reading — Reads source documents from Elasticsearch indexes in batches for efficient indexing.
- Automatic source sync — When Orchard Core updates or deletes documents in Elasticsearch, the module forwards those provider notifications into the shared data-source indexing queue so mapped knowledge-base indexes stay aligned.
- External source connections — Adds Elasticsearch as a selectable AI data-source Source type so operators can read directly from an external Elasticsearch index by configuring either a self-managed endpoint URL or an Elastic Cloud ID, selecting the authentication type, setting the remote index name, and optionally supplying a certificate fingerprint.
Getting Started
- Enable the AI Data Sources - Elasticsearch feature in the Orchard Core admin dashboard.
- Create an Elasticsearch knowledge base index via Search > Indexes using the "AI Knowledge Base Index" type.
- Configure an AI data source under Artificial Intelligence > Data Sources, selecting either an Orchard-managed Elasticsearch source index profile or the Elasticsearch external source type and the knowledge base index.
- For external Elasticsearch sources, choose the environment and authentication mode that matches the target cluster:
- Self-managed with URL
- Cloud-hosted with Elastic Cloud ID
- None, Basic, API key, Base64 API key, or Key ID and key authentication
- The module will automatically sync documents from the source index to the knowledge base index with embeddings.