How would one go about doing a fuzzy name search in Oracle?
For example:
Our data system has the preferred mailing as:
Mr. Nicolas Jim Raleigh
But in Facebook, or other search field, the name passed to the algorithm is:
Nick Jim Raleigh
The process would run the search name against all of the preferred names, then return the result that contains the most matching characters:
Mr. [Nic]olas Jim Raleigh
[Nic]k Jim Raleigh
16 out of my searched name's 17 characters appear in the preferred name, and we could return a ranked suggestion.
[EDITED TO ADD]
After initial suggestion, and reading of Oracle's Text Query options I have created an index on the table
create index ADD_EX_INDX3 on address_extract(pref_mail_name)
indextype is ctxsys.context
parameters ('DATASTORE CTXSYS.DEFAULT_DATASTORE');
and now am able sucessfully retireve
select score(1), ae.pref_mail_name
from address_extract ae
where contains(pref_mail_name,'fuzzy(raleigh,,,weight)',1) > 0
order by score(1) desck
Which returns
100 Mr. Raleigh H. Jameson
100 Mr. Nicolas Jim Raleigh
100 Ms. Susanne M. Raleigh
66 Mrs. LaReign Smith
66 Ms. Rahil Smith
62 Mr. Smith Ragalie
I am struggling to to a full name search however. How would I go about doing the full name?