0
중복 된 질문은 유감이지만 현재 Elastic Search 2.x 버전에서는 작동하지 않습니다. 기본적으로 NEST를 사용하여 ES에 질의를 보내고 Sense에서 POST 명령을 사용하는 것과 같은 일반 JSON으로 응답하고 싶습니다. 비슷한 문제는 여기에 존재합니다 Returning Raw Json in ElasticSearch NEST query탄성 검색 결과를 원시로 반환 JSON
사용하여 검색 결과 :
var searchResult = _elasticClient.LowLevel.Search<SearchResponse<SearchResult>>(querytEST);
결과가 원하는 :
{
"took": 406,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 14,
"max_score": 0,
"hits": []
},
"aggregations": {
"query": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 1,
"buckets": [
{
"key": "laura",
"doc_count": 14,
"top": {
"hits": {
"total": 14,
"max_score": 4.1078563,
"hits": [
{...