Boundary search with (out) Solr

I want to implement a faceted search for my project. I am using PHP5 , Mysql and Symfony 1.4 . Apparently, commnunity points to Apache Solr , which seems to be doing exactly what I want to accomplish.

The problem is that the website will live on a hosting provider that does not allow me to configure Solr (this is a public hosting environment and does not allow Tomcat and Solr i-run).

So please give me guidance on possible alternatives, or if there is a way to configure Solr in such an environment?

EDIT
My hosting provider does not support Solr or solutions like opensolr . In general, I cannot use my environment to connect to a process on the same server or remote. It seems the only option available is to use Zend_Search_Lucene . So does this line support search? Or, if you have another option, please share it! I feel in the middle of nowhere!

EDIT 2
Since this question is open for about a week from the answers we give so far, I am surprised (and disappointed) that in PHP there is no library (and not a service) for implementing facsimized search. It seems that either this needs to be done manually, or use the solutions below

+4
source share
3 answers

Performance will not be great and does not discuss scaling, but you can always create reverse HTTP tunneling through HTTP. Basically, instead of the web server opening an outgoing connection to the Solr server, the Solr server connects to the web server to request tasks and publish the results of the work.

What you need to do:

  • The browser sends a search request, the request is simply queued in the database.
  • The reverse proxy server periodically connects to the web server (through the usual port 80) to receive a list of requests from the job queue, send requests to the Solr server, and send the results to the web server.
  • The browser periodically checks the web server for the completed search result.

Bonus points: if your server allows simultaneous processing of requests, use a long poll to improve latency.

In short, bite a bullet and go to a decent host.

+1
source

Change the hosts or place the Solr index in another place - for example, a quick search showed http://www.opensolr.com/ providing the Solr host, there is no doubt many others.

+2
source

Try to avoid Zend_Search_Lucene, it is not very fast. (Well, this is pretty good, given that it is implemented in Php and does not work as a daemon)

Solr hosting, as Paul suggested, sounds like a good alternative - if you don't want to change the host.

0
source

Source: https://habr.com/ru/post/1438394/


All Articles