pankar
pankar

Reputation: 1701

Faceted Search With(out) Solr

I want to implement a faceted search for a project of mine. I'm using PHP5, Mysql and Symfony 1.4. Apparently the commnunity points to Apache Solr which seems to do exactly what I want to accomplish.

The problem is that the website is going to be live on a hosting provider that doesn't allow me to setup Solr (it is a shared hosting environment and neither allows Tomcat nor Solr to be up-and-running).

So could you please give me directions on possible alternatives or if there is a way to setup Solr in such an environment?

EDIT
My hosting provider neither supports SOLR nor solutions as opensolr. In general I can't use my environment to connect to a process on the same server or a remote one. It seems the only available option is to use Zend_Search_Lucene. So does this support faceted searching? Or if you have another option in mind please share it! I feel being in the middle of nowhere!

EDIT 2
As this question is opened for about a week from the answers given so far I am surprised (and disappointed) that there is no library (not service) available in PHP to implement faceted search. It seems that either this needs to be implemented manually or use solutions provided below

Upvotes: 4

Views: 1055

Answers (3)

Lie Ryan
Lie Ryan

Reputation: 64913

Performance won't be great and don't discuss scaling, but you can always create a reverse HTTP tunnelling over HTTP. Basically, instead of the web server opening an outbound connection to the Solr server, it's the Solr server connecting to the web server to request jobs and to post job results.

What you'll need to do:

  1. The browser post a search query, the query is simply queued in the database.
  2. The reverse proxy periodically connects to the web server (over plain ol' port 80) to fetch a list of queries from the job queue, pass the queries to the Solr server, and POST the results back to the web server.
  3. The browser periodically polls the web server for finished search result.

Bonus marks: if your server allows concurrent request processing, use long polling to improve latency.

In short, bite the bullet and move to a decent host.

Upvotes: 1

Niko Sams
Niko Sams

Reputation: 4414

Try to avoid Zend_Search_Lucene, it's not really fast. (Well it's pretty good given that it's implemented in Php and doesn't run as daemon)

Hosted Solr as Paul suggested sounds like a good alternative - if you are not willing to change host.

Upvotes: 0

Paul Dixon
Paul Dixon

Reputation: 301035

Change hosts, or host the Solr index elsewhere - for example, a quick search revealed http://www.opensolr.com/ provide Solr hosting, there are no doubt many others.

Upvotes: 2

Related Questions