PHPackages                             marmark0/explorer - 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. marmark0/explorer

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

marmark0/explorer
=================

Next-gen Elasticsearch driver for Laravel Scout.

v3.12.1(2y ago)03MITPHPPHP 8.0.\*||8.1.\*||8.2.\*||8.3.\*

Since Mar 15Pushed 2y agoCompare

[ Source](https://github.com/MaRmARk0/Explorer)[ Packagist](https://packagist.org/packages/marmark0/explorer)[ Docs](https://jeroen-g.github.io/Explorer/)[ RSS](/packages/marmark0-explorer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (12)Versions (2)Used By (0)

Explorer
========

[](#explorer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9736a2aae650d1e91c45f4e6f2da1145ade02b517f3935416c973b3a733e45ca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a65726f656e2d672f6578706c6f7265722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jeroen-g/explorer)

[![CI](https://github.com/Jeroen-G/Explorer/actions/workflows/ci.yml/badge.svg)](https://github.com/Jeroen-G/Explorer/actions/workflows/ci.yml)

Next-gen Elasticsearch driver for Laravel Scout with the power of Elasticsearch's queries.

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

[](#installation)

Via Composer

```
composer require marmark0/explorer
```

You will need the configuration file to define your indexes:

```
php artisan vendor:publish --tag=explorer.config
```

Also do not forget to follow the [installation instructions for Laravel Scout](https://laravel.com/docs/scout#installation), and in your Laravel Scout config, set the driver to `elastic`.

Usage
-----

[](#usage)

Be sure to also have a look at the [docs](docs/index.md) to see what is possible! There is also a [demo app](https://github.com/Jeroen-G/explorer-demo) available that might be insightful.

### Configuration

[](#configuration)

You may either define the mapping for you index in the config file:

```
return [
    'indexes' => [
        'posts_index' => [
            'properties' => [
                'id' => 'keyword',
                'title' => 'text',
            ],
        ]
    ]
];
```

Or you may define the model for the index, and the rest will be decided for you:

```
return [
    'indexes' => [
        \App\Models\Post::class
    ],
];
```

In the last case you may implement the `Explored` interface and overwrite the mapping with the `mappableAs()` function.

Essentially this means that it is up to you whether you like having it all together in the model, or separately in the config file.

### Advanced queries

[](#advanced-queries)

The documentation of Laravel Scout states that "more advanced "where" clauses are not currently supported". Only a simple check for ID is possible besides the standard fuzzy term search:

```
$posts = Post::search('lorem ipsum')->get();
```

Explorer expands your possibilities using query builders to write more complex queries.

For example, to get all posts that:

- are published
- have "lorem" somewhere in the document
- have "ipsum" in the title
- maybe have a tag "featured", if so boost its score by 2

You could execute this search query:

```
$posts = Post::search('lorem')
    ->must(new Matching('title', 'ipsum'))
    ->should(new Terms('tags', ['featured'], 2))
    ->filter(new Term('published', true))
    ->get();
```

### Commands

[](#commands)

Be sure you have configured your indexes first in `config/explorer.php` and run the Scout commands.

#### Searching indexes

[](#searching-indexes)

```
php artisan elastic:search "App\Models\Post" lorem
```

Changelog
---------

[](#changelog)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Jeroen](https://github.com/jeroen-g)
- [Vincent](https://github.com/blackshadev)
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66% 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

Unknown

Total

1

Last Release

792d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e9933f4e420ed85b36a25a3d96eecbb61ab696aeadb2842c2245051b760dede?d=identicon)[MaRmARk0](/maintainers/MaRmARk0)

---

Top Contributors

[![Jeroen-G](https://avatars.githubusercontent.com/u/1116853?v=4)](https://github.com/Jeroen-G "Jeroen-G (278 commits)")[![blackshadev](https://avatars.githubusercontent.com/u/2979104?v=4)](https://github.com/blackshadev "blackshadev (76 commits)")[![a-drew](https://avatars.githubusercontent.com/u/6550234?v=4)](https://github.com/a-drew "a-drew (14 commits)")[![4ice](https://avatars.githubusercontent.com/u/6935261?v=4)](https://github.com/4ice "4ice (7 commits)")[![askdkc](https://avatars.githubusercontent.com/u/7894265?v=4)](https://github.com/askdkc "askdkc (6 commits)")[![AiAe](https://avatars.githubusercontent.com/u/3695158?v=4)](https://github.com/AiAe "AiAe (5 commits)")[![JakubMerkandi](https://avatars.githubusercontent.com/u/145023659?v=4)](https://github.com/JakubMerkandi "JakubMerkandi (4 commits)")[![Ar0010r](https://avatars.githubusercontent.com/u/47714178?v=4)](https://github.com/Ar0010r "Ar0010r (4 commits)")[![enrise-mbraam](https://avatars.githubusercontent.com/u/118975804?v=4)](https://github.com/enrise-mbraam "enrise-mbraam (4 commits)")[![quintenbuis](https://avatars.githubusercontent.com/u/36452184?v=4)](https://github.com/quintenbuis "quintenbuis (3 commits)")[![thecaliskan](https://avatars.githubusercontent.com/u/13554944?v=4)](https://github.com/thecaliskan "thecaliskan (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![MaRmARk0](https://avatars.githubusercontent.com/u/1789741?v=4)](https://github.com/MaRmARk0 "MaRmARk0 (2 commits)")[![AndersMagnusson-AngryCreative](https://avatars.githubusercontent.com/u/59443484?v=4)](https://github.com/AndersMagnusson-AngryCreative "AndersMagnusson-AngryCreative (1 commits)")[![alevani](https://avatars.githubusercontent.com/u/28229423?v=4)](https://github.com/alevani "alevani (1 commits)")[![Jhnbrn90](https://avatars.githubusercontent.com/u/24190396?v=4)](https://github.com/Jhnbrn90 "Jhnbrn90 (1 commits)")[![jvitasek](https://avatars.githubusercontent.com/u/8986306?v=4)](https://github.com/jvitasek "jvitasek (1 commits)")[![chrsz](https://avatars.githubusercontent.com/u/16120752?v=4)](https://github.com/chrsz "chrsz (1 commits)")[![miyasinarafat](https://avatars.githubusercontent.com/u/16781160?v=4)](https://github.com/miyasinarafat "miyasinarafat (1 commits)")[![naczu](https://avatars.githubusercontent.com/u/3453734?v=4)](https://github.com/naczu "naczu (1 commits)")

---

Tags

searchlaravelelasticsearchelasticexplorerscout

###  Code Quality

TestsPHPUnit

Code StyleECS

### Embed Badge

![Health badge](/badges/marmark0-explorer/health.svg)

```
[![Health](https://phpackages.com/badges/marmark0-explorer/health.svg)](https://phpackages.com/packages/marmark0-explorer)
```

###  Alternatives

[jeroen-g/explorer

Next-gen Elasticsearch driver for Laravel Scout.

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

PHPackages © 2026

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