I need to get the current active index name for Sitecore search for logging purposes. Because of the swap on rebuild functionality, I can't simply use the name field of the index, since on alternating rebuilds the name will change from the default to something like
sitecore-master-index-1234. Searching Sitecore SE, it seems like there is no simple of way doing this. I went so far as to look at the disassembled code of
Sitecore.ContentSearch.Azure, and it seems the field storing this name is marked internal so no one can access it outside of Sitecore.
Is there really no way to get this index name easily?