Regexp Query Usage

edit

Fluent DSL example

edit
q
.Regexp(c => c
    .Name("named_query")
    .Boost(1.1)
    .Field(p => p.Description)
    .Value("s.*y")
    .Flags("INTERSECTION|COMPLEMENT|EMPTY")
    .MaximumDeterminizedStates(20000)
)

Object Initializer syntax example

edit
new RegexpQuery
{
    Name = "named_query",
    Boost = 1.1,
    Field = "description",
    Value = "s.*y",
    Flags = "INTERSECTION|COMPLEMENT|EMPTY",
    MaximumDeterminizedStates = 20000
}

Example json output.

{
  "regexp": {
    "description": {
      "_name": "named_query",
      "boost": 1.1,
      "flags": "INTERSECTION|COMPLEMENT|EMPTY",
      "max_determinized_states": 20000,
      "value": "s.*y"
    }
  }
}