asolopovas/scout-elasticsearch

Elasticsearch driver for Scout

v3.0.1 2017-09-25 10:42 UTC

This package is not auto-updated.

Last update: 2023-06-24 15:16:46 UTC


README

Version

3.0.1

Contents

Installation

  1. Download package via composer
composer require asolopovas/scout-elasticsearch
  1. Add Scout service provider to ./config/app.php
'providers' => [
    ...
    Laravel\Scout\ScoutServiceProvider::class,
    ...
],
  1. Append 'elasticsearch' configuration to ./config/scout.php:
    'elasticsearch' => [
        'index'  => env('ELASTICSEARCH_INDEX', 'laravel'),
        'config' => [
            'ssl'  => env('ELASTICSEARCH_SSL', false),
            'hosts' => [
                env('ELASTICSEARCH_HOST', "http://localhost:9200"),
            ],
            'ssl'   => [
                'certificate' => resource_path().'/ssl/ca.crt',
            ],
        ],
    ],
  1. Setup Elasticsearch evnironment variablies in your .env file. (Note: Replace these variables according to your configuration, basic auth can be passed as this http://user:pass@localhost. If you set SSL to true don't forget to add you verification certificate to ./resources/ssl)
...
ELASTICSEARCH_SSL=false
ELASTICSEARCH_HOST=http://localhost
ELASTICSEARCH_INDEX=laravel
...

Requirements

Scout-Elasticsearch engine require PHP version >=5.6.6. As well as Elasticsearch server up and running.

Issues

Bug reports and feature requests can be submitted on the Github Issue Tracker

License

Open-Sourced software licensed under the MIT license