zesty-io / manager-ui

Content platform powering enterprise websites and applications
https://www.zesty.io
Other
37 stars 5 forks source link

Media App: Handling Spaces in Search #1474

Open zcolah opened 1 year ago

zcolah commented 1 year ago

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.

shrunyan commented 1 year ago

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