search - String Ranking Algorithm in mySQL like Quicksilver -



search - String Ranking Algorithm in mySQL like Quicksilver -

string ranking algorithm in mysql

quicksilver scoring algorithms

php port javascript port mysql port (oh no link) that's issue maintain reading

example usage:

score("hello world","axl") //=> 0.0 score("hello world","ow") //=> 0.6 score("hello world","hello world") //=> 1.0

ok question lies here. awesome these are, , give thanks create possible! love mysql way of doing this. database aren't area of expertise if wanted in mysql, how it? , should i, there improve way?.

my thinking on such.

real life example:

i have 14000+ records in database. table of "icd9" medical codes has medical code , description.

table: icd9_codes

fields: code code_text

i'm doing jquery ajax phone call php function.

$query = $this->db->query("select code, code_text codes match (code,code_text) against ('" .$q. "')");

this works , that's fine. true hearts want utilize scoring algorithm!

now correct me if i'm wrong , shocked if :)

i think expensive process search 14000+ records. (even min-value of 2 characters) using jquery autocomplete. (and might not sit down because said "database aren't area of expertise")

so here love know. worth someones time knew mysql , create mysql function score equivlent of

select code, code_text, score("hello world","ow") icd9_codes

if have pros or cons thought love hear? or know of improve way :)

pros:

a native way mysql have search algorithm

cons:

if don't have command of database can't add together mysql function score() (which leave me before in php or javascript)

at time slip in there (stackoverflow awesome!!! amazing community!) thanks, dustin

select code, code_text, match(code,code_text) against('inputstring') score icd9_codes

it's taken mysql 5.0 reference full-text search functions section

mysql search autocomplete fuzzy-search

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -