We have shown as guide how to install Apache Solr, you will likely to on some cloud server instance for testing/dev purpose. Elasticsearch as such we shown to install with Hadoop. Apache Solr vs. Elasticsearch for WordPress search is a complicated topic as the number of plugin is a matter which we need to consider. Elasticsearch basically packaged by Elastic company. Apache Solr is a direct project of Apache Software Foundation. Like for Apache web server or whatever, Solr really does not have customized, optimised form of delivery like elasticsearch. Apache Lucene is a full featured text search engine library and Solr, ElasticSearch both are built over Lucene. Difference will be at optimisation, implementation, API, documentation, client libraries in different languages etc.
We are thinking about Apache Solr or Elasticsearch as the standard search which is built into WordPress does not provide closest to the best search experience possible to offer to the visitors, like inability to suggest search phrases, correct typos, organize results etc. For these purposes we fall back to Google custom search.
Apache Solr vs. Elasticsearch For WordPress Search
Elasticsearch is easier to get started, anyone can use it without knowing too much but it can go towards dangerous if data increases. Solr actually towards text search, while Elasticsearch is towards analytical types of queries.
Apache Solo needs ZooKeeper. Elasticsearch has a built-in ZooKeeper-like thing called Zen. ZooKeeper is better known at for preventing inconsistent states. None of these two has huge number of WordPress plugins, yet as Elasticsearch has easy API, libraries; WordPress plugins for using Elasticsearch is more. But as our reason of using some self hosted search is for text searching, for various combined reasons I will incline towards Apache Solr compared to Elasticsearch exactly like I will incline towards Apache server compared to Nginx. I agree that Apache Solr is difficult to deploy than Elasticsearch. Solr has 100% open source plugin :
The above is not one, there are other few others.