PHPackages                             boxed-code/laravel-scout-elasticsearch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. boxed-code/laravel-scout-elasticsearch

ActiveLibrary[Search &amp; Filtering](/categories/search)

boxed-code/laravel-scout-elasticsearch
======================================

Elasticsearch Driver for Laravel Scout

2.0.1(2y ago)110.6k1MITPHPPHP ^7.2|^8.0CI failing

Since Apr 6Pushed 2y ago1 watchersCompare

[ Source](https://github.com/boxed-code/laravel-scout-elasticsearch)[ Packagist](https://packagist.org/packages/boxed-code/laravel-scout-elasticsearch)[ RSS](/packages/boxed-code-laravel-scout-elasticsearch/feed)WikiDiscussions master Synced today

READMEChangelog (4)Dependencies (4)Versions (6)Used By (0)

Laravel Scout Elasticsearch Driver
==================================

[](#laravel-scout-elasticsearch-driver)

[![Latest Stable Version](https://camo.githubusercontent.com/b7d4217b0889ec6f7272df2d4e593e15837112c6a281ed00b64c7107ef57e2e3/68747470733a2f2f706f7365722e707567782e6f72672f626f7865642d636f64652f6c61726176656c2d73636f75742d656c61737469637365617263682f762f737461626c65)](https://packagist.org/packages/boxed-code/laravel-scout-elasticsearch)[![License](https://camo.githubusercontent.com/d905e931aab7744c90a3a789981f1181b5bdf4d6760a89ed875a68161591b804/68747470733a2f2f706f7365722e707567782e6f72672f626f7865642d636f64652f6c61726176656c2d73636f75742d656c61737469637365617263682f6c6963656e7365)](https://packagist.org/packages/boxed-code/laravel-scout-elasticsearch)[![Tests](https://github.com/boxed-code/laravel-scout-elasticsearch/actions/workflows/run_tests.yml/badge.svg)](https://github.com/boxed-code/laravel-scout-elasticsearch/actions/workflows/run_tests.yml)

A basic [elastic](https://www.elastic.co/products/elasticsearch) search backed driver [for Laravel Scout](https://laravel.com/docs/8.0/scout).

This driver has a simple configuration, requiring you to set the hostname of your elasticsearch node.

Note that this driver uses a separate index for each model type as elasticsearch mapping types have been deprecated in elasticsearch 6.0 and will be removed in 8.0, for more information see .

By default, the driver uses the `simple_query_string` full text parser with `and` as the default operator. More information on the functionality &amp; syntax of this query format can be found [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html).

**Requires Scout ^8.0 or ^9.0 &amp; PHP &gt;=7.2**. Based on the original work of [ErickTamayo](https://github.com/ErickTamayo/laravel-scout-elastic)(Scout 5/6/7 &amp; elastic search server 5.x are supported by versions of 1.x)

Contents
--------

[](#contents)

- [Installation](#installation)
- [Upgrading from 1.x --&gt; 2.x](#upgrading-from-1x---2x)
- [Usage](#usage)
- [Credits](#credits)
- [License](#license)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require boxed-code/laravel-scout-elasticsearch
```

If you're using Laravel 5.4, you must add the Scout service provider and the package service provider in your app.php config:

```
// config/app.php
'providers' => [
    ...
    Laravel\Scout\ScoutServiceProvider::class,
    ...
    ScoutEngines\Elasticsearch\ElasticsearchProvider::class,
],
```

### Add the elastic search configuration

[](#add-the-elastic-search-configuration)

Add the following to your scout configuration:

```
// config/scout.php
// Set your driver to elasticsearch
    'driver' => env('SCOUT_DRIVER', 'elasticsearch'),

...
    'elasticsearch' => [
        'debug' => false,
        'hosts' => [
            env('ELASTICSEARCH_HOST', 'http://localhost'),
        ],
    ],
...
```

Upgrading from 1.x -&gt; 2.x
----------------------------

[](#upgrading-from-1x---2x)

If you are upgrading from 1.x -&gt; 2.x and are using an elastic server version &lt; 7.x you will need to constrain the version of the base elastic driver used in your composer.json. For example if you're running 6.x:

```
composer require elasticsearch/elasticsearch:^6.0

```

\*\* Remember: When you upgrade your server version to 7.x you will need to remove the package or upgrade it to the 7.x driver. \*\*

Usage
-----

[](#usage)

Now you can use Laravel Scout as described in the [official documentation](https://laravel.com/docs/5.8/scout)

Credits
-------

[](#credits)

- [Oliver Green](https://github.com/olsgreen)
- [Erick Tamayo](https://github.com/ericktamayo)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~459 days

Total

5

Last Release

811d ago

Major Versions

0.9.0 → 1.02020-03-03

1.1 → 2.02021-05-23

PHP version history (2 changes)0.9.0PHP &gt;=7.0

2.0PHP ^7.2|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c7480518d69b3d7e1f985e9f8b7f5aaf43f4cdeac87bda4eeb832c75f21f0d27?d=identicon)[olsgreen](/maintainers/olsgreen)

---

Top Contributors

[![olsgreen](https://avatars.githubusercontent.com/u/1324164?v=4)](https://github.com/olsgreen "olsgreen (19 commits)")

---

Tags

elasticsearchelasticsearch-driverlaravellaravel-scoutlaravelawselasticsearchelasticscoutelasticsearch service

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/boxed-code-laravel-scout-elasticsearch/health.svg)

```
[![Health](https://phpackages.com/badges/boxed-code-laravel-scout-elasticsearch/health.svg)](https://phpackages.com/packages/boxed-code-laravel-scout-elasticsearch)
```

###  Alternatives

[jeroen-g/explorer

Next-gen Elasticsearch driver for Laravel Scout.

399672.8k](/packages/jeroen-g-explorer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
