You are looking at documentation for an older release.
Not what you want? See the
current release documentation.
Fuzzy Numeric Query Usageedit
Fluent DSL Exampleedit
q
.FuzzyNumeric(c => c
.Name("named_query")
.Boost(1.1)
.Field(p => p.Description)
.Fuzziness(2)
.Value(12)
.MaxExpansions(100)
.PrefixLength(3)
.Rewrite(RewriteMultiTerm.ConstantScore)
.Transpositions()
)Object Initializer Syntax Exampleedit
new FuzzyNumericQuery
{
Name = "named_query",
Boost = 1.1,
Field = "description",
Fuzziness = 2,
Value = 12,
MaxExpansions = 100,
PrefixLength = 3,
Rewrite = RewriteMultiTerm.ConstantScore,
Transpositions = true
}Example json output.
{
"fuzzy": {
"description": {
"_name": "named_query",
"boost": 1.1,
"fuzziness": 2.0,
"max_expansions": 100,
"prefix_length": 3,
"rewrite": "constant_score",
"transpositions": true,
"value": 12.0
}
}
}