World is now on Opti ID! Learn more
AI OnAI Off
World is now on Opti ID! Learn more
Hi,
I had the issue like this when trying to use fuzzy search with Filter. I did workaround for it by using search query instead of Filter.
You can found my workaround here: https://world.optimizely.com/blogs/binh-nguyen/dates/2024/5/optimizely-search-and-navigation--part-1--search-tips/
Hey
Match Fuzzy is a term‑level query.
It is executed against the raw (not analyzed) value of the Title
field. Your filter, therefore, tries to find one term that is almost equal to the whole string "tesla 3 2017"
. No document contains that exact term, so the query returns 0 hits. -- problem with MatchFuzzy
Alternative: use a free‑text search instead of a filter
var result = await findClient
.Search<CarObj>()
.For(search + "~") // the trailing tilde enables fuzzy for every term
.InField(x => x.Title)
.WithAndAsDefaultOperator() // every word must exist
.Take(amount)
.GetResultAsync();
Hello, im trying use the fuzzy search functionality to match results based on a user entered query
My data example is car objects with a title like: "tesla model 3 5yj3 2017 ev 261hk" or "citroën berlingo er ec 2018 1.5 bluehdi 100 102hk".
Given a search query like "tesla 3 2017" id like to return the 5 cars with the titles, that is the most similar to to the query. However im having trouble configuring the fuzzy search in the find client to return any results in this case. If the search query is fairly close to the full title is works fine, however id like to use the results as suggestions to the user in a search bar.
The search query looks like:
Where 0.8 in the minSimilarity. Ive tried adjusting the minSimilarity to both extremes however this yeilded no usable result. Am i missing something?
In the end the plan is to token match the search string before to reduce the search space using fuzzy search, however this requires that i have fuzzy search working :)