title: Azure Search: Cache ServiceClient without depending on index name in v11
body: <p>I currently use v10 of the Azure Search APIs and create a static variable like so:</p>
  <pre><code>private static SearchServiceClient SearchServiceClient = new SearchServiceClient(searchServiceName, credentials);
  </code></pre>
  <p>On the server side, this variable is re-used between requests so I don't have to initialize it over and over. I got the idea from <a href="https://docs.microsoft.com/en-us/azure/azure-functions/manage-connections" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/azure/azure-functions/manage-connections</a> to improve performance.</p>
  <p>Now, v11 has completely different data types. The new <code>SearchClient</code> type's <a href="https://docs.microsoft.com/en-us/dotnet/api/azure.search.documents.searchclient.-ctor?view=azure-dotnet#Azure_Search_Documents_SearchClient__ctor_System_Uri_System_String_Azure_AzureKeyCredential_" rel="nofollow noreferrer">constructor</a> expects an index name as a parameter. I have many indexes and I'd like to avoid creating a static variable for each index,</p>
  <p>In v11, is it possible to re-use a search client in the way I used to be able to do?</p>