Здравствуйте, настраиваю глобальный поиск, хочу удалить индексы:
http://айпи:81/sites/sales/search
Пробовал вот так:
curl -XDELETE http://айпи:81/sites/sales/search-*/
Но потом при curl -v -X POST -d '{"templateName": "default.json"}' -H "Content-Type: application/json" http://айпи:81/sites/sales/search
Как правильно удалить ранее созданные индексы?
Выдает ошибку:
{"code":500,"status":"error","message":"System.Exception: Could not check index 'uoospgg4cm6abfpjuotlbfcrco0pq5esrxuexjqw6vndxtx4gvnpjtljeneotytt' exists. ---> System.Exception: Invalid NEST response built from a unsuccessful low level call on HEAD: /uoospgg4cm6abfpjuotlbfcrco0pq5esrxuexjqw6vndxtx4gvnpjtljeneotytt\n# Audit trail of this API call:\n - [1] BadRequest: Node: http://elasticsearch-public-ip:9200/ Took: 00:00:10.0127688\n# OriginalException: System.Net.Http.HttpRequestException: Resource temporarily unavailable ---> System.Net.Sockets.SocketException: Resource temporarily unavailable\n   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)\n   --- End of inner exception stack trace ---\n   at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)\n   at System.Threading.Tasks.ValueTask`1.get_Result()\n   at System.Net.Http.HttpConnectionPool.CreateConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n   at System.Threading.Tasks.ValueTask`1.get_Result()\n   at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync(ValueTask`1 creationTask)\n   at System.Threading.Tasks.ValueTask`1.get_Result()\n   at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)\n   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\n   at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)\n   at Elasticsearch.Net.HttpConnection.Request[TReturn](RequestData requestData) in C:\\Users\\russc\\source\\git\\elasticsearch-net-5.x\\src\\Elasticsearch.Net\\Connection\\HttpConnection-CoreFx.cs:line 78\n# Request:\r\n<Request stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>\n# Response:\r\n<Response stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>\n\n   --- End of inner exception stack trace ---\n   at GlobalSearch.WebApp.Services.SearchManagement.SearchService.CheckIndexExist(String indexName) in /src/Src/GlobalSearch.WebApp/Services/SearchManagement/SearchService.cs:line 95\n   at GlobalSearch.WebApp.ServiceModel.Requests.Handlers.SearchManagement.DeleteSearchRequestHandler.DeleteSearchBySite(Site site) in /src/Src/GlobalSearch.WebApp/ServiceModel/Requests.Handlers/SearchManagement/DeleteSearchRequestHandler.cs:line 44\n   at GlobalSearch.WebApp.ServiceModel.Requests.Handlers.SearchManagement.DeleteSearchRequestHandler.InternalHandle(DeleteSearchRequest request) in /src/Src/GlobalSearch.WebApp/ServiceModel/Requests.Handlers/SearchManagement/DeleteSearchRequestHandler.cs:line 70\n   at GlobalSearch.WebApp.ServiceModel.Requests.Handlers.BaseRequestHandler`1.Handle(TRequest request) in /src/Src/GlobalSearch.WebApp/ServiceModel/Requests.Handlers/BaseRequestHandler.cs:line 38"}

Нравится

1 комментарий

Евгений, добрый день! 

Вам следует обратить внимание на причину, по которой в запросе не удаётся определить существование индекса, а именно на запись:
 

Invalid NEST response built from a unsuccessful low level call on HEAD

Попробуйте поискать информацию по данному фрагменту.

Показать все комментарии