Hey all,
I really like the idea of side-by-side index deployment, especially for production. I was thinking, why shouldn't I just replace this:
IndexCreation.CreateIndexes(...);
with:
if (production) {
IndexCreation.SideBySideCreateIndexes(...);
} else { ... }
However, trying that locally, I noticed it appears to do side-by-side replacement (and re-indexing) even if the index definition is the same. I believe this is by design, but should it be? Wouldn't it be advisable to use side-by-side deployment to production in many cases? I use CI and CD for production deployment, so it would definitely make it a smooth deployment scenario if users didn't have to wait for re-indexing when I update my indexes.
Would there be a consideration to add an option (or by default) check to see if the index definitions are actually different and only then perform the replacement? Could I write this logic myself? This all happens in App_Start once anyway.