manager-ui
manager-ui copied to clipboard
Media App: Handling Spaces in Search
Right now if a user searches "fried rice", we show no results, despite there being a file by that name. This is because the file is actually called "fried-rice".
Solution: Could we do a logic workaround where if a user puts a space we put a "-" in our query?
Basically make https://8-ecbcaf83fc-h333c8.manager.zesty.io/media/search?term=fried%20rice to https://8-ecbcaf83fc-h333c8.manager.zesty.io/media/search?term=fried-rice
Also please note that while we add the "-" to the query we do not want to add it to the search box itself.
We would not want to add characters to the term, as what if it's separated by an underscore, space, hyphen, period, etc. The solution to this request is "fuzzy" search.
A fuzzy search query searches for character sequences that are not only the same but similar to the query term https://www.ibm.com/docs/en/db2/11.5?topic=methods-fuzzy-search