donmqryh49993 2012-09-18 15:45
浏览 39
已采纳

PHP中的Mysql表索引

I have a MYsql database containing names of books, authors and other details.

Which indexing engine can search them?

I wanted to use Sphider.

Will it work for MySQL databases?

  • 写回答

2条回答 默认 最新

  • duanhuanyou6478 2012-09-18 16:10
    关注

    Solution 1: Use MyISAM table engine for your tables that contain the records you want to search. Then you can create indexes on columns you want to search and then apply full text search functions. http://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html

    Note: When using MyISAM you will not have transactional capabilities, and tables might get corrupted (recovery is difficult). Also, as of MySQL 5.6.4 InnoDB has full text support (though it's a new feature so it might be buggy and benchmarks are still not ample).

    Solution 2: Use Sphinx search server. It is super fast and distributed search system. Sphinx will pull fields you want to index from your MySQL database and index them. Then you can either use Sphinx SQL to fetch the document IDs matching your query or use Sphinx API (provided for well known languages) to get document IDs matching. http://sphinxsearch.com/

    Sphinx is super fast when it comes to indexing and query serving. It's worth taking a look at. I would recommend it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 mmocr的训练错误,结果全为0
  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀