Unallocated shards when restoring index from snapshot

I'm trying to create an index by restoring a custom S3 repo snapshot. (on an elastic cloud deployment) but it doesn't work, The restored index is created but on an unassigned shard.

How to either prevent or fix this ?

Is there any error? Anything in the logs? Are you restoring to the same version of Elasticsearch (or newer) as the cluster the snapshot was taken from?

Hello, I didn't noticed anything useful in the logs. I solved the issue by creating an index pattern identical to the source index settings before restoring.

My hypothesis is that the use of a custom stopwords file in the analysis settings was responsible.