Flex matching many database records (similar to Quicksilver or Launchy)

Suppose I have a database table with many names. I would like to "match" with these names. I'm not sure a โ€œflexible matchโ€ is the right term to use, but let it go for now. There were similar discussions on the topic of "fuzzy matching," but I'm not interested in phonetic matching. What interests me is what I would call an ordered subset.

I would like it to work with QuickSilver (OSX) or Launchy (Windows). Here are some examples of matches for this search string:

mit โ‡’ M analytical system I of Technology
ffox โ‡’ f ire fox
osx โ‡’ Mac OS X
ms โ‡’ M icro s oft Corporation

My ultimate goal is to have a web page with automatic completion of the text field, data transmitted from the server.

I am sure that I will get adequate results on the client side by combining the jQuery LiveUpdate and / or jQuery QuickSelect functions .

Where I need help is how best to handle server side flexibility matching with a large table. I have some ideas on how to create my own custom index using the Quicksilver offset algorithm and maybe some sort of permutation index logic, but I would prefer not to reinvent the wheel if something else, if available.

In short:. What is the best way to quickly map to a multi-row database table?

+7
algorithm sql database mysql search
source share
2 answers

This does not answer my question directly, but for the project I'm working on, I realized that for this I do not yet need a server-side component. To facilitate the client side of my web application, I just launched two new open source projects:

  • LiquidMetal : This is a scoring algorithm similar to Quicksilver that clogs strings against abbreviations. Useful when creating an index.
  • Flexselect : A jQuery plugin that turns selected blocks into incremental search controls with flexible matching. Think of it like Quicksilver, compressed into a selection box. It uses LiquidMetal to filter and sort results in real time.
+4
source share

One method is simply to perform LIKE matches. Put% between each character, and then before and after the line, and do a search based on this. Obviously, this will lead to other things for ms , such as m ultimedia s ystems', but you could probably match this to another table containing the โ€œsuggestedโ€ matches and sort them as well.

+1
source share

All Articles