I am using Nest 6.2 with ES 6.6
I have the following code which runs fine:
var response = elasticClient.Search<PropertyRecord>(s => s
.Query(q => q.Terms(
c => c
.Field(f => f.property_id_orig)
.Terms(listOfPropertyIds) // a list of 20 ids say...
))
.From(0)
.Take(100) // just pull up to a 100...
);
if (!response.IsValid)
throw new Exception(response.ServerError.Error.Reason);
return response.Documents;
But I know there is an issue with the underlying query, because all documents from the index are returned. So I would like to be able to see the raw Json that is generated by the lambda expression so I can see the result running in the Head plugin or Fiddler etc.
If I use a SearchRequest Object and pass that to the Search method, would I then be able to see the Query Json?
var request = new SearchRequest
{
// and build equivalent query here
};
I am having trouble building the corresponding query using the SearchRequest approach and cannot find decent examples showing how to do so.
Anyone know?