azure-search-.net-sdk

Implications of using AzureSearch SDK with static Dictionary of 30-40 ISearchIndexClients

痞子三分冷 提交于 2019-12-02 10:29:41
问题 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 marshaling a new instance of the ISearchServiceClient followed by the appropriate ISearchIndexClient for the specific index needed based on the client making the call. In an effort to increase performance I was thinking about marshaling up ALL of the ISearchIndexClients at application startup and placing them into a Dictionary

Implications of using AzureSearch SDK with static Dictionary of 30-40 ISearchIndexClients

Deadly 提交于 2019-12-02 04:35:28
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 marshaling a new instance of the ISearchServiceClient followed by the appropriate ISearchIndexClient for the specific index needed based on the client making the call. In an effort to increase performance I was thinking about marshaling up ALL of the ISearchIndexClients at application startup and placing them into a Dictionary object: public static Dictionary<String, SearchIndexClient> SearchIndexes; so that any specific index

How to decode metadata_storage_path produced by Azure Search indexer in .NET Core

不羁岁月 提交于 2019-12-01 06:44:19
Using .NetCore 1.1.2. After successfully getting results from a search via Azure Search SDK, I am trying to decode the metadata_storage_path value. I've seen people saying to use HttpServerUtility.UrlTokenDecode in .NET or an equivalent in other languages as seen here . Then the question becomes, what is the equivalent in .NetCore of HttpServerUtility.UrlTokenDecode? With: var pathEncoded = "aHR0cHM6Ly9mYWtlZC5ibG9iLmNvcmUud2luZG93cy5uZXQvcGRmYmxvYnMvYW5udWFsX3JlcG9ydF8yMDA5XzI0NTU20"; I have tried the following: var pathbytes = Convert.FromBase64String(pathEncoded); //Throws System

How to wait for Azure Search to finish indexing document? For integration testing purpose

ぐ巨炮叔叔 提交于 2019-11-30 23:48:36
Scenario I'm building a suite of automated integration tests. Each test push data into the Azure Search index before querying it and verifying the expected results. Problem The indexation happens asynchronously in the service and data aren't immediatly available after the indexing call returns successfully. The test execute of course too rapidly most of the time. What I've tried I've tried querying the document until it's found: // Wait for the indexed document to become available while (await _index.Documents.SearchAsync("DocumentId").Results.SingleOrDefault() == null) { } But oddly enough, a