a

a

Monday, July 10, 2017

Elasticsearch


Elasticsearch is a distributed, RESTful search and analytics engine capable of solving a growing number of use cases. As the heart of the Elastic Stack, it centrally stores your data so you can discover the expected and uncover the unexpected.

a powerful open-source full-text search library, under the hood.

The relationship between Elasticsearch and Lucene, is like that of the relationship between a car and its engine.

For the purpose of this introduction, we haven't differentiated between the two, just as to most people, the distinction between a car and its engine is not terribly important when learning how to drive a car.

However, to a mechanic, the distinction is a very important one. Similarly, when we dive deeper under the bonnet of Elasticsearch, we'll explore the distinctions between Lucene and ElasticSearch in detail.




Elasticsearch  is an Open Source (Apache 2), Distributed Search Engine built on top of Apache Lucene. It allows you to start with one machine and scale to hundreds, and supports distributed search deployed over Amazon EC2's cloud hosting.


Basic Elasticsearch Concepts

Indexing

Elasticsearch is able to achieve fast search responses because, instead of searching the text directly, it searches an index instead.
This is like retrieving pages in a book related to a keyword by scanning the index at the back of a book, as opposed to searching every word of every page of the book.
This type of index is called an inverted index, because it inverts a page-centric data structure (page->words) to a keyword-centric data structure (word->pages).
Elasticsearch uses Apache Lucene to create and manage this inverted index.