Django:干草堆或ORM [英] Django: Haystack or ORM

查看:253
本文介绍了Django:干草堆或ORM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于一个项目,我实施了Haystack,但是现在我想知道使用干草堆超过ORM的优缺点。对于我的项目,我需要通过他们的标题和isbn找到书。我想Haystack更有用,如果你要做全文搜索,或者我错过了什么?

For a project I implemented Haystack but now I was wondering what the pros and cons are of using Haystack over the ORM. For my project I need to find books by their title and isbn. I guess Haystack is more useful if you have to do full text searches or am I missing something?

推荐答案

干草堆肯定更好全文搜索,还提供了一些您不会使用ORM的其他好处。以下是Haystack网站上的一些:

Haystack is certainly better for full text search, and also provides a bunch of other benefits that you won't get using the ORM. Here are some from the Haystack site:


  1. 拼写建议

  2. Faceting

  3. 更多类似

  4. 突出显示

  5. 搜索字词提升

  1. Spelling suggestions
  2. Faceting
  3. More like this
  4. Highlighting
  5. Search term boosting

除此之外,如果您希望大量的搜索,您应该使用Haystack的ORM,因为您将从DB中卸载所有这些工作(应该专注于编写和检索数据)。

Besides that, you should use Haystack over the ORM if you expect a high volume of searches, since you'll offload all that work from the DB (which should be focused on writing and retrieving your data).

http://haystacksearch.org/

这篇关于Django:干草堆或ORM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆