You could call the Azure Search Rest API directly to query the index-catalog
Example request:
GET xxx.search.windows.net/indexes/index-catalog/docs?search=*&$filter=sitecorename eq 'sitecore_web_index'
GET xxx.search.windows.net/indexes/index-catalog/docs?search=*&$filter=sitecorename eq 'sitecore_web_index'
Result:
{ "value": [ { "@search.score": 1, "key": "SITECORE_WEB_INDEX-SEARCH", "sitecorename": "sitecore_web_index", "indextype": "SEARCH", "servicename": "sitecore-web-index-815" }, { "@search.score": 1, "key": "SITECORE_WEB_INDEX-REBUILD", "sitecorename": "sitecore_web_index", "indextype": "REBUILD", "servicename": "sitecore-web-index" } ] }
{
"value": [
{
"@search.score": 1,
"key": "SITECORE_WEB_INDEX-SEARCH",
"sitecorename": "sitecore_web_index",
"indextype": "SEARCH",
"servicename": "sitecore-web-index-815"
},
{
"@search.score": 1,
"key": "SITECORE_WEB_INDEX-REBUILD",
"sitecorename": "sitecore_web_index",
"indextype": "REBUILD",
"servicename": "sitecore-web-index"
}
]
}
The result with indextype
of SEARCH
will give the current active index definition, you can then use the servicename
for the index name.