Elasticsearch学习笔记之—ElasticJsonClient

public async Task ElasticSearchCompany([FromServices] IESSever eSSever)
        {
            var jsonobject = new { query = new { match = new { Content= "测试" } } };
            string json = JsonConvert.SerializeObject(jsonobject);
            var stringResponse = await eSSever.ElasticJsonClient.SearchAsync("companys", "Companys", json);
            return JObject.Parse(stringResponse.Body);
        }

 

posted @ 2021-02-01 18:45  星星c#  阅读(192)  评论(0编辑  收藏  举报