-
1. Re: Find Similar String
JR "Bob" Dobbs Nov 8, 2011 9:55 AM (in response to Phinehas1234)The technique you are asking about is usually called "fuzzy search" or "fuzzy lookup". There are two ways you might approach this problem.
1. Use the Solr search engine bundled with CF (which supports fuzzy search) and the CFSEARCH tag. Note that you should not use the Verity search engine, since feature will be removed in the next version of CF.
2. If you are querying a database you might use the fuzzy search capabilities, if any, supported by your database product.
Questions:
1. What kinds data source(s) are you trying to search: a database, flat file, LDAP, other?
2. If querying a database, what product and version are you using?
3. What version of ColdFusion are you using (version number and edition)?
References:
"Solr search examples"
http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WS82937B1B-240F-4850-B376-5FD9F911E5 E5.html
"CFSEARCH"
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7d 02.html
"ColdFusion X Writeup" (discusses removal of Verity from future CF releases)
http://www.coldfusionjedi.com/index.cfm/2011/3/3/ColdFusion-X-Writeup
-
2. Re: Find Similar String
Phinehas1234 Nov 8, 2011 5:48 PM (in response to JR "Bob" Dobbs)Data is in SQL Server 2005 database.
And ColdFusion version is 8.0
Since I have a list more than 100 company name, I want to find some efficient method to search the similar string.
-
3. Re: Find Similar String
JR "Bob" Dobbs Nov 9, 2011 8:40 AM (in response to Phinehas1234)You may might be able to use the full-text search features of MS SQL 2005 in your SQL queries. ColdFusion 8 includes the Verity search engine. You might investigate this feature.
References:
SQL Server
"Full-Text Search Queries" (MSDN)
http://msdn.microsoft.com/en-us/library/ms142583%28v=SQL.90%29.aspx
"Searching for Words or Phrases Close to Another Word or Phrase (Proximity Term)" (MSDN)
http://msdn.microsoft.com/en-US/library/ms142568%28v=SQL.90%29.aspx
ColdFusion 8 / Verity
"Building a Search Interface"
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=indexSearch_01.html#1164 916
"Using Verity Search Expressions"
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=indexSearch02_1.html#116 0419

