I get thousands of the following error in the minions log:
00007 09:21:07 ERROR AzureContextCommand.MergeOrUploadDocuments.Error: Message=Index name must only contain lowercase letters, digits or dashes, cannot start or end with dashes and is limited to 128 characters.|Trace= at Microsoft.Azure.Search.DocumentsOperations.d__23.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Search.DocumentsOperationsExtensions.d__11.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Sitecore.Commerce.Plugin.Search.Azure.AzureContextCommand.d__11.MoveNext() Microsoft.Rest.Azure.CloudException: Index name must only contain lowercase letters, digits or dashes, cannot start or end with dashes and is limited to 128 characters. at Microsoft.Azure.Search.DocumentsOperations.d__23.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Search.DocumentsOperationsExtensions.d__11.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Sitecore.Commerce.Plugin.Search.Azure.AzureContextCommand.d__11.MoveNext()
We don't trigger any index update manually from any of our custom minions, so I assume this merge job is triggered automatically - perhaps on a schedule, or after persisting sellable items (several of our custom minions persist sellable items).
I assume the merge is attempted from block MergeOrUploadIndexDocumentsBlock - but as mentioned, this is not something we trigger manually.
We have previous had index names that were too long (over 128 characters). Those were specified in PlugIn.Search.PolicySet-1.0.0.json
I've since changed those long names to fit the requirements (fewer than 128 characters, only letters/numbers/dashes). Yet the error keeps coming. Could index names be specified anywhere else? Perhaps they saved to the db? I've searched all files in the published commerce engine for the old long name and it does not show up anymore. I have also restarted the commerce engine IIS sites many times since this problem started occurring, so I assume it's not a cache problem.
Using Sitecore Commerce 9.1 with Azure search.