0

I need to implement fuzzy search in our web application. At first we had hardcoded options on our frontend, but now we have to work with database data (only return top 10 candidates). I just want to ask about the best approach how the data flow should be for some input field. My thoughts are:

  1. User types any character in a search field
  2. Frontend issues POST request to the Backend
  3. Backend asks database to start some fuzzy search procedure
  4. Backend returns List of 10 best results back to the frontend
  5. Frontend displays them

My two biggest concerns are:

  1. Can I make this happen on a large scale of data (for example 100 000) under 1 second?
  2. What algorithm for fuzzy searching this big amount of data for relative short period of time is the best? (I am searching tool names that can consist of 2 and more words for example My Example Tool) - I have checked already some like ULT_MATCH and SOUNDEX but I don't know if it is the right choice
  3. Is it okay to issue request every time user types a character? Doesn't this amount of HTTP requests halts our application?
adammartiska
  • 35
  • 1
  • 4
  • 1
    1. you should decide on an algorithm for what fuzzy means. This will lead you down an implementation path. 2. do not send back a post for every character entered - at least have a debounce time like send things back no more frequently than 1 or 2 seconds. – Randy Jul 01 '21 at 13:09

1 Answers1

2

Oracle does have a powerful feature for text searches, it is called Oracle Text. It allows for searching within large chunks of text or documents. It allows for stopwords, synonyms, fuzzy search, etc.

  • Subsecond searches should be no problem
  • Check Fuzzy Matching and stemming or google "Oracle text fuzzy search"
  • What do you think yourself ? Firing off a request against > 100000 rows every time each user types a single character ? You can probably scale your backend for that but it does not make sense... check @Randy's comment too.
Koen Lostrie
  • 14,938
  • 2
  • 13
  • 19