Closed hallojoe closed 1 year ago
There's code in ExamineX that does this within the underlying AddExamineXAzureSearchIndex
method:
// no explicit analyzer, set as the orig
if (analyzerName == null && originalNamedOptions.Analyzer != null)
{
analyzerName = LuceneAzureSearchConverter.ToAzureSearchAnalyzer(
originalNamedOptions.Analyzer.GetType()).ToString();
}
What should occur is that some validation is done when there isn't any IOptionsMonitor<LuceneDirectoryIndexOptions>
for that named index.
In your case you could/should add a service to DI for IConfigureNamedOptions
I've added a fix for this so that it falls back to StandardAnalyzer if no options are configured at all.
Will be out with the 4.0.0 RTM release this week.
Umbraco 10.1.0
ExamineX 4.0.0-beta 2
When adding a custom Examine index, this code will do the job:
A default analyzer is set when analyzer argument is not given.
This code will work as far as getting indexes created and populated on the Azure Search Service:
When querying the index from code or back-office, then this exception is thrown:
The fix is easy - give
analyzerName
argument:Suggestion:
analyzerName
default tostandard
or it is made non-nullable.