I have an ASP.NET Web Application that uses 30-40 different search indexes across 5-6 search services (various clients are in different pricing tiers).
Currently I am ma
This strategy will probably not scale to the number of indexes you want. The most likely outcome is that you will exhaust the pool of available TCP connections. A better approach would be to implement a cache of SearchIndexClient
instances keyed by index name. On a cache miss, you could get exclusive access to the least-recently-used client and set the IndexName property on it. That settable property was added to SearchIndexClient
for exactly this scenario (note that it replaces the deprecated TargetDifferentIndex
method).
You can find more discussions and background information about the implications of sharing SearchIndexClients
on GitHub, the MSDN forums, and this related StackOverflow question.