How do you debug your Nest queries?

前端 未结 8 1914
失恋的感觉
失恋的感觉 2021-02-05 14:02

I\'m new to Nest, and I very likely am not creating my query like I think I am. My question is more along the lines of teach a man to fish rather than give me a fish. However,

8条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-05 14:23

    Using the latest elastic search 5+, I was able to get mine (thanks to Adrian Carr's method) with the following:

    var jsonOutput = System.Text.Encoding.UTF8.GetString(
        response.ApiCall.RequestBodyInBytes
    )
    

    Which gave me the following output:

    {
       "from":0,
       "size":0,
       "query":{
          "bool":{
          ...
          }
       }
    }
    

提交回复
热议问题