Match Phrase Usageedit

Fluent DSL exampleedit

q
.MatchPhrase(c => c
    .Field(p => p.Description)
    .Analyzer("standard")
    .Boost(1.1)
    .Query("hello world")
    .Slop(2)
    .Name("named_query")
)

Object Initializer syntax exampleedit

new MatchPhraseQuery
{
    Field = Field<Project>(p => p.Description),
    Analyzer = "standard",
    Boost = 1.1,
    Name = "named_query",
    Query = "hello world",
    Slop = 2,
}

Example json output.

{
  "match_phrase": {
    "description": {
      "_name": "named_query",
      "boost": 1.1,
      "query": "hello world",
      "analyzer": "standard",
      "slop": 2
    }
  }
}