Configures Elasticsearch as the vector and indexing backend for CrestApps.Core AI documents, data sources, and memory. Covers service registration, OData filter translation, schema upgrades, and troubleshooting.
Ships in crestapps-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use Elasticsearch as the knowledge-base backend for AI documents, AI data sources and AI memory. For the data source model itself see crestapps-core-data-sources.
builder.Services.AddCrestAppsCore(crestApps => crestApps
.AddAISuite(ai => ai.AddOpenAI())
.AddIndexingServices(indexing => indexing
.AddYesSqlStores()
.AddElasticsearch(
builder.Configuration.GetSection("CrestApps:Elasticsearch"),
elasticsearch => elasticsearch
.AddAIDocuments()
.AddAIDataSources()
.AddAIMemory())));
The configuration section name is the host's choice. The sample hosts use CrestApps:Elasticsearch. AddElasticsearch(configure) without a section registers the services with no bound options.
| Call | Package | Adds |
|---|---|---|
AddCoreElasticsearchServices(section) | CrestApps.Core.Elasticsearch | ElasticsearchConnectionOptions, IElasticsearchClientFactory, a singleton ElasticsearchClient created by that factory, keyed IDataSourceContentManager, IDataSourceDocumentReader, IODataFilterTranslator, ISearchIndexManager, ISearchDocumentManager |
AddElasticsearchODataFilterTranslator() | CrestApps.Core.Elasticsearch | only the keyed IODataFilterTranslator, for hosts that bring their own clients and managers |
AddAIDocuments() / AddCoreElasticsearchAIDocumentSource() | CrestApps.Core.AI.Elasticsearch | AIDocuments index-profile source, profile handler, keyed IVectorSearchService |
AddAIDataSources() / AddCoreElasticsearchAIDataSource() | CrestApps.Core.AI.Elasticsearch | DataSource index-profile source, keyed ElasticsearchAIDataSourceSourceHandler, and AddCoreAIDataSourceRag() |
AddAIMemory() / AddCoreElasticsearchAIMemorySource() | CrestApps.Core.AI.Elasticsearch | AIMemory index-profile source, profile handler, keyed IMemoryVectorSearchService |
All keyed services use the provider name "Elasticsearch". Resolve them with [FromKeyedServices("Elasticsearch")], never unkeyed.
{
"CrestApps": {
"Elasticsearch": {
"Url": "https://localhost:9200",
"AuthenticationType": "Basic",
"Username": "elastic",
"Password": "use-a-secret",
"CertificateFingerprint": "",
"IndexPrefix": "app_"
}
}
}
ElasticsearchConnectionOptions: Url, CloudId, AuthenticationType (None, Basic, ApiKey, Base64ApiKey, KeyIdAndKey), Username, Password, ApiKey, Base64ApiKey, ApiKeyId, CertificateFingerprint and IndexPrefix (prepended to framework-managed index names). Elastic Cloud (CloudId) requires an authenticated mode. Keep credentials in user secrets, environment variables or a key vault.
filters. because source fields live in a filters object. category eq 'support' becomes a term query on filters.category. A field already starting with filters. is not prefixed again.text with a keyword sub-field. Use category.keyword eq 'Support Docs' for exact, mixed-case or multi-word matches.contentType, rootId, parentId and page are not prefixed and map to real fields. contentType eq null matches rows written before the column existed.ElasticsearchSearchIndexManager.TryAddFieldsAsync adds the typed columns to an existing index mapping on the next data source sync.An AIDataSource with Source = AIDataSourceSourceTypes.Elasticsearch reads a remote index whose settings live on the data source: Url or CloudId, EnvironmentType (SelfManaged or CloudHosted), AuthenticationType, IndexName, credentials (protected with AIDataSourceProtectionConstants.SourceSecretPurpose) and CertificateFingerprint. These are independent of the backend options above, which say where CrestApps writes its knowledge-base chunks. Push remote changes with IAIDataSourceChangeNotifier.
A host that already holds an ElasticsearchClient, such as a multi-tenant host with one client per tenant, passes a Func<IServiceProvider, ElasticsearchClient> instead of a configuration section:
using CrestApps.Core.Elasticsearch;
using CrestApps.Core.AI.Elasticsearch;
using CrestApps.Core.Infrastructure;
// Every core service with the host's client. No IElasticsearchClientFactory or ElasticsearchClient is registered.
builder.Services.AddCoreElasticsearchServices(sp => sp.GetRequiredService<TenantSearchClients>().Elasticsearch);
// AI search services alone, without the index profile sources or handlers.
builder.Services
.AddElasticsearchVectorSearchService(
sp => sp.GetRequiredService<TenantSearchClients>().Elasticsearch,
new DocumentIndexColumnNames { FileName = "file_name" })
.AddElasticsearchMemoryVectorSearchService(sp => sp.GetRequiredService<TenantSearchClients>().Elasticsearch)
.AddElasticsearchAIDataSourceSourceHandler();
| Method | Registers |
|---|---|
AddCoreElasticsearchServices(Func<IServiceProvider, ElasticsearchClient>) | content manager, document reader, filter translator, index and document managers with the supplied client |
AddElasticsearchDataSourceContentManager(clientFactory) / AddElasticsearchDataSourceDocumentReader(clientFactory) | one service each |
AddElasticsearchVectorSearchService(clientFactory, DocumentIndexColumnNames columnNames = null) | keyed IVectorSearchService for AI documents |
AddElasticsearchMemoryVectorSearchService(clientFactory) | keyed IMemoryVectorSearchService |
AddElasticsearchAIDataSourceSourceHandler() or (Func<IServiceProvider, IElasticsearchClientFactory>) | the external-source handler, with the default or a supplied client factory |
AddAIDocuments() or AddAIMemory(). The source handler uses AddKeyedScoped, so the last registration wins. It connects with the settings stored on each data source, which is why it takes an IElasticsearchClientFactory.DocumentIndexColumnNames (in CrestApps.Core.Infrastructure) names the fields of the host's AI documents index; each defaults to DocumentIndexConstants.ColumnNames.| Symptom | Check |
|---|---|
| Index profile creation says the provider is not configured | Url or CloudId missing from the bound section; the message now names the provider |
401 Unauthorized | AuthenticationType matches the supplied credential fields |
| TLS failure | set CertificateFingerprint for self-signed clusters |
| Filter returns nothing | use the .keyword sub-field for exact string matches |
| Filter ignored with a warning | no keyed translator; call AddElasticsearchODataFilterTranslator() |
Elastic.Clients.Elasticsearch was held at its current version in the latest package update.contentType are read as text, and the typed columns are added in place.AddElasticsearchODataFilterTranslator().Purpose usage from embedding configuration; embeddings resolve through the embedding deployment slot or the index profile's EmbeddingDeploymentName.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/crestapps-core:crestapps-core-elasticsearchfrom crestapps-core
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-core51 skills in this plugin
/crestapps-core-a2aSkill for Agent-to-Agent (A2A) protocol support in CrestApps.Core on the A2A 1.0 SDK. Covers AddA2AClient and AddCoreAIA2AClient with Entity Framework Core or YesSql connection stores, A2AConnection and A2AConnectionMetadata authentication, AIProfileA2AMetadata, the agent card cache and A2AToolRegistryProvider, the listAvailableAgents, findAgentForTask and findToolsForTask tools, building an A2A host with IAgentHandler, A2AServer, ITaskStore and MapA2A, A2A 1.0 agent cards with supportedInterfaces published at /.well-known/agent-card.json, A2AHostOptions authentication and ExposeAgentsAsSkill, system agents exposed through the host, and upgrading from the 0.3 SDK./crestapps-core-ag-uiSkill for running the CrestApps.Core 2.0 AI chat as an AG-UI agent. Covers the CrestApps.Core.AI.AGUI package (AGUIRunEventWriter, AGUIRunRequest, AGUIJson), AIChatHubCore.RunAgent over SignalR and MapAGUIChat with Server-Sent Events, the RunAgentInput members and streamed events, tool approvals with RequireApproval or an approval tool kind, ApprovalRequiredAIFunction, interrupts and resume, approvals inside agents, page context with crestAppsAGUI.registerContextProvider, shared state with registerStateProvider and update_shared_state, frontend tools, stored tool calls (ChatTurnToolActivity), runs that continue on the next page, AGUIChatOptions.DisconnectedRunTimeout, the protocol and sendPageContext chat options, and the AICompletionContextKeys and ChatResponseHandlerContext members. Use it when showing tool calls in the chat, asking a person before a tool runs, sharing page state with the agent, connecting CopilotKit or another AG-UI client, or troubleshooting approvals and continued runs.Other plugins' skills for the same job