确实做程序的时候 也没多想 偷懒啦
文本查询 就一行接一行 做 indexOf 查询 比较慢。
不要自己开发全文检索啦(嘿嘿 不会)
网上找了android全文检索的资料
主要是SQLite和android 支持
http://www.v2ex.com/2008/11/22/full-text-search/
http://bakhtiyor.com/2009/08/sqlite-full-text-search/
SQLite contains full-text search module called FTS3, using this module you can easily add fast full text search to an Android application.
First you need to create virtual table:
Your table must contains at least 1 TEXT field.
The FTS3 virtual table acts like a regular table, but you need to manually maintain the indexes to keep referential integrity — you should UPDATE the FTS3 table from time to time.
The full-text query in SQLite looks like this:
回头修改 哈哈
PS 某牛 发表的回复 中文支持不是太好
FTS3 needs to be hacked to support splitting chinese texts.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/86970/viewspace-622856/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/86970/viewspace-622856/