Terms Lookup Query Usageedit

Fluent DSL exampleedit

q
.Terms(c => c
    .Name("named_query")
    .Boost(1.1)
    .Field(p => p.Description)
    .TermsLookup<Developer>(e => e
        .Path(p => p.LastName)
        .Id("12")
        .Routing("myroutingvalue")
    )
)

Object Initializer syntax exampleedit

new TermsQuery
{
    Name = "named_query",
    Boost = 1.1,
    Field = "description",
    TermsLookup = new FieldLookup
    {
        Id = "12",
        Index = Index<Developer>(),
        Path = Field<Developer>(p => p.LastName),
        Routing = "myroutingvalue"
    }
}

Example json output.

{
  "terms": {
    "_name": "named_query",
    "boost": 1.1,
    "description": {
      "id": "12",
      "index": "devs",
      "path": "lastName",
      "routing": "myroutingvalue"
    }
  }
}