A newer version is available. For the latest information, see the
current release documentation.
Regexp Query Usage
editRegexp Query Usage
editFluent DSL example
editq .Regexp(c => c .Name("named_query") .Boost(1.1) .Field(p => p.Description) .Value("s.*y") .Flags("INTERSECTION|COMPLEMENT|EMPTY") .MaximumDeterminizedStates(20000) .Rewrite(MultiTermQueryRewrite.TopTerms(10)) )
Object Initializer syntax example
editnew RegexpQuery { Name = "named_query", Boost = 1.1, Field = "description", Value = "s.*y", Flags = "INTERSECTION|COMPLEMENT|EMPTY", MaximumDeterminizedStates = 20000, Rewrite = MultiTermQueryRewrite.TopTerms(10) }
Example json output.
{ "regexp": { "description": { "_name": "named_query", "boost": 1.1, "flags": "INTERSECTION|COMPLEMENT|EMPTY", "max_determinized_states": 20000, "value": "s.*y", "rewrite": "top_terms_10" } } }