My question is simple. I can write a very awesome queries in postman ;
POST : localhost:9200/logstash-2017.08.28/_search?pretty=true
{
"query":{
"match":{
"level":"Error"
}
}
}
But I have to this thing inside of C# code by using nest framework.But i can not do that can you help me?
var response = EsClient().Search<DocumentAttributes>(s => s
.Index("logstash-2017.09.18")
.Type("json")
.Query(q => q
.Term(p => p.level, "Error")));
//.Query(q => q.Raw(@"level:Error")));
// .Type("type").Query(q => q.Raw(@"{""match_all"":{}}")));
How can i write down by writing query or by using fields?