Hi Pedro, you can do it with NEST
var searchDescriptor = new SearchDescriptor<ElasticSearchProject>() .Query(q=>q.MatchAll()); var request = this._client.Serializer.Serialize(searchDescriptor); ConnectionStatus result = this._client.Raw.SearchPost(request); Assert.NotNull(result); Assert.True(result.Success); Assert.IsNotEmpty(result.Result);
This allows you to strictly enter your queries, but return the .Result string, which is the raw response from elasticsearch as a string to your
request can be an object or a string, so if you're ok with the internal json serializer, just go through the searchDescriptor directly
Martijn laarman
source share