Search code examples
asp.net-mvcazure-cognitive-searchazure-search-.net-sdk

Do we have to define url anywhere while querying from AZURE SEARCH index


Is AZURE search using c# is based only on ServiceName, IndexName and APIKEY.

Why aren't we using the URL?

I have looked into many document regarding the everything lead by APIKEY only. Then what is the use of URL?

Because while querying from Post master we are using URL and Service version also but not while querying form C#.


Solution

  • Knowing the search service name is the same as having the API URL. From the documentation, once you have the search service name, you can construct the URL like this:

    GET https://[search service name].search.windows.net/indexes?api-version=2019-05-06