Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elasticsearch or Lucene

I understood Elasticsearch is built around Lucene but I cannot understand exactly what is the added value of Elasticsearch.

I would like to add a 'Global search' box in my asp.net mvc app, I wonder if I have to use Elasticearch or directly Lucene/Lucene.net..

Thanks for helping my to understand.

like image 439
bAN Avatar asked Dec 19 '13 23:12

bAN


2 Answers

Lucene is a search library written in Java. ElasticSearch is a server build around the Lucene library and allows you to interact with Lucene through an easy to use HTTP interface.

You can use Lucene directly in your application but you will need to cover a lot of integration ground work. By using ElasticSearch (or Solr for that matter) a lot of the integration work is taken care of and you can use the search technology in a decoupled manner since the search aspect will run in an independent server environment.

like image 78
Luke Avatar answered Oct 10 '22 01:10

Luke


Elasticsearch will scale better than the original Lucene. Elasticsearch does add formidable sharding and replication to Lucene for one (so too does Solr).

FTS techs such as Solr/Elasticsearch always just use Lucene as the core, adding their own optimizations on top.

SO (this site) used to use Lucene before turning to Elasticsearch. Their site used to crash once every so often when it came to reindexing time, as far as I can tell since moving to Elasticsearch it hasn't.

like image 32
Sammaye Avatar answered Oct 10 '22 02:10

Sammaye