全文搜索和 Python
有人可以帮我推荐一个支持 Python 的全文搜索引擎吗?
Can someone help me out with some suggestion for a full-text searching engine that supports Python?
现在我们有一个 MySQL 数据库,我想添加一个功能,让全文搜索引擎索引该数据库中某些表中的某些文本.Web 应用程序将使用此文本数据来搜索数据库中的相应记录.例如,在我们的客户表中索引客户名称信息,使用 Web 应用程序进行全文搜索以获取客户的 MySQL 记录.
Right now we have a MySQL database in place and I'd like to add the ability to have a full-text search engine index some of the text in some of the tables in this database. This text data would be used by a web application to search for the corresponding records in the database. For instance, index the customer name information in our customer table, full text search that with the web application to get the MySQL record for the customer.
我(简要地)看过 Lucene、Swish-E 和 MongoDB 以及其他几个,但考虑到以下几点,我不确定哪个对我来说是个好选择:
I've looked (briefly) at Lucene, Swish-E and MongoDB, and few others, but I'm not sure what would be a good choice for me considering a couple of things:
- 我不是 Java 人(尽管我已经编程了很长时间),
- 我们只想搜索相对较小的数据集,
- 我们正在寻找 MySQL 数据库中的文本索引,
- 并希望该索引能够半实时更新.
任何提示、提示或指示将不胜感激!
Any hints, tips or pointers would be greatly appreciated!
推荐答案
看看Whoosh.我听说它不能很好地扩展(也许现在已经解决了),但对于小型收藏,它可能很有用.
Have a look at Whoosh. I've heard it doesn't scale up terribly well (maybe that's fixed now) but for small collections, it might be useful.
对于可扩展的解决方案,请考虑将 Lucene 与 PyLucene 或 Jython 一起使用.
For a scalable solution, consider using Lucene with PyLucene or Jython.
相关文章