How does Elasticsearch work?

It is a distributed search engine designed for high performance searches. The main features are

  1. Very powerful searches (uses Lucene Index)
  2. Distributed (data can be distributed to thousands of nodes)
  3. Real-time ( the data is available almost immediately after inserts)
  4. Easy to Scale ( can scale to thousands of nodes easily)

Some people confuse Elasticsearch with NoSQL Database but they are not same. ES do provides some of the Features of NoSQL but it primarily is a search and analysis Engine.