我需要使用如下命令进行sql搜索:在phonegap上使用soundex或metaphone进行android搜索。
但soundex和metaphone都不起作用。
示例:SELECT * FROM customers WHERE soundex(surname) = soundex('Mayer');
这给我带来了一个信息,即soundex是未知的。
有人知道如何使用soundex或像soundex和phonegap (android)这样的东西吗?
发布于 2015-09-25 10:43:53
可以在您的电话间隙代码中创建soundex/metaphone索引。在Javascript中,你可以使用clj-fuzzy library。
customers表中。因此,插入内容可能如下所示:
insert into customers (surname, surname_metaphone) values ('Smith', 'SM0')
和select类似于:
select * from customers where surname_metaphone = 'SM0'
https://stackoverflow.com/questions/14606974
复制相似问题