Has anyone used the elasticsearch client for EPiServer called Vulcan? (https://github.com/TCB-Internet-Solutions/vulcan)
By all accounts (including this very well-written one: https://blog.wsol.com/getting-started-using-vulcan-search-in-episerver) it should be as simple as installing the NuGet package "TcbInternetSolutions.Vulcan.Core" from the EPiServer NuGet feed, adding the web.config settings, and running the scheduled job to index the data.
I installed the NuGet package (version 3.0.1) into my EPiServer project (version 11.2.1) and set my web.config settings and the indexing job reports "The job has completed. Please refresh the page to see the status." with a run history showing "Vulcan successfully indexed 100 item(s) across 1 indexers!".
However, when I lok at the "\App_Data\EPiServerErrors.log" file I see a mass of errors such as:
ERROR TcbInternetSolutions.Vulcan.Core.Implementation.VulcanClient: Vulcan could not index content with content link 10 for language en: System.Exception: Invalid NEST response built from a unsuccessful low level call on PUT: /customername_en/EPiServer.Core.BlockData/10 Audit trail of this API call: - [1] BadResponse: Node: http://localhost:9200/ Took: 00:00:00.4026489 ServerError: ServerError: 400Type: mapper_parsing_exception Reason: "failed to find type parsed [string] for [contentAssetsID]" OriginalException: System.Net.WebException: The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.GetResponse() at Elasticsearch.Net.HttpConnection.Request[TReturn](RequestData requestData) in C:\Projects\elastic\net-2\src\Elasticsearch.Net\Connection\HttpConnection.cs:line 163
It looks like it is failing to index the type "EPiServer.Core.BlockData" in the index "customername_en" because of the default mapping of everything to a string when "[contentAssetsID]" is supposed to be a number. So I tried adding an initialization class to set the mapping to AutoMap:
[ModuleDependency(typeof(ServiceContainerInitialization))]
public class SearchInitialization : IConfigurableModule
{
public void ConfigureContainer(ServiceConfigurationContext context)
{
// Nothing to do
}
public void Initialize(InitializationEngine context)
{
var vh = ServiceLocator.Current.GetInstance<VulcanHandler>();
var vhClient = vh.GetClient(new System.Globalization.CultureInfo("en"));
var res = vhClient.Map<EPiServer.Core.BlockData>(m => m.AutoMap());
}
public void Uninitialize(InitializationEngine context)
{
// Nothing to do
}
}
"res" returns a successful response but the errors still occur.
Full errors here: https://pastebin.com/T7NPgZj9
Please help!