Recommend this page to a friend! |
Classes of Nahidul Hasan | Laravel ElasticSearch Application with Docker | readme.md | Download |
|
DownloadLaravel-docker-elasticsearchThis is a simple repo for practicing elasticsearch with laravel and docker. What is Elasticsearch?Elasticsearch is an open-source, RESTful, distributed search and analytics engine built on Apache Lucene. Since the first version of Elasticsearch was released in 2010, it has quickly become the most popular search engine, and is commonly used for log analytics, full-text search, and operational intelligence use cases. In this repo you will get how you will use elasticsearch with laravel and docker. First you have to add elastic search image in docker-compose file. For Example :
Before running docker compose you have to sure that docker memory size >= 4.0 GB. Otherwise, the elastic search will not run properly. Now you have to update composer.json file.
All the above things I have done in this repo. For running this project just follow the following step:
From the project directory run the following command:
Now increase docker memory size, restart docker and run the following commands
Now run the migration commmand:
Now you can brows the project and create post from this url
Now you can search using elastic search. In app elastic folder you will get elastic class. Here I have implement elastic client. If you want to add demo data for Post then run the following command:
|