简体   繁体   English

WordPress搜索,大型站点,共享服务器-我应该使用MySQL全文索引,Lucene.net ...吗?

[英]Wordpress search, large site, shared server-Should I use MySQL FullText Index, Lucene.net…?

I'm creating a site that is running on a shared server and I need to find a good search engine. 我正在创建一个在共享服务器上运行的网站,我需要找到一个好的搜索引擎。 What search engine framework should I use to fit my requirements? 我应该使用哪种搜索引擎框架来满足自己的要求?

Here are some requirements 这是一些要求

  • ~100,000 documents need to be indexed 约100,000个文档需要索引
  • Shared Server (but can run ASP.Net and php apps) 共享服务器(但可以运行ASP.Net和php应用程序)
  • Need to be able to restrict search results to specific tags, categories 需要能够将搜索结果限制为特定的标签,类别
  • Need to be able to sort by relevance + popularity, or relevance + date 需要能够按相关性+受欢迎程度或相关性+日期排序
  • A search is preformed on every page load (although i might implement caching). 搜索会在每个页面加载时执行(尽管我可能会实现缓存)。 The way it works is kind of like stackoverflow. 它的工作方式有点像stackoverflow。 I have a main document and then suggestions for related documents are loaded on the right. 我有一个主要文档,然后在右侧加载了相关文档的建议。 This occurs on every page 这发生在每一页上
  • Software is free and has very little budget for any type of hosted search solution (at this time anyway) 该软件是免费的,并且对于任何类型的托管搜索解决方案而言预算都很少(无论如何,目前还是这样)

Here are my thoughts 这是我的想法

  • zend lucene search - performance is not good enough for such a large site zend lucene搜索-对于如此大的网站,性能还不够好
  • Google custom search - number of sites/queries is limited Google自定义搜索-网站/查询数量有限
  • Solr, Sphinx, java lucene - on a shared server so I cannot install these Solr,Sphinx,Java Lucene-在共享服务器上,因此我无法安装这些
  • Lucene.net - I'm not sure if this is is possible. Lucene.net-我不确定这是否可能。 My hosting company allows me to run php and asp.net websites...but perhaps Lucene.net has to run as a separate process? 我的托管公司允许我运行php和asp.net网站...但是,也许Lucene.net必须作为单独的进程运行?
  • MySql FullText search - I am not aware of performance for large sites like I have described MySql FullText搜索-我不了解大型网站的性能(如上所述)

This seems like a tough bill to satisfy but I'm hoping I don't need to come up with an alternative design. 这似乎很难满足,但我希望我不需要提出替代设计。

If I am not wrong you are using WOrdpress. 如果我没有记错,那么您正在使用WOrdpress。 Will you be able to install MongoDB and php-mongo extension to your server, if yes then MongoDB FUlltext Search with MongoLantern can be efficient plugin for you.It can also be installed with wordpress and override the wordpress search with mongodb fulltext search. 如果可以,您是否可以将MongoDB和php-mongo扩展安装到您的服务器上,那么MongoLantern的MongoDB FUlltext Search可以为您提供高效的插件。它也可以与wordpress一起安装,并通过mongodb全文搜索覆盖wordpress搜索。

I have used it in few of my projects and they seems worked quite well. 我在几个项目中都使用了它,它们似乎工作得很好。 You can have MongoLantern WP plugin from here: http://wordpress.org/extend/plugins/mongolantern/ 您可以从此处获得MongoLantern WP插件: http ://wordpress.org/extend/plugins/mongolantern/

For this kind of features, and such a big number of documents, I would absolutly not go with MySQL's fulltext : I would definitly use some external indexing/searching solution (like Solr, Lucene, ...) 对于这种功能以及如此大量的文档,我绝对不会使用MySQL的全文:我会明确地使用一些外部索引/搜索解决方案(例如Solr,Lucene等)。

Like you said : 就像你说的一样 :

  • You have too many documents for Zend Lucene (pure PHP implementation) . Zend Lucene (纯PHP实现)的文档太多。
  • MySQL fulltext -- ergh, not that powerful, slow, ... MySQL全文-ergh,不是那么强大,缓慢,...
  • Solr/Sphinx require you to install them Solr / Sphinx需要您安装它们


Not sure about Lucene.NET, but with that kind of volume of data, can you really not get your own server, so you can install what you need to work properly ? 不确定Lucene.NET,但是有了这样大量的数据,您真的不能拥有自己的服务器,因此可以安装正常工作所需的东西吗?

And that's especially true if search is an important part of your application (it seems it is) . 如果搜索是应用程序的重要组成部分(看起来确实如此),则尤其如此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM