Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How much better is Apache Solr than its non-Java competition? Is it so much better than other solutions, e.g. this one (Sphinx with PHP API) or Zend_Search_Lucene that it would be worth suggesting that a client move to a different hosting provider than the one they are working with now? The current host does not support Java.

If there are other decent solutions for indexed database search which are more palatable to typical web hosts, I'd like to hear about them.

It is A Big Deal for them to change hosting providers, so I would like to know if the move would be justified.

share|improve this question

closed as off-topic by gnat, mattnz, Bart van Ingen Schenau, GlenH7, MichaelT Jun 18 '14 at 14:02

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Programmers as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." – gnat, mattnz, Bart van Ingen Schenau, GlenH7, Community
If this question can be reworded to fit the rules in the help center, please edit the question.

You could also host Solr somewhere else -- it runs over http, so it is easy to remotely access. – Wyatt Barnett Apr 21 '11 at 11:47
That would require allowing remote access to the database, but thanks for the idea. – Fritz Meissner Apr 21 '11 at 11:59
Not really -- you can feed Solr data over HTTP as well . . . – Wyatt Barnett Apr 21 '11 at 13:36
Right - hadn't thought of that. – Fritz Meissner Apr 21 '11 at 14:00
up vote 2 down vote accepted

Don't know anything about Sphinx, but both Solr and Zend_Search_Lucene are based on Lucene (to be precise, Solr uses Lucene directly and Zend_Search is derived from Lucene). So at the bottom of either package you have the same solid and tested IR concepts. So in theory you can develop pretty much the same search engine using either package.

What is good about Solr is that is packed with a lot of features which save you a lot of time. For instance you can query Solr and have it send response in PHP serialize format, so you can get the results with simple unserialize() instead of parsing. You would have to develop all the bits yourself with Zend_Search.

share|improve this answer
I ended up going with Zend_Search_Lucene, thanks for the tip – Fritz Meissner May 28 '11 at 18:37

If having Solr vs a non-Java means the difference between a web site that works and it used by 1000's or 100,000's of users a day and one that barely functions and is visited only by a handful of users then yes it is justified.

I realise that the above is an exaggeration and in real life you probably won't get just a clear cut distinction but that's the fundamental question.

Another way of looking at it is to ask the following question:

Are there things that the client wants to do with their site that would be either impossible or very expensive to do without Solr?

If the answer is "yes" or it will cost more and take longer than changing hosting provider and implementing Solr then you have a business case for doing it which the client should understand.

share|improve this answer
so are you saying that there are no non-Java solutions that can touch Solr for functionality? – Fritz Meissner Apr 21 '11 at 11:46
@Fritz - No, but second question still applies. If there is an alternative (which there probably is) will it be more expensive to implement than switching hosts? – ChrisF Apr 21 '11 at 11:50
Right. Well that's what I don't know, and the reason why I was asking :). – Fritz Meissner Apr 21 '11 at 11:58
@Fritz - In that case I misunderstood your question. – ChrisF Apr 21 '11 at 12:00
No worries - helped me realise that I needed to edit the question. – Fritz Meissner Apr 21 '11 at 12:05

It honestly depends on what your client wants to do and the throughput you're wanting to get out of it. If your current solution is "bad" then moving to Solr is probably a good idea. I can't directly compare Solr to the other solutions as I've not used them, but I can tell you I've used Solr at one particular web publishing client and it stood up against roughly 7 million requests per day at peak times and was quite stable (scalable, clustered environment, mind you), so it's definitely "good enough". The real question is: Is the current situation bad enough to warrant the opportunity cost of switching/rewriting existing systems? That is something only the client can answer.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.