During (manually triggered) indexing of the master database, I get the following exception (stack trace below). Using Sitecore 8.2u7 with SXA 1.7.
27608 10:43:03 ERROR [Index=sitecore_master_index] Commit failed Exception: System.AggregateException Message: One or more errors occurred. Source: mscorlib at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Parallel.ForWorker[TLocal](Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.ForEachWorker[TSource,TLocal](IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally) at System.Threading.Tasks.Parallel.ForEach[TSource](IEnumerable`1 source, Action`1 body) at Sitecore.ContentSearch.Azure.Http.CompositeSearchService.PostDocuments(ICloudBatch batch) at Sitecore.ContentSearch.Azure.CloudSearchUpdateContext.Commit() Nested Exception Exception: Sitecore.ContentSearch.Azure.Http.Exceptions.PostFailedForSomeDocumentsException Message: Partial success for insert or update. Some documents succeeded, but at least one failed. Source: Sitecore.ContentSearch.Azure at Sitecore.ContentSearch.Azure.Http.SearchServiceClient.EnsureSuccessStatusCode(HttpResponseMessage response) at Sitecore.ContentSearch.Azure.Http.SearchServiceClient.PostDocuments(String jsonString) at Sitecore.ContentSearch.Azure.Http.SearchService.PostDocuments(ICloudBatch batch) at Sitecore.ContentSearch.Azure.Http.CompositeSearchService.<>c__DisplayClass15_0.<PostDocuments>b__0(ISearchService searchService) at System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1() at System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) at System.Threading.Tasks.Task.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object ) Nested Exception Exception: Sitecore.ContentSearch.Azure.Http.Exceptions.AzureSearchServiceRESTCallException Message: {"@odata.context":"https://wonkey-donkey.search.windows.net/indexes('sitecore-master-index')/$metadata#Collection(Microsoft.Azure.Search.V2016_09_01.IndexResult)","value":[{"key":"3cd50abca6dae4d4fe8174aeedddd81a","status":true,"errorMessage":null,"statusCode":201}, I've truncated the exception response from Azure for brevity, but the failing response of interest is
{ "key":"aeaa7458b10a04593a6ef20bbbbc12f1", "status":false, "errorMessage":"Field 'content_1' contains a term that is too large to process. The max length for UTF-8 encoded terms is 32766 bytes. The most likely cause of this error is that filtering, sorting, and/or faceting are enabled on this field, which causes the entire field value to be indexed as a single term. Please avoid the use of these options for large fields.", "statusCode":400 }, I've tried searching that "key" value in Sitecore and it does not correspond to a template ID, so I assume this must be an ID for the field in Azure or a unique ID for the request/batch. Can anyone confirm what this is and whether I can use it to diagnose what is going on?
The field name "content_1" suggests to me that this is one of a number of duplicate field names and so the indexing code appends the number to make them unique. I don't have a "content 1" or "content_1" field anywhere in my solution. I have tried excluding from indexing all fields called "content", but I still get the same problem. I really don't know where this field is coming from as all fields named content have been excluded. I have also queried all items where a "content" field is not null or empty and have tried excluding the templates of the found items, but that does not resolve the error either. I am making a patch for defaultCloudIndexConfiguration which the other indexes reference via <configuration ref="contentSearch/indexConfigurations/defaultCloudIndexConfiguration">.