为我的 Django 应用程序选择搜索引擎时有哪些选择?
我正在 Django 中构建一个网站,需要在其中实现对大约 500 万条记录的搜索。
用户需要能够:
- 按条目标题和正文的全文搜索
- 按类别过滤
- 按投票排序
- 按价格排序。
是否有一个搜索引擎本身支持上述所有内容并且与 django 连接良好?在使用 Sphinx 之前我已经构建了一个类似的系统,但对其 Django 集成并不是很满意。任何人有其他建议或可以让我相信 Sphinx 足够好吗?
I am building a web site in Django where I would need to implement searching through about 5 million records.
Users need to be able to:
- Search by full text on title and body of entry
- Filter on category
- Sort by Votes
- Sort by price.
Is there a search engine which supports all the above inherently and connects well to django ? I've built a similar system before using Sphinx but was not really happy with it's Django integration. Anyone has other suggestion or can convince me that Sphinx is good enough ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需使用 django-haystack 并选择您的后端。
Just use django-haystack and select your backend.
你真的需要搜索引擎吗? MySQL 有相当不错的全文搜索支持,一些其他数据库可能也是如此。
您列出的其余功能都在任何 RDBMS 的标准职责范围内。如果有适当的索引,即使对于 500 万个对象也应该没问题。
Do you really need search engine? MySQL has pretty decent full-text search support, some other databases probably do too.
The rest of the features you listed are within standard duties of any RDBMS. With proper indexes, it should be fine even for 5 million objects.