Well, the first question comes in mind that why should I search with elasticsearch? But let's begin with what is elasticsearch.
Its technology that allows you to implement a solution when you got more data than you know what to do with it. Basically, it's a search engine with lots of indices. Again why lots of indices? Searching for big data is really fast with index. Index is a data structure that improves the speed of data retrieval operations on a database table. Elasticsearch is a search engine built on Apache Lucene. It is an open-source and developed in Java.
So the difference between “traditional” search engine & elastic search engine is, it cares about numbers, its not just about text. Elasticsearch is a distributed, open-source search and analytics engine for all types of data, including textual, numerical, geospatial, structured, and unstructured.
Elasticsearch is built on Apache Lucene and was first released in 2010 by Elasticsearch N.V. (now known as Elastic). Known for its simple REST APIs, distributed nature, speed, and scalability, Elasticsearch is the central component of the Elastic Stack, a set of open-source tools for data ingestion, enrichment, storage, analysis, and visualization. Commonly referred to as the ELK Stack (Elasticsearch, Logstash, and Kibana)
Being elastic is really scalable to petabytes of data easily & most important thing, It is cost-effective as you can use most of the services with free of cost. Here you can see all the pricing details for SAAS, standalone & orchestration
So let's start with simple transactions with elasticsearch but before that install elasticsearch on your machine from below link. once you installed elastic search, run elastic search batch file & check your elastic search server is up or not by http://localhost:9200/ hitting this URL.
http://localhost:9200/
You can hit this API using curl or rest-client or postman or browser. You will get the following output In the request URL, we have added employees/_doc/emp_1, where employees is an index, _doc is mapping type used to separate a collection inside the same index, we can use custom mapping type & emp_1 is an id to differentiate collections inside the same index.
Request URL: http://localhost:9200/employees/_doc/emp_1
Request method: POST
Request Body:
{
"email":"brad.gibson@example.com",
"location":{
"city": "kilcoole",
"state": "waterford"
}
}
Nulla porttitor accumsan tincidunt. Cras ultricies ligula sed magna dictum porta. Mauris blandit aliquet elit, eget tincidunt nibh pulvinar a. Cras ultricies ligula sed magna dictum porta. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sollicitudin molestie malesuada.
Comments (34)
Oliver Colmenares
18 Sep 2017Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores reprehenderit, provident cumque ipsam temporibus maiores quae natus libero optio, at qui beatae ducimus placeat debitis voluptates amet corporis.
ReplyCarmen Vegas
18 Sep 2017Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores reprehenderit, provident cumque ipsam temporibus maiores quae natus libero optio, at qui beatae ducimus placeat debitis voluptates amet corporis, veritatis deserunt.
ReplyOliver Colmenares
18 Sep 2017Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores reprehenderit, provident cumque ipsam temporibus maiores quae.
ReplyOliver Colmenares
18 Sep 2017Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores reprehenderit, provident cumque ipsam temporibus maiores quae natus libero optio.
Reply