php中的文章搜索引擎
我在我的网站上使用 sphinx 作为搜索引擎,它运行完美,我对此没有任何抱怨。它唯一不足的是,它不允许我搜索查询长度超过 15 个单词的文章。我知道实际上人们不会使用超过 3-4 个单词,我想用它来查找重复的内容。
我想知道狮身人面像是否有任何替代解决方案。我想处理重复的内容。
我的主要文章表位于 innodb 中,但我也将文章缓存到 MyISAM 表中以进行全文搜索,但当我搜索一篇文章时,执行一次搜索需要很长时间。这不是查询问题,我认为mysql缺乏全文搜索功能。
谢谢 贾森
I am using sphinx as a search engine on my website its working perfect and I have no complain with it. The only thing it lacks is, it does not allow me to search articles whose query length is more than 15 words. I know in reality people don't use more than 3-4 words i want to use it for finding duplicate contents.
I was wondering if there is any alternative solution to sphinx. I want to cope with duplicate contents.
My main articles table is in innodb but I am also caching articles into MyISAM table as well for full text searching but when I search an article it takes ages to perform one search. Its not the query problem, i think mysql lacks the fulltext searching facility.
Thanks
Jason
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Apache Solr 是一种替代方案。它基于 Apache 的 Lucene 项目...
您可能还想检查 Lucene 。
由于您使用的是 MySQL,请检查它的全文搜索 MySQL 全文搜索
Apache Solr is an alternative. It's based on Apache's Lucene project...
you might want to check Lucene as well.
And since you're using MySQL, check it's full-text searching MySQL Full Text Searching
还要检查 Zend_Search_Lucene: http://framework.zend.com/manual /en/zend.search.lucene.html
虽然它比 sphinx 慢。
Check Zend_Search_Lucene as well: http://framework.zend.com/manual/en/zend.search.lucene.html
Though it's slower than sphinx.
也许没有帮助,但是您可以简单地向 MySQL 字段添加一个唯一索引来防止插入重复项吗?
我在使用的 Sphinx 版本(0.9.9)中没有遇到任何查询长度限制,但也许我还没有足够努力。
Perhaps not helpful, but could you simply add a unique index to the MySQL field to prevent insertion of duplicates?
I have not come across any query length limitations in the Sphinx version I'm using (0.9.9), but maybe I have not tried hard enough.