Now so that you have downloaded and was able run an elasticsearch instance, let us have a good understanding on elasticsearch concepts.
One good introductory analogy would be elasticsearch is crudely similar to Apache Tomcat (please note, this is purely for understanding purposes, the functionalities are overwhelmingly different!). People familiar with Tomcat will know that it is a Web Server where web pages are deployed/hosted and accessed through a web browser, similarly elasticsearch is a Search Server where data is indexed/stored and queried, where as in Tomcat both the middleware and front-end are done by the browser but in elasticsearch we have to write our own middleware to query the indexed data and display the results using the front-end of our choice. So, lets start our journey!
Firstly, I would like to introduce some terminology used in elasticsearch. I always prefer a top-down approach because, as you keep heading down, you'll get to know more details and that makes sense.
Cluster - An elasticsearch cluster is a collection of nodes, where each node is a running instance of elasticsearch server (when you ran ./elasticsearch or elasticsearch.bat on your computer, you have started an instance of elasticsearch, which is nothing but a node)
Node - Ok! I have already defined what a node is !! Each node runs/listens on a single port(starting from 9200, by default). Elasticsearch assigns this port dynamically and it can manage port conflicts, when a new node instance is started it'll automatically get assigned to the next free port
Index - An index resembles a Database table where all the indexed data gets stored. Each index has to have a unique name. Also, all the indexes are accessible to the whole cluster
Shard - Each index is divided into a number of shards by default(to handle huge amounts of data efficiently). The shards of a particular index can be spread among multiple nodes and clusters hence an index can span over multiple clusters
Type - An index uses logical separation of data into multiple types for easy recognizability and good structuring of data. These has to be set manually
Document - A single entity of data that gets indexed is called a document. This is similar to a row in a database table. You can index a document into a particular index and into a particular type
Field - A field is like a column in a database table. Each document consists of a set of fields and their values. Unlike SQL where number of columns is fixed for a database table and all rows are bound to have those columns, elasticsearch allows variable number of fields in each document in an index
Replica - A replica is a copy of a shard that shouldn't reside on the same node in which it's respective shard resides. It is helpful to handle network failures and prevent loss of data
One good introductory analogy would be elasticsearch is crudely similar to Apache Tomcat (please note, this is purely for understanding purposes, the functionalities are overwhelmingly different!). People familiar with Tomcat will know that it is a Web Server where web pages are deployed/hosted and accessed through a web browser, similarly elasticsearch is a Search Server where data is indexed/stored and queried, where as in Tomcat both the middleware and front-end are done by the browser but in elasticsearch we have to write our own middleware to query the indexed data and display the results using the front-end of our choice. So, lets start our journey!
Firstly, I would like to introduce some terminology used in elasticsearch. I always prefer a top-down approach because, as you keep heading down, you'll get to know more details and that makes sense.
Cluster - An elasticsearch cluster is a collection of nodes, where each node is a running instance of elasticsearch server (when you ran ./elasticsearch or elasticsearch.bat on your computer, you have started an instance of elasticsearch, which is nothing but a node)
Node - Ok! I have already defined what a node is !! Each node runs/listens on a single port(starting from 9200, by default). Elasticsearch assigns this port dynamically and it can manage port conflicts, when a new node instance is started it'll automatically get assigned to the next free port
Index - An index resembles a Database table where all the indexed data gets stored. Each index has to have a unique name. Also, all the indexes are accessible to the whole cluster
Shard - Each index is divided into a number of shards by default(to handle huge amounts of data efficiently). The shards of a particular index can be spread among multiple nodes and clusters hence an index can span over multiple clusters
Type - An index uses logical separation of data into multiple types for easy recognizability and good structuring of data. These has to be set manually
Document - A single entity of data that gets indexed is called a document. This is similar to a row in a database table. You can index a document into a particular index and into a particular type
Field - A field is like a column in a database table. Each document consists of a set of fields and their values. Unlike SQL where number of columns is fixed for a database table and all rows are bound to have those columns, elasticsearch allows variable number of fields in each document in an index
Replica - A replica is a copy of a shard that shouldn't reside on the same node in which it's respective shard resides. It is helpful to handle network failures and prevent loss of data