Configures search and indexing in Orchard Core: IndexProfile definitions, Lucene/Elasticsearch/Azure AI Search providers, document index handlers, index lifecycle recipes, permissions, and search queries.
Ships in orchardcore. 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.
Read when SKILL.md points to them.
You are an Orchard Core expert. Generate search and indexing configurations for Orchard Core.
IndexProfile for Lucene, Elasticsearch, and Azure AI Search indexes.OrchardCore.Lucene, OrchardCore.Elasticsearch, or OrchardCore.AzureAI.CreateOrUpdateIndexProfile step.IDocumentIndexHandler for document-wide indexing and read the source
record from BuildDocumentIndexContext.Record.DocumentIndex supports text, numeric, date, boolean, geo-point, Complex,
and Vector entries. Use the matching Set overload for the value type.IndexingPermissions.QuerySearchIndex permission
(OrchardCore.Indexing.Core). A profile-specific QueryIndex_{name}
permission is created by IndexingPermissions.CreateDynamicPermission.OrchardCore:Search:Elasticsearch and
OrchardCore:Search:AzureAISearch since Orchard Core 4.0 (the
OrchardCore_* names are deprecated).ISearchService implementations are keyed by provider name; resolve one with
GetKeyedService<ISearchService>(indexProfile.ProviderName).{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.Search",
"OrchardCore.Lucene",
"OrchardCore.Indexing"
],
"disable": []
}
]
}
{
"steps": [
{
"name": "CreateOrUpdateIndexProfile",
"indexes": [
{
"Name": "Search",
"IndexName": "search",
"ProviderName": "Lucene",
"Type": "Content",
"Properties": {
"ContentIndexMetadata": {
"IndexLatest": false,
"IndexedContentTypes": [
"Article",
"BlogPost"
],
"Culture": "any"
},
"LuceneIndexMetadata": {
"AnalyzerName": "standardanalyzer",
"StoreSourceData": false
}
}
}
]
}
]
}
Configure in appsettings.json:
{
"OrchardCore": {
"Search": {
"Elasticsearch": {
"Url": "https://localhost",
"Ports": [9200],
"ConnectionType": "SingleNodeConnectionPool"
}
}
}
}
See orchardcore-elasticsearch and orchardcore-azure-ai-search for the full provider settings.
{
"steps": [
{
"name": "CreateOrUpdateIndexProfile",
"indexes": [
{
"Name": "Search",
"IndexName": "search",
"ProviderName": "Elasticsearch",
"Type": "Content",
"Properties": {
"ContentIndexMetadata": {
"IndexLatest": false,
"IndexedContentTypes": [
"Article",
"BlogPost"
],
"Culture": "any"
},
"ElasticsearchIndexMetadata": {
"AnalyzerName": "standard",
"StoreSourceData": false
}
}
}
]
}
]
}
{
"steps": [
{
"name": "Queries",
"Queries": [
{
"Source": "Lucene",
"Name": "RecentBlogPosts",
"Index": "Search",
"Template": "{\"query\":{\"bool\":{\"filter\":[{\"term\":{\"Content.ContentItem.ContentType\":\"BlogPost\"}}]}},\"sort\":{\"Content.ContentItem.CreatedUtc\":{\"order\":\"desc\"}},\"size\":10}",
"ReturnContentItems": true,
"Schema": "[]"
}
]
}
]
}
{% assign results = Queries.RecentBlogPosts | query %}
{% for item in results %}
<article>
<h2>{{ item.DisplayText }}</h2>
<p>{{ item.Content.BlogPost.Subtitle.Text }}</p>
</article>
{% endfor %}
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.DependencyInjection;
using OrchardCore.Indexing;
using OrchardCore.Indexing.Core;
using OrchardCore.Search.Abstractions;
public sealed class SiteSearchService
{
private readonly IIndexProfileManager _indexProfileManager;
private readonly IServiceProvider _serviceProvider;
private readonly IAuthorizationService _authorizationService;
public SiteSearchService(
IIndexProfileManager indexProfileManager,
IServiceProvider serviceProvider,
IAuthorizationService authorizationService)
{
_indexProfileManager = indexProfileManager;
_serviceProvider = serviceProvider;
_authorizationService = authorizationService;
}
public async Task<IList<string>> SearchAsync(ClaimsPrincipal user, string query)
{
var indexProfile = await _indexProfileManager.FindByNameAsync("Search")
?? throw new InvalidOperationException("The Search index profile does not exist.");
// Resolves the profile-specific QueryIndex_{name} permission.
if (!await _authorizationService.AuthorizeAsync(user, IndexingPermissions.QuerySearchIndex, indexProfile))
{
return [];
}
// Search services are registered with AddSearchService<T>(providerName) as keyed services.
var searchService = _serviceProvider.GetKeyedService<ISearchService>(indexProfile.ProviderName)
?? throw new InvalidOperationException($"No search service for '{indexProfile.ProviderName}'.");
var result = await searchService.SearchAsync(indexProfile, query, 0, 10);
return result.ContentItemIds;
}
}
The front-end search page is GET /search/{index?}?terms=... (GET-only since Orchard Core 4.0); index is the index profile name, otherwise the default index of the search settings is used.
Implement IDocumentIndexHandler when indexing requires the complete source
record. BuildDocumentIndexContext.Record is an object, so check its type
before adding entries. The Complex and Vector overloads preserve structured
values and vector dimensions for providers that support them.
A handler only shapes records that already reach the indexing pipeline. To
index records that are not content items (task log entries, a
NamedIndexingService subclass, a background task, and a profile handler for
sync and reset), follow orchardcore-indexing-sources.
using System.Collections.Generic;
using OrchardCore.Indexing;
public sealed class ProductDocumentIndexHandler : IDocumentIndexHandler
{
public Task BuildIndexAsync(BuildDocumentIndexContext context)
{
if (context.Record is not ProductRecord record)
{
return Task.CompletedTask;
}
context.DocumentIndex.Set(
"Product.Name",
record.Name,
DocumentIndexOptions.Store);
context.DocumentIndex.Set(
"Product.Attributes",
record.Attributes,
DocumentIndexOptions.Store);
context.DocumentIndex.Set(
"Product.Embedding",
record.Embedding,
record.Embedding.Length,
DocumentIndexOptions.None);
return Task.CompletedTask;
}
}
public sealed class ProductRecord
{
public string Name { get; init; } = string.Empty;
public Dictionary<string, object> Attributes { get; init; } = [];
public float[] Embedding { get; init; } = [];
}
Register the handler as a scoped service:
services.AddScoped<IDocumentIndexHandler, ProductDocumentIndexHandler>();
Use ContentIndexingConstants from OrchardCore.Contents.Indexing for
built-in content index keys such as ContentTypeKey, ContentItemIdKey, and
FullTextKey.
IndexingPermissions.QuerySearchIndex is the centralized permission for
querying an index. The indexing authorization handler resolves the
profile-specific dynamic permission created by
IndexingPermissions.CreateDynamicPermission(indexProfile), whose name is
QueryIndex_{indexProfile.Name} and which is implied by
IndexingPermissions.ManageIndexes and IndexingPermissions.QuerySearchIndex.
| Permission | Member |
|---|---|
| Query any index | OrchardCore.Indexing.Core.IndexingPermissions.QuerySearchIndex |
| Manage indexes | OrchardCore.Indexing.Core.IndexingPermissions.ManageIndexes |
| Query one index | IndexingPermissions.CreateDynamicPermission(indexProfile) |
| Manage search settings | OrchardCore.Search.SearchPermissions.ManageSearchSettings |
OrchardCore.Search.Permissions.QuerySearchIndex was removed; use OrchardCore.Indexing.Core.IndexingPermissions.QuerySearchIndex.OrchardCore.Search.Permissions.ManageSearchSettings was removed; use OrchardCore.Search.SearchPermissions.ManageSearchSettings.ElasticsearchIndexPermissionHelper.GetElasticIndexPermission(string) was removed; use IndexingPermissions.CreateDynamicPermission(IndexProfile).OrchardCore_Elasticsearch to OrchardCore:Search:Elasticsearch and OrchardCore_AzureAISearch to OrchardCore:Search:AzureAISearch.GET; forms posting to /search must use method="get" (the built-in Search Form already does).using OrchardCore.Indexing;
public sealed class MyPartIndexHandler : ContentPartIndexHandler<MyPart>
{
public override Task BuildIndexAsync(
MyPart part,
BuildPartIndexContext context)
{
var options = DocumentIndexOptions.Store;
context.DocumentIndex.Set(
$"{nameof(MyPart)}.{nameof(MyPart.MyField)}",
part.MyField,
options);
return Task.CompletedTask;
}
}
public sealed class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IContentPartIndexHandler, MyPartIndexHandler>();
}
}
{
"steps": [
{
"name": "Settings",
"SearchSettings": {
"DefaultIndexProfileName": "Search",
"Placeholder": "Search...",
"PageTitle": "Search"
}
}
]
}
Official Orchard Core videos shown on the documentation page:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
140 skills in this plugin
/orchardcore-adminGuidance for the Orchard Core admin panel, including admin controllers and routes, admin menu registration with AdminNavigationProvider, ocat editor forms grouped in cards, admin pages rendering Model.Editor, the UI text casing standard, TheAdmin layout and menu colors, admin branding, the Navbar shape, the Ctrl+K quick navigation palette and QuickNavigationSource, AdminSettings such as MenuBehavior, ShowBreadcrumb, DisplayQuickNavigation, DisplayTitlesInTopbar and ActionsLayout, the AdminDashboard shape, settings pages, and admin filters and zones. Use this skill when requests mention the Orchard Core admin panel, TheAdmin, admin controllers, admin menu registration, an icon on an admin menu item, the AdminSettings recipe step, quick navigation, navigation menu behavior, the admin URL prefix, UI text casing. Strong matches include OrchardCore.Admin, AdminSettings, AdminPermissions, AdminOptions, AdminAttribute, SiteDisplayDriver, IDisplayManager./orchardcore-admin-dashboardSkill for creating admin dashboard widgets in Orchard Core. Covers the DashboardWidget stereotype, DashboardPart position and sizing, the built-in HtmlDashboardWidget, ContentsMetadata and ContentsTags widget types, custom widget content types via recipe or migration, arranging widgets in Manage Dashboard mode, widget template customization, provisioning widgets with recipes, dashboard permissions, the DashboardBreadcrumbProvider Dashboard ancestor, and the AdminDashboardContent shape used when the feature is disabled. Use this skill when requests mention Orchard Core Admin Dashboard, Create and Configure Dashboard Widgets, Enabling Admin Dashboard, Widget Configuration Properties, dashboard widget recipes, Dashboard breadcrumb, or related implementation, setup, or troubleshooting work. Strong matches include OrchardCore.AdminDashboard, DashboardPart, DashboardBreadcrumbProvider, AccessAdminDashboard, ManageAdminDashboard./orchardcore:orchardcore-search-indexingfrom orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin orchardcoreOther plugins' skills for the same job