How To Setup Elasticsearch With Laravel 5
Noor Ali shows us how to setup ElasticSearch with Laravel 5.
Elasticsearch is a server based tool that is capable of full-text searching at very high speed. It is powered by Apache Lucene (which is an open source full text search library). It is able to achieve this speed because instead of searching the whole word matching the desired result from the whole database, it uses indexing.
This is similar to the indexing of a book. In this case, indexes are made out of letters. So as soon as you start searching, the Elasticsearch mechanism starts hovering to your result matching your first letter entries.
Elasticsearch with Laravel
How Do I Set It Up?
We will learn in this little tutorial about how we can setup Elasticsearch with our Laravel App. We will see some basic examples and will start working with them. I would love it if you follow the guide side by side so you can make changes accordingly for better learning.
Prerequisites:
You have an activated server on Cloudways. [Click here][2] to launch one.
You have an active Laravel App installed on your server.
You have installed Elasticsearch on your Cloudways Server. [If not click here to see the related guide.][3]
Note: If you don't use a Cloudways' server, we also have some other tutorials about Elasticsearch here:
http://learninglaravel.net/search?q=elasticsearch
Step 1: Checking Elasticsearch Installation
Open up SSH terminal and enter the following command
$ curl -XGET 127.0.0.1:9200
System Settings
Step 2: Installing Elasticsearch Client for PHP Laravel
Link:
This post is submitted by our members. Submit a new post.
Topics: PHP Laravel Elasticsearch
Tags: Tutorials Laravel 5 Laravel 5.1 Laravel 5.2 Intermediate