Esempio n. 1
0
        private static bool IndexCatalogBatch(List <Dictionary <string, object> > changes)
        {
            try
            {
                var batch = new
                {
                    value = changes
                };

                Uri    uri  = new Uri(_serviceUri, "/indexes/catalog/docs/index");
                string json = AzureSearchHelper.SerializeJson(batch);
                HttpResponseMessage response = AzureSearchHelper.SendRequest(_httpClient, HttpMethod.Post, uri, json);
                response.EnsureSuccessStatusCode();
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }