2

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.

2
  • Did you run Bootstrap after your changes in json file? May 27, 2020 at 11:27
  • 1
    @AndreiPaliakou I didn't - I thought clean + initialize environment would essentially do the same thing. it seems like bootstrapping did the job. What a simple solution. Thanks. if you write it as an answer I will accept it
    – lcaaroe
    May 27, 2020 at 11:55

1 Answer 1

0

Looks like you didn't run Bootstrap after your changes in json configuration file.

If you make any changes to an environment JSON file, you must bootstrap the Commerce Engine to propagate the changes to the Global database.

https://doc.sitecore.com/developers/92/sitecore-experience-commerce/en/bootstrap-the-commerce-engine.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.