thirstyladagain
thirstyladagain

Reputation: 621

What is underlying difference between elasticsearch and solr?

We have tons of differences mentioned between elastic search and solr for search technologies. The differences mentioned are mostly of data formats, API accessibility, analytics support, adaptability, cloud integration , geo spatial search, indexing, etc, etc.

Also , at all places they have mentioned that both this search technologies have been built on top of Apache Lucene. I have a fundamental question that if both have been built on top of search solution(Lucene here), there must be some differences in the way query works ? Like if I look from a text search aspect only and leave all other things behind, how is a text search performed in ES and solr. There should be some configuration / behavior change in the way the search engine searches / optimizes ? I need in depth understanding how the search works by taking a text string as example.

It would be awesome if someone could explain me that :)

Thanks.

Upvotes: 2

Views: 3457

Answers (3)

Adrian Lawrence
Adrian Lawrence

Reputation: 11

Both Solr and elasticsearch run using lucene, so you need that installed.

https://logz.io/blog/solr-vs-elasticsearch/ http://solr-vs-elasticsearch.com/ https://www.searchtechnologies.com/blog/solr-vs-elasticsearch-top-open-source-search

See the above for more of a run down.

Upvotes: 0

Doug T.
Doug T.

Reputation: 65599

I have written rather extensively on the topic in these blog posts. And in our book, Relevant Search.

This is a HUGE topic. But I'll try to give you the run down. What you can do with one, you can probably do with the other. But let me try to give you the rundown to help you see the forest for the trees.

Solr is

  • An Apache Foundation project. Which means it has more of a community-driven "bazaar" feel
  • Driven by many vendors in the Big Data space (LucidWorks, Cloudera, Datastax...)
  • Easier to write plugins for
  • Focuses more on traditional search problems and features, not analysis
  • Tends to attract people solving very advanced problems
  • A rathr significant "bug" -- the sea biscuit problem
  • Has a harder to use query API, but one that's more powerful
  • Relatively "advanced" feeling user experience

Elasticsearch, on the other hand

  • Is more of a "benevolent dictator" project, with very clean & concise APIs, documentation, etc
  • Heavily driven by Elastic, the company
  • Has a limited types of plugins you can write
  • Focuses on analytics aspects of search (aggregrations, etc) a little more than pure search
  • Allows you to control analysis more precisely
  • Easier to use Query API, but not as powerful (see blog article above, and this SO question)
  • Relatively user-friendly experience

I would say if you are solving hard search problems and enjoy diving into Java code of your search engine to solve your problem, go with Solr. (Expect to debug Solr itself when it does something weird)

On the other hand, if debugging a search engine terrifies you. And if you're more analytics focused, I'd go with Elasticsearch. It's going to be friendlier.

Upvotes: 10

Toby Cole
Toby Cole

Reputation: 66

Lucene is the underlying full-text search library used by both Solr and Elasticsearch, as you said. There are a few subtle differences in how Lucene is used and exposed between the two, but in terms of how text indexing and querying is performed they are almost identical.

Both use the concept of tokenization and token-filters (ES: https://www.elastic.co/guide/en/elasticsearch/reference/2.0/analysis-tokenfilters.html, Solr: https://cwiki.apache.org/confluence/display/solr/Understanding+Analyzers,+Tokenizers,+and+Filters) to split up and process text, and both use the same Lucene index format to store statistics about these tokens on disk.

I suspect the reason you've not been able to find out what the differences at this level are is because there aren't really any.

Upvotes: 2

Related Questions