GET /_search { "_source": { "includes": [ "obj1.*", "obj2.*" ], "excludes": [ "*.description" ] }, "query" : { "term" : { "user" : "kimchy" } } }
在Elasticsearch.Net里的使用方法如下:
SearchRequest<object> request = new SearchRequest<object>("4d326769-d11e-46d5-8e3e-2160e17bafa0", ""); request.Query = totalQuery; request.From = 0; request.Size = 100; request.Source = new SourceFilter
{ Excludes = new Field("fname", null) }; var result = client.Search<object>(request); var documents = result.Documents;
最新评论