You are looking at preliminary documentation for a future release.
Not what you want? See the
current release documentation.
Query Usageedit
The query element within the search request body allows to define a query using the Query DSL.
Fluent DSL Exampleedit
s => s
.Query(q => q
.Term(p => p.Name, "elasticsearch")
)Object Initializer Syntax Exampleedit
new SearchRequest<Project>
{
Query = new TermQuery
{
Field = "name",
Value = "elasticsearch"
}
}Example json output.
{
"query": {
"term": {
"name": {
"value": "elasticsearch"
}
}
}
}