首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Soundex/Metaphone for phonegap on android

Soundex/Metaphone for phonegap on android
EN

Stack Overflow用户
提问于 2013-01-30 23:00:08
回答 1查看 388关注 0票数 3

我需要使用如下命令进行sql搜索:在phonegap上使用soundexmetaphone进行android搜索。

soundexmetaphone都不起作用。

示例:SELECT * FROM customers WHERE soundex(surname) = soundex('Mayer');

这给我带来了一个信息,即soundex是未知的。

有人知道如何使用soundex或像soundexphonegap (android)这样的东西吗?

EN

回答 1

Stack Overflow用户

发布于 2015-09-25 10:43:53

可以在您的电话间隙代码中创建soundex/metaphone索引。在Javascript中,你可以使用clj-fuzzy library

  1. 将soundex/变音位列添加到customers表中。
  2. 在插入/更新记录时,在Javascript中计算soundex/变音位索引,并同时插入/更新该值。
  3. 执行搜索时,您可以计算搜索标准的soundex/变音位索引,并根据soundex/变音位列检查其相等性。

因此,插入内容可能如下所示:

insert into customers (surname, surname_metaphone) values ('Smith', 'SM0')

和select类似于:

select * from customers where surname_metaphone = 'SM0'

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14606974

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档