I'm using NEST v2.0 and trying to build a query such that when I search for a term that is in the index it will return that exact matches first along with possible fuzzy terms that are like the query but if I search for a term that's not in the index it will return fuzzy like terms or none if the initial query is way off.
I read online that I should merge both my fuzzy and exact query using bool and should and use boost to give exact matches a higher priority if found so that it returns first on the page.The problem is when I search for a number it sometimes shows terms that are not even close or fuzzy terms before exact matches and when I search for fuzzy names(with one letter difference) no matches are found. How may I modify the query below to get desired results
x => x.
Query(q => q
.Bool(b => b
.Should(s => s
.Fuzzy(c => c
.Name("named_query")
.Boost(1.1)
.Field("_all")
.Fuzziness(Fuzziness.Auto)
.Value(query)
.MaxExpansions(100)
.PrefixLength(3)
)).Should(l => l
.QueryString(y => y
.DefaultField("_all")
.Query(query)
.Boost(10.0)
) )))