Till ElasticSearch 6.0 we were able to serialize the search request (object of SearchRequest) to a string
using (System.IO.MemoryStream mStream = new System.IO.MemoryStream())
{
ElasticClient.Serializer.Serialize(searchRequest, mStream);
string rawQueryText = Encoding.ASCII.GetString(mStream.ToArray());
}
Example is here too serialize query from Nest client elastic search 2.3
But in 6.4 version that has been removed and I am not able to locate exactly where is the documentation to serialize the query with 6.4 version https://github.com/elastic/elasticsearch-net
Can some one help me here?