Elasticsearch is a search engine server, when you have tables that contain millions of records to search doing this in MySQL it will not be efficient, you have to index your records by building an index. Elastic search used as a base, a java project called Apache Lucene, elastic team build a REST API where you can use all the features of Lucene by making a simple HTTP request with data in JSON format.
What is Elasticsearch
So the logic is simple, initially you have to create an index on elastic server and after that, you have to store data that you want be searchable, for example in an eshop you could store the title and description of all products. Then make an effective search buy using specific characteristics of Lucene, like wildcard search, fuzzy search, range search, and others.
Elastic search is also a part of the ELK stack, where means elastic search, logstash, and kibana. Logstash is a tool that is used to take logs and data from different sources and data formats and transporting them to elastic search or any other destination. Kibana is a visualization tool that you can create graphs and dashboards. In the near future, ELK stack will be a major player in analytics platforms.
This can be integrated with all modern PHP frameworks using composer packages or other extensions, in laravel development project integration can be done easily by mapping the Eloquent models with elastic search types using this elasticquent extension .Also other tools like yii2 framework have native extensions.