主观可行的行为与Zend Lucene在symfony [英] Doctrine Searchable Behavior vs Zend Lucene in symfony

查看:132
本文介绍了主观可行的行为与Zend Lucene在symfony的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在2表中搜索关键词,简单的事情

I need to search for keywords in 2 table, simple thing

我对使用其中一个还是其他的不确定?
任何建议表现明智?

I am undecided about using one or the other? any suggestion performance wise?

谢谢!

推荐答案

正如cuhuak所说,Lucene是一个全文搜索。由于它是用Java编写的,所以你需要一个Java Server(例如Tomcat)。如果您不想要其他服务器,请 Zend Lucene实施(如Matt Gibson的评论所述)也可能值得研究。使用额外的服务器,如果您只拥有一个小主机,那么这个可能不太好。此外,Lucene需要比Doctrine解决方案更多的配置和设置。

As cuhuak mentioned, Lucene is a fulltext search. Since it is written in Java, you additionaly need a Java Server (Tomcat for example). If you don't want an additional server, the Zend Lucene implementation (as noted in the comments by Matt Gibson) may also be worth looking into. With an additional server and if you only have a small host, this MAY not be good performance wise. Also, Lucene needs much more configuration and set-up than the Doctrine solutions.

在性能方面:Lucene是为了索引数百万个单词,并在其中搜索以毫秒为单位。在常规RDBMS中有数百万字,事情会慢一些。你可以在数据库中设置一个全文搜索,但这又需要设置和知道该怎么做。

On the performance side of things: Lucene is built to index millions of words and search within these in milliseconds. With millions of words in your "regular" RDBMS, things will get slow. You could set up a fulltextsearch in the database too, but this again needs setup and knowledge what to do.

所以大家都想:如果网站很小如果您计划获得大量数据,请与Lucene一起执行。

So a generall thought: if the site is small (in terms of things to searc), go with the Doctrine approach, if you plan to get serious amounts of data, go with Lucene.

这篇关于主观可行的行为与Zend Lucene在symfony的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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