Raw Query Usage

edit

Allows a query represented as a string of JSON to be passed to NEST’s Fluent API or Object Initializer syntax. This can be useful when porting over a query expressed in the query DSL over to NEST.

Fluent DSL example

edit
q
.Raw(RawTermQuery)

Object Initializer syntax example

edit
new RawQuery(RawTermQuery)

Example json output.

{
  "term": {
    "fieldname": "value"
  }
}