Solr, Lucene and ElasticSearch what are the differences? When to use one or the other?

3

What's the difference between ElasticSearch, Solr and Lucene?

When to use one or the other?

    
asked by anonymous 14.09.2015 / 20:25

1 answer

10

You should know that both serve to search various content.

Lucene

Lucene is at a lower level. This gives you more flexibility and fine-tuning of what you want to do. On the other hand you have to know how to do everything you need, it gives you more work. It's usually interesting when you want to embed the search within your application and render it as you want.

Solr

Solr is an abstraction built on top of Lucene and is much easier to use with almost everything ready. It is still possible to have enough flexibility, but it gives more work and has some limitations. It caters to most situations since it is rare to need to do something other than what it offers.

There is a wider infrastructure offered by this tool. This includes HTTP services that allow you to use the search even without using the API in the programming language (Java for example) and consume the service ready by the web.

Some features available:

  • HTTP API exchanging data with XML / JSON
  • Filtering and directed search (search helpers as a suggestion)
  • Geospatial Search
  • Incremental update
  • Cache
  • Data Distribution and Replication
  • Index replication
  • administrative panel.

Note that newer versions of Lucene already have many of Solr's features and are increasingly narrowing the distance between them. But there is still a difference in how service is offered.

Elastic Search

Elastic Search is a competitor to Solr. It is considered more modern by many and in fact has more facilities than Solr, has a model that better meets many needs, mainly distribution (which is rare to need) and near real-time update. It can not be said that he is more suited than the Solr always, even because he has some limitations too, his model may hinder certain needs. And they say it's even easier to work with.

You have a website that compares them (which are more comparable directly).

Functionality and scale

One common mistake people make is that everyone needs the most scalable solution possible. No, you're not Facebook. Or even the Stack Exchange which is absurdly smaller. When I say that SQLite is good for 90% of cases and a SQL server resolves 99%, there are people who do not believe it.

These mechanisms are great, and some of the things they do are very interesting, but you rarely need anything other than trivial, especially when it comes to scale.

    
14.09.2015 / 20:39