Ekom.Algolia
0.2.30
dotnet add package Ekom.Algolia --version 0.2.30
NuGet\Install-Package Ekom.Algolia -Version 0.2.30
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ekom.Algolia" Version="0.2.30" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ekom.Algolia" Version="0.2.30" />Directory.Packages.props
<PackageReference Include="Ekom.Algolia" />Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ekom.Algolia --version 0.2.30
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Ekom.Algolia, 0.2.30"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ekom.Algolia@0.2.30
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ekom.Algolia&version=0.2.30Install as a Cake Addin
#tool nuget:?package=Ekom.Algolia&version=0.2.30Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Ekom.Algolia
Algolia integration plugin for Ekom (Umbraco).
Features
- Product indexing with background queue/worker.
- Category indexing with background queue/worker.
- Standard Umbraco content indexing with background queue/worker.
- Product search service with Algolia SDK
SearchForHitsrequests. - Category search service with Algolia SDK
SearchForHitsrequests. - Standard content search and federated multi-index search.
- Algolia Insights events for view, add-to-cart, checkout, purchase.
- In-memory search result caching with store-scoped invalidation after reindex/update/delete.
- Index naming convention:
{primary|replica|query_suggestions}.ENVIRONMENT.STORE.ENTITY[_sorted_by_{asc|desc}_ATTRIBUTE][.Locale][.Currency].
Install
Register services:
using Ekom.Algolia;
services.AddAlgolia();
Search products:
using Algolia.Search.Models.Search;
using Ekom.Algolia.Models.Search;
using Ekom.Algolia.Services;
public sealed class ProductSearchController
{
private readonly IAlgoliaSearchService _algoliaSearchService;
public ProductSearchController(IAlgoliaSearchService algoliaSearchService)
{
_algoliaSearchService = algoliaSearchService;
}
public async Task<IReadOnlyList<string>> SearchAsync(CancellationToken ct)
{
var response = await _algoliaSearchService.SearchProductsAsync(
new AlgoliaSearchRequest
{
StoreAlias = "Store",
Locale = "en-US",
Currency = "USD",
Query = new SearchForHits
{
Query = "shoe",
HitsPerPage = 20,
Filters = "Available:1"
}
},
ct).ConfigureAwait(false);
return response.Hits.Select(x => x.Title).ToList();
}
}
Configuration (appsettings.json)
{
"Ekom": {
"Algolia": {
"Enabled": true,
"ApplicationId": "APP_ID",
"AdminApiKey": "ADMIN_API_KEY",
"SearchApiKey": "SEARCH_API_KEY",
"InsightsApiKey": "INSIGHTS_API_KEY",
"AnalyticsRegion": "eu",
"Environment": "prod",
"Indexing": {
"Enabled": true,
"Products": true,
"Categories": true,
"BatchSize": 1000,
"ProductProperties": [
"title",
"summary",
"description",
"channels|array",
"stockCount|int",
"weight|decimal",
"publishedAt|unix"
],
"Dispatching": {
"MaxBatchSize": 100,
"FlushIntervalSeconds": 2,
"MaxQueueSize": 10000,
"MaxConcurrency": 2
}
},
"ContentIndexing": {
"Enabled": true,
"EnforcePublisherOnly": true,
"BatchSize": 1000,
"Indexes": [
{
"IndexName": "SearchIndex",
"ContentTypes": [
{
"Alias": "article",
"Properties": [
"title",
"summary",
"publishedAt|unix"
]
}
]
}
]
},
"Search": {
"Enabled": true,
"Products": true,
"Categories": true,
"QuerySuggestions": true,
"IncludeUserToken": true,
"VaryCacheByUserToken": false,
"MinimumQueryLength": 2,
"MaxHitsPerPage": 100,
"QuerySuggestionsProvisioning": {
"Enabled": true,
"UseReplicas": false,
"MinimumHits": 5,
"MinimumLetters": 4,
"EnablePersonalization": false,
"AllowSpecialCharacters": false,
"Exclude": []
},
"Cache": {
"Enabled": true,
"DurationMinutes": 60,
"CacheEmptyResults": true
}
},
"Events": {
"Enabled": true,
"ViewedProduct": true,
"AddedToCart": true,
"StartedCheckout": true,
"Purchase": true
},
"Stores": [
{
"Alias": "Store"
}
]
}
}
}
Settings reference
| Setting | Type | Default | Description |
|---|---|---|---|
Enabled |
bool |
true |
Enables the Algolia plugin. |
ApplicationId |
string |
required | Algolia application ID. |
AdminApiKey |
string |
required | API key used for indexing, settings, replicas, and query suggestion provisioning. |
SearchApiKey |
string |
required | API key used by IAlgoliaSearchService search requests. |
InsightsApiKey |
string |
null |
Optional key for Insights events. Falls back to AdminApiKey when omitted. |
AnalyticsRegion |
string |
null |
Algolia analytics region for query suggestions, usually us or eu. If omitted, the plugin tries both. |
Environment |
string |
prod |
Environment segment used in generated index names. |
Indexing:Enabled |
bool |
true |
Enables indexing features. |
Indexing:Products |
bool |
true |
Enables product indexing. |
Indexing:Categories |
bool |
true |
Enables category indexing. |
Indexing:BatchSize |
int |
1000 |
Batch size for Algolia save/replace/delete operations. |
Indexing:ProductProperties |
string[] |
[] |
Additional product properties/metafields to include in product records. Supports modifiers documented below. |
Indexing:SortedReplicas |
object[] |
[] |
Replica definitions using Attribute and Direction (Asc or Desc). |
Indexing:Dispatching:MaxBatchSize |
int |
100 |
Maximum queued jobs processed in one worker batch. |
Indexing:Dispatching:FlushIntervalSeconds |
int |
2 |
Worker delay between queue flushes. |
Indexing:Dispatching:MaxQueueSize |
int |
10000 |
Maximum in-memory queue size. |
Indexing:Dispatching:MaxConcurrency |
int |
2 |
Maximum indexing worker concurrency. |
ContentIndexing:Enabled |
bool |
false |
Enables standard Umbraco content indexing. |
ContentIndexing:BatchSize |
int |
1000 |
Batch size for content index rebuild operations. |
ContentIndexing:Indexes |
object[] |
[] |
Content indexes to maintain. Index names resolve as {IndexName}.{Environment}.{Culture}. |
ContentIndexing:Indexes[*]:ContentTypes[*]:Alias |
string |
required | Umbraco content type alias to include in the content index. |
ContentIndexing:Indexes[*]:ContentTypes[*]:Properties |
string[] |
[] |
Property aliases to index. Use |unix or |unixms to add numeric date fields. |
Search:Enabled |
bool |
true |
Enables Algolia search services. |
Search:Products |
bool |
true |
Enables product search. |
Search:Categories |
bool |
true |
Enables category search. |
Search:QuerySuggestions |
bool |
false |
Enables query suggestion search and provisioning. |
Search:IncludeUserToken |
bool |
true |
Adds userToken to Algolia search requests using IAlgoliaUserTokenProvider, unless the query already has a token. |
Search:VaryCacheByUserToken |
bool |
false |
Includes userToken in search cache keys. Keep false for shared cache; set true when Algolia personalization changes result order/content per user. |
Search:MinimumQueryLength |
int |
2 |
Minimum query length before search executes. Set 0 to disable this guard. |
Search:MaxHitsPerPage |
int |
100 |
Upper bound for requested HitsPerPage. Set 0 or less to avoid clamping. |
Search:Cache:Enabled |
bool |
true |
Enables in-memory search response caching. |
Search:Cache:DurationMinutes |
int |
60 |
Search cache duration. |
Search:Cache:CacheEmptyResults |
bool |
true |
Whether empty result sets are cached. |
Search:QuerySuggestionsProvisioning:Enabled |
bool |
true |
Creates/updates Algolia query suggestion configuration automatically. |
Search:QuerySuggestionsProvisioning:UseReplicas |
bool |
false |
Includes source index replicas in query suggestion generation. |
Search:QuerySuggestionsProvisioning:MinimumHits |
int |
5 |
Minimum hits required for query suggestions. |
Search:QuerySuggestionsProvisioning:MinimumLetters |
int |
4 |
Minimum letters required for query suggestions. |
Search:QuerySuggestionsProvisioning:EnablePersonalization |
bool |
false |
Enables personalization for query suggestions configuration. |
Search:QuerySuggestionsProvisioning:AllowSpecialCharacters |
bool |
false |
Allows special characters in query suggestions. |
Search:QuerySuggestionsProvisioning:Exclude |
string[] |
[] |
Query suggestion exclusion list. |
Events:Enabled |
bool |
true |
Enables Algolia Insights events. |
Events:ViewedProduct |
bool |
true |
Sends product view events. |
Events:AddedToCart |
bool |
true |
Sends add-to-cart conversion events. |
Events:StartedCheckout |
bool |
true |
Sends checkout conversion events. |
Events:Purchase |
bool |
true |
Sends purchase conversion events. |
Stores |
object[] |
[] |
Store aliases supported by the plugin. Locale/currency are resolved from Ekom store data. |
Stores[*]:Alias |
string |
required | Ekom store alias. |
Stores[*]:IncludeStock |
bool |
false |
Includes product stock in indexed records for this store. |
Notes
- Indexing triggers from Umbraco content notifications for
ekmProductandekmCategory. - Search uses the required
SearchApiKey; indexing and settings operations continue to useAdminApiKey. - When
Search.QuerySuggestionsis enabled, the plugin provisions the separatequery_suggestions...index configuration automatically with the Admin API key. - Set
AnalyticsRegiontousoreuif you know your Algolia analytics region; if omitted, the plugin triesusand theneu. IAlgoliaSearchService.SearchProductsAsync(...)returns hits together with paging metadata, query text, processing time, and raw facets.IAlgoliaSearchService.SearchCategoriesAsync(...)searches a dedicated category index scoped by store alias and locale.IAlgoliaSearchService.SearchContentAsync(...)searches configured standard content indexes. Content index names resolve as{IndexName}.{Environment}.{Culture}.IAlgoliaSearchService.FederatedSearchAsync(...)executes products, categories, query suggestions, and content searches in one Algolia multi-search request and returns typed product/category/suggestion results plus keyed content results.- The plugin always resolves and sets the Algolia index name from Ekom store alias, locale, and currency; callers should not set
IndexNamethemselves. - Category indexes omit the currency suffix because category records are scoped by store alias and locale only.
- Search cache keys include the resolved index name and serialized Algolia query payload so all SDK options affect caching.
Search:IncludeUserTokensends user context to Algolia search. The default provider uses authenticated username, then session ID, then request trace identifier.Search:VaryCacheByUserTokencontrols whether that token also affects cache keys. Leave itfalsewhen results are not personalized so users can share cached results.- Store
LocaleandCurrencynow come from the Ekom store resolved by alias, soappsettings.jsononly needs the store alias. - Request and order context decide which culture and currency suffix is used; background indexing falls back to the store's default culture/currency.
Titleis always indexed as a top-level field, andNodeNamecontains the Umbraco node name.Availableis indexed as1for available products and0for unavailable products, so it can be used for numeric ranking.- Product records always include top-level
ProductRankingandCategoryRankinginteger fields. Both support negative values.ProductRankingreads the productekmAlgoliaRankproperty and defaults to0when missing or invalid.CategoryRankinguses the highest validekmAlgoliaRankvalue across the product's categories and defaults to0when no category has a valid rank. - Variants are not indexed by default.
Indexing.ProductPropertiessupports one optional modifier per property:|array,|int,|decimal,|unix, or|unixms.- Metafields can be indexed explicitly with
metafield:<alias>, for examplemetafield:material,metafield:color|array, ormetafield:releaseDate|unix. - Multi-value metafields are skipped unless
|arrayis configured. |arrayparses JSON arrays such as checkbox-list values like["Web","Store"]into Algolia string arrays.|decimalaccepts either comma or dot decimal separators, so values like0,1and0.0are indexed as decimals.- Invalid
|array,|int, and|decimalvalues are skipped instead of being indexed as strings. - Manual reindex all endpoint:
GETorPOST /umbraco/backoffice/api/Ekom/AlgoliaBackoffice/RebuildIndexesAsync. - Manual reindex store endpoint:
GETorPOST /umbraco/backoffice/api/Ekom/AlgoliaBackoffice/RebuildStoreIndexesAsync?storeAlias=Store.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Algolia.Search (>= 7.40.0)
- Ekom.U10 (>= 0.2.87)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.Hosting (>= 8.0.1)
- Microsoft.Extensions.Http (>= 8.0.1)
- Microsoft.Extensions.Options (>= 10.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.30 | 96 | 6/29/2026 |
| 0.2.29 | 86 | 6/28/2026 |
| 0.2.28 | 101 | 6/8/2026 |
| 0.2.27 | 101 | 6/8/2026 |
| 0.2.26 | 185 | 6/7/2026 |
| 0.2.25 | 104 | 6/3/2026 |
| 0.2.24 | 110 | 5/4/2026 |
| 0.2.23 | 113 | 5/4/2026 |
| 0.2.22 | 110 | 4/30/2026 |
| 0.2.21 | 114 | 4/23/2026 |
| 0.2.20 | 115 | 4/23/2026 |
| 0.2.19 | 111 | 4/23/2026 |
| 0.2.18 | 105 | 4/22/2026 |
| 0.2.17 | 104 | 4/22/2026 |
| 0.2.16 | 113 | 4/22/2026 |
| 0.2.15 | 113 | 4/21/2026 |
| 0.2.14 | 105 | 4/20/2026 |
| 0.2.13 | 103 | 4/20/2026 |
| 0.2.12 | 119 | 4/15/2026 |
| 0.2.11 | 107 | 4/15/2026 |
Loading failed