简体   繁体   English

适用于重型数据库的最佳PHP搜索技术,例如适用于Java的apache solr

[英]Best PHP search technique for heavy database like apache solr for java

I have used apache solr in my java project smoothly, but when i come to the end to solve a same kind of issue with PHP, this issue is arising: 我已经在我的java项目中顺利使用了apache solr,但是当我最终解决PHP的同类问题时,就会出现此问题:

To run apache SOLR, we need JVM to be installed on the server. 要运行apache SOLR,我们需要在服务器上安装JVM。 But I don't know whether there is JVM installed in my client server or not. 但是我不知道客户端服务器上是否安装了JVM。 Because it is PHP apache linux server (not dedicated), I don't know whether I will get to access the console by which I can manage a bit. 因为它是PHP apache linux服务器(非专用),所以我不知道是否可以访问控制台,通过它我可以进行一些管理。

Could any body tell me what is the alternative for apache solr for simple PHP environment? 谁能告诉我简单的PHP环境中apache solr的替代方案是什么? Or please suggest me best indexing search technique for PHP. 或者,请向我建议PHP的最佳索引搜索技术。

Some options: 一些选项:

  1. The worst solution, but probably the easiest if you want to remain in this (shared?) environment is to use a php solution like aitchnyu suggested. 最糟糕的解决方案,但如果想保留在此(共享的?)环境中,最简单的方法就是使用aitchnyu建议的php解决方案。 You could even use your own. 您甚至可以使用自己的。
  2. Shared environments often have access to mysql, you could search based off that . 共享环境通常可以访问mysql,您可以基于进行搜索。 (Also not ideal, but possible) (也不理想,但可能)
  3. Upgrade servers to like a virtual-shared server or use a seperate server for SOLR (I use ec2 free-tier which works well) 将服务器升级为虚拟共享服务器,或将单独的服务器用于SOLR(我使用ec2自由层,效果很好)

Not really an option but to answer your question, yes you can access the terminal through php but this is far from what you should really do because most shared servers disable access through php (in fact they didn't give you ssh access for a reason). 不是真正的选择,而是要回答您的问题,是的,您可以通过php访问终端,但这与您应该做的事情相去甚远,因为大多数共享服务器都禁止通过php进行访问(事实上,它们并没有为您提供ssh访问权限)。

Also because even if they forgot to close this security hole (which happens sometimes) you will exhaust your resources (ram, cpu) pretty quick and you'll have to upgrade servers anyway. 另外,因为即使他们忘记关闭此安全漏洞(有时会发生),您也将很快耗尽资源(RAM,CPU),并且无论如何都必须升级服务器。

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

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