Skip to main content
added 10 characters in body
Source Link
Richard Seal
  • 20.8k
  • 5
  • 44
  • 79

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.

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'

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" } ] }

The result with indextype of SEARCH will give the current active index definition, you can then use the servicename for the index name.

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'

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"
        }
    ]
}

The result with indextype of SEARCH will give the current active index definition, you can then use the servicename for the index name.

Source Link
Mark Gibbons
  • 5.7k
  • 1
  • 19
  • 61

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'

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" } ] }

The result with indextype of SEARCH will give the current active index definition, you can then use the servicename for the index name.