I\'m new to Nest, and I very likely am not creating my query like I think I am. My question is more along the lines of teach a man to fish rather than give me a fish. However,
Really easily. If this is my code that searches:
var results = client.Search(s => s.AllIndices()
.Query(q =>
q.Term(p => p.LastName, searchItem.LastName)
&& q.Term(p => p.FirstName, searchItem.FirstName)
&& q.Term(p => p.ApplicationCode, searchItem.ApplicationCode)
)
.Size(1000)
);
var list = results.Documents.ToList();
I then set a breakpoint on the line above. Then, in Visual Studio Immediate Window, I enter this:
?results.ConnectionStatus
and it gives me this:
{StatusCode: 200,
Method: POST,
Url: http://localhost:9200/_all/searchitem/_search,
Request: {
"size": 1000,
"query": {
"bool": {
"must": [
{
"term": {
"lastName": {
"value": "carr"
}
}
},
{
"term": {
"firstName": {
"value": "adrian"
}
}
}
]
}
}
}
Hope this helps.