redis / redis-om-node

Object mapping, and more, for Redis and Node.js. Written in TypeScript.
MIT License
1.18k stars 80 forks source link

Feature: fuzzy search #196

Closed Neeraj-Ghodla closed 11 months ago

Neeraj-Ghodla commented 1 year ago

Can we add fuzzy search support in Full-Text search?

We could modify the match function to something like

albumRepository
  .search()
  .where('title')
  .match('buterfly', { fuzzy: true, levenshteinDistance: 1 })

NB: Typo on buterly is delibrate

guyroyse commented 1 year ago

This is a good idea. I'll mark it as an enhancement.

Neeraj-Ghodla commented 1 year ago

@guyroyse I've created a PR to add support for fuzzy matching.

fabiel-leon commented 11 months ago

how can i fuzzy search in all fields ? a query like this FT.SEARCH index "%word%"

guyroyse commented 11 months ago

If you want to do more advanced searches you can always use the . searchRaw method. A simple example is in the README.