Introduction to Elasticsearch
Introduction to Elasticsearch
What is Elasticsearch?
Elasticsearch is a full-text, distributed NoSQL database. In other words, it uses documents rather than schema or tables. It’s a free, open source tool that allows for real-time searching and analyzing your data. People appreciate this system because it allows you to run metrics on your data immediately, so you can understand it right away, on an ongoing basis.
Features
Here are some features of Elasticsearch:
Text search
Elasticsearch is primarily used when there is a lot of text. Traditional RDBMS don’t perform well for text search. Elasticsearch is highly customizable, extendable through plugins. You can build robust search without much knowledge quite fast.
Logging and Analysis
It is used to store and centralize logs from various sources. Integrating Kibana lets you connect to Elasticsearch cluster and create visualisations straight away. GrayLog is also using ElasticSearch as the backend to store logs.
Enterprise Search
Combining above uses, Elasticsearch enables enterprise search which includes Document Search, E-commerce product search, blog search, people search, site search in all its forms.
Schema-free
You can get up and running almost immediately with Elasticsearch. You just index a JSON document. The program knows to identify the structure and format of the data and generate an index so that it can be searched.
RESTful API
Elasticsearch is API driven. Almost any action can be performed using a simple RESTful API using JSON over HTTP. An API already exists in the language of your choice. Responses are always in JSON, which is both machine and human readable.
Fuzzy Searching
A fuzzy search is one that is lenient toward spelling errors. To give an example, you can find Levenshtein when searching for Levenstein. Our article on Fuzzy Searches offers more details on how to use fuzzy searches, and how they work.
Excellent Query DSL
The REST API exposes a very complex and capable query DSL, that is very easy to use. Every query is just a JSON object that can practically contain any type of query, or even several of them combined.
Faceting, another very common search feature, is just something that upon-request is accompanied to search results, and then is ready for you to use.
Multi-tenancy
You can host multiple indexes on one Elasticsearch installation – node or cluster. Each index can have multiple “types”, which are essentially completely different indexes.
Also, you can query multiple types and multiple indexes with one simple query. This opens quite a lot of options.
Document-Oriented
Store complex real-world entities in Elasticsearch as structured JSON documents. All fields are indexed by default, and all the indices can be used in a single query, to return results at breathtaking speed.
Elasticsearch Limitations
- Security : Elasticsearch does not provide any authentication or access control functionality.
- Transactions: There is no much more support for transactions or processing on data manipulation.
- Durability: Elasticsearch is distributed and fairly stable but backups and durability are not as high priority as in other data stores.
- Data Availability: Elasticsearch makes data available in “near real-time” which may require additional considerations in your application (ie: comments page where a user adds a new comment, refreshing the page might not actually show the new post because the index is still updating).
- Data Analysis
- Data Search
- Data Storage
- Elasticsearch
- Open Source
Vishal Wayachal
6 January 2018