Technically Speaking

The Official Bigstep Blog

 

Elasticsearch 101: The Basics

Elasticsearch is a distributed search and analytical engine (search engine). It operates as a super-fast search within a particular dataset, is multi-tenant, and features a RESTful web interface, as well as schema-free JSON documents and Java API. In most any kind of structured or unstructured data store, it delivers actionable insights in real time. ElasticSearch is based on Apache Lucene.

Elasticsearch is a distributed search and analytical engine (search engine). It operates as a super-fast search within a particular dataset, is multi-tenant, and features a RESTful web interface, as well as schema-free JSON documents and Java API. In most any kind of structured or unstructured data store, it delivers actionable insights in real time. ElasticSearch is based on Apache Lucene.

Why Elasticsearch is So Blasted Fast

The reason ElasticSearch is such a speedy search engine is that, instead of directly searching the text, it searches an index. It works much like retrieving pages within a book that are relevant to a particular keyword by scanning the index in the back of the book instead of searching word by word, page by page. Apache Lucene creates and manages this index, called an inverted index.

Use Cases for Elasticsearch

ElasticSearch is an excellent search engine for searching documents. It operates in nearly real time, is scalable, and supports multi-tenancy. An additional feature of ElasticSearch is “gateway”. This feature takes care of the long-term persistence of ElasticSearch indices. For instance, if a server crashes, an index is able to be recovered from the gateway.

ElasticSearch is also capable of supporting real-time GET requests. This makes it well suited as a NoSQL database, except that it does not have distributed transactions. When using ElasticSearch, the unit of searching and indexing is the Document. An index is made up of one or more Documents, and Documents are made up of one or more Fields.

Elasticsearch: The Technical Stuff

Here, let me show you the technical mumbo jumbo behind ElasticSearch.

Elasticsearch is schema free, more or less. Although it isn’t necessary to specify a schema before you index the documents, you do have to add mapping declarations unless you need nothing more than the most basic fields and operations. It is exactly like specifying a schema. The schema establishes what fields are available, which field is the unique or primary key, which of the fields are required, and how to index and search each of the fields.

In ElasticSearch, a Mapping Type is just a way of keeping the documents of an index separated into logical groups. An index can store documents of various mapping types. You can assign each mapping type multiple mapping definitions. In order to create Mapping Types, you must get Put Mapping API, or just include multiple mappings when you establish an index.

Apache Lucene & Elasticsearch

As with Lucene, there are some basic search queries, like Term and Previx, as well as compound queries, such as bool. To make query syntax available to users, Elasticsearch utilizes Query DSL. This allows complex queries to be built using JSON syntax.

If you aren’t familiar with Lucene, it is an open source full-text search library, and it’s actually quite powerful. A number of notable companies are using Elasticsearch search engines, including Wikimedia, Facebook, Netflix, Etsy, Mozilla, Stack Exchange, and many others.

The Bigstep Metal Cloud fully supports Elasticsearch. Never heard of it? Well, that needs to change!

Got a question? Need advice? We're just one click away.
Sharing is caring:TwitterFacebookLinkedinPinterestEmail

Readers also enjoyed:

7 Things You Need to Know About Implementing Cloud Services

After a few years of proving its value, addressing security concerns, and developing viable business models, the cloud has achieved a significant market…

Big Data: The Rush for Instant Results

If you were to print out all the data added to the web each year, you would need a lot of trees - probably all the trees on the planet and then some.…

Leave a Reply

Your email address will not be published.

* Required fields to post your comments.
Please review our Privacy Notice in order to understand how we process your personal data and what are your rights in this respect.