Lost index on Redis OOM crash

My Redis instance crash due to the server being OOM. First, Redis rejected new entries and then it simply crashed. Nothing major was lost, but almost the entire index vanished.
I don’t blame anyone but myself, I’m just wondering if this is to be expected?
The schema was still there and it took a few minutes to reindex by dropping every schema and adding them back (is there a better way to do that by the way?).

This video from RedisConf talks about how to most effectively configure Redis for a few high-usage scenarios. The very first scenario discussed is on setting maxmemory.