AI OnAI Off
This was resolved yesterday. Lucene cannot handle the amount of data we have in our system (9000 SKUs, 140+ meta fields), so the Solr search provider should be used. However, to successfully use Solr, one must also configure it to NOT use "shared cores", and the core's application name must be lowercase.
I thank Mark Hall (Mediachase) and Roger Cevung (EPiServer) for their help in finding the solution. Hopefully this will help someone else as well.
Mediachase.Search.IndexBuildException: Build Failed using "catalog" indexer. "Index was outside the bounds of the array." ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Lucene.Net.Index.DocumentsWriter.Abort(AbortException ae)
at Lucene.Net.Index.DocumentsWriter.UpdateDocument(Document doc, Analyzer analyzer, Term delTerm)
at Lucene.Net.Index.IndexWriter.AddDocument(Document doc, Analyzer analyzer)
at Mediachase.Search.Providers.Lucene.LuceneSearchProvider.Commit(String applicationName)
at Mediachase.Search.SearchService.Commit(String applicationName)
at Mediachase.Search.IndexBuilder.SaveBuild(Status status, DateTime buildDateTime)
at Mediachase.Search.IndexBuilder.SaveBuild(Status status)
at Mediachase.Search.Extensions.BaseCatalogIndexBuilder.BuildIndex(Boolean rebuild)
at Mediachase.Search.SearchManager.BuildIndex(Boolean rebuild)
This happens both when triggering index build from Commerce Manager and from code using the API. Any solutions? It is mentioned as a "fixed" bug in Mediachase ECF 5.1, where it was caused by having "too much" data in the catalog, e.g. more than 5500 articles or alike. However I am running EPiServer Commerce R2 which is based on ECF 5.2 build 243.