What is Elasticsearch

So what is Elastic Search – Is it tool to search? A library with effective search algorithms?

Elastic Search simply a data base, like any other data base in the world, Elastic Search stores the data you provided.

But, Elastic Search has its own way to store the data and process it, that makes Elastic Search special.

Elasticsearch is flexible and faster

The often heard word with Elasticsearch is full text search, in full text search the search engine matches the search key you have provided with every word in the text to be searched.


Example if your website is selling Car accessories. You have following products ABCD Wheeler Tyre and Tyre inflator and pressure gauge
A key word Tyre with full text search will return both products ABCD Wheeler Tyre and Tyre inflator and pressure gauge
Searching with Tyre Pressure will return Tyre inflator and pressure gauge

Comparing the speed of search, Elastic usually 100 times faster when comparing to conventional SQL databases

Storing Data into Elasticsearch

Storing data into Elasticsearch usually called as indexing(because an Elasticsearch table called as an index).

Elasticsearch search stores the data in JSON format. The KEY of JSON value is the name of the field (column name) and data associated is the data.


Elasticsearch supports various type of data types such as Strings, Numbers, Booleans, Dates, Geolocations etc.. and array of this values to a single column.

Similar to an INSERT query Elasticsearch uses API call to Elasticsearch server

Example of insert API call

curl -X PUT "localhost:9200/twitter/_create/1" -H 'Content-Type: application/json' -d'
{
    "user" : "kimchy",
    "post_date" : "2009-11-15T14:12:12",
    "message" : "trying out Elasticsearch"
}

Elasticsearch stores data distributed

Elasticsearch stores a single index distributed into multiple containers called shards (how many shards an index should be store can be set at the time of index creation). The shards often duplicates the data to provide redundant copies of the data in case of hardware failure. Data distribution also allow Elasticsearch to search faster.

Elasticsearch is free to use

The open source features of Elasticsearch are free to use under the Apache 2 license. Additional free features are available under the Elastic license, and paid subscriptions provide access to support as well as advanced features such as alerting and machine learning.

Leave a Reply

Your email address will not be published. Required fields are marked *