【发布时间】:2016-07-11 03:07:21
【问题描述】:
我正在尝试在 NEST API(或在使用 NEST 时通过底层 ElasticSearch.NET API)中找到可以看到由 NEST 查询创建的 JSON 的位置。这是我在部分代码示例中总结的问题 -
using NEST;
// create any query
var elasticResponse = elasticClient.Search<Hotel>(s => s
.Query(q => // ... build up the rest of my query ...
elasticResponse.ApiCall.HttpMethod // is "POST" - good!
elasticResponse.ApiCall.HttpStatusCode // is 200 (OKAY) - good!
elasticResponse.ApiCall.Success // is true - good!
// ISSUE:
// I've tried viewing the generated JSON through these members (in no particular order) without success ...
elasticResponse.ApiCall.RequestBodyInBytes // is always empty before and after use of the elasticResponse object.
elasticResponse.ApiCall.DebugInformation // doesn't provide useful info about body.
elasticResponse.CallDetails.RequestBodyInBytes // is always null.
我正在使用 Elastic Search 2.3.1 和 NEST 2.4.1。
我希望看到 POST 数据或生成的查询的地方没有它;它们要么为空要么为 null,并且由于查询成功,因此没有显示错误条件。
在构建查询时,我还查看了查询描述符的可用成员,并认为我可能能够在完成查询后立即捕获 RESTful 调用主体,但还没有发现任何有用的东西。
ConnectionSettings 出现 .OnRequestCompletedcallback 但这似乎也没有显示查询。
我浏览了官方的documentation,但无济于事。寻求帮助。谢谢你。
【问题讨论】:
-
密切相关的是这个涉及Glimpse的问题stackoverflow.com/questions/38105355/…
标签: elasticsearch nest