【发布时间】:2017-08-24 16:05:29
【问题描述】:
我正在使用 NEST 查询 Elastic 5.4 实例并收到以下错误。我有所有的 DebugInformation() 并且在 Kibana 的 DevTools 中运行查询时一切都很好,我得到了结果。我不认为这是一个超时问题,因为请求似乎已经完成并给出了响应,但希望能再次关注这一点。这是我的 Serilog 输出。这是使用 ASP.NET Core 运行原始查询。提前感谢您的帮助。
2017-08-24 10:48:58.723 -05:00 [Debug] ElasticController:Index
2017-08-24 10:48:58.921 -05:00 [Debug] ElasticService.QueryInstanceTail: elasticQuery { "bool": { "filter": [ { "term": { "instance_num": "99999999" }}, { "range": { "@timestamp": { "gte": "2017-08-22T15:48:00Z", "lte": "2017-08-22T16:48:00Z" } } } ] } }
2017-08-24 10:48:58.922 -05:00 [Debug] ElasticService.QueryInstanceTail: searchResponse 0 : Invalid NEST response built from a unsuccessful low level call on POST: /filebeat-%2A/_search
# Audit trail of this API call:
- [1] BadResponse: Node: http://devserver.local:5601/ Took: 00:00:00.1976977
# ServerError: ServerError: -1Type: Reason: "Not Found"
# Request:
{"from":0,"size":60,"query":{ "bool": { "filter": [ { "term": { "instance_num": "99999999" }}, { "range": { "@timestamp": { "gte": "2017-08-22T15:48:00Z", "lte": "2017-08-22T16:48:00Z" } } } ] } }
# Response:
{"statusCode":404,"error":"Not Found"}
【问题讨论】:
-
您是否向正确的端口 (9200) 发出请求?这绝对不是您的查询的问题。
-
发布后我意识到我有 Kibana 的端口,而不是弹性的 9200。 #facepalm。感谢您的回复
标签: elasticsearch kibana nest