PHPackages                             ss-wiking/elastic-orm - 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. [Database &amp; ORM](/categories/database)
4. /
5. ss-wiking/elastic-orm

ActiveLibrary[Database &amp; ORM](/categories/database)

ss-wiking/elastic-orm
=====================

Elasticsearch ORM like Eloquent

v0.3.2-alpha.3(4y ago)17[2 PRs](https://github.com/ss-wiking/elastic-orm/pulls)MITPHPPHP ^7.4|^8.0

Since Mar 9Pushed 3y ago1 watchersCompare

[ Source](https://github.com/ss-wiking/elastic-orm)[ Packagist](https://packagist.org/packages/ss-wiking/elastic-orm)[ Docs](https://github.com/ss-wiking/elastic-orm)[ RSS](/packages/ss-wiking-elastic-orm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (5)Versions (10)Used By (0)

Elasticsearch ORM like Eloquent
===============================

[](#elasticsearch-orm-like-eloquent)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8ef72462af08fcce38e8fa12a6806e8667ab288a1c7a005ca7f711a31ef77d98/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73732d77696b696e672f656c61737469632d6f726d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ss-wiking/elastic-orm)[![Total Downloads](https://camo.githubusercontent.com/6250350b942b34df3dc273a42a34ccbfcadfd61dfb0990823488ef16f74939ee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73732d77696b696e672f656c61737469632d6f726d2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ss-wiking/elastic-orm)[![GitHub Actions](https://github.com/ss-wiking/elastic-orm/actions/workflows/main.yml/badge.svg)](https://github.com/ss-wiking/elastic-orm/actions/workflows/main.yml/badge.svg)

High level Elasticsearch ORM for Laravel with query builder and models

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

[](#installation)

You can install the package via composer:

```
composer require ss-wiking/elastic-orm
```

Usage
-----

[](#usage)

### Model

[](#model)

```
use SsWiking\ElasticOrm\Model;

class Product extends Model {
    /**
     * Model index name
     * If not provided, it will be got from model name in plural form
     *
     * @var string
     */
    protected string $index = 'products';
}
```

### Query Builder via Model

[](#query-builder-via-model)

```
$products = Product::whereIn('id', $ids)
    ->whereGreaterThan('price', $minPrice)
    ->get();
```

### Query Builder via Facade

[](#query-builder-via-facade)

```
use SsWiking\ElasticOrm\Facades\ElasticOrm;

ElasticOrm::index('goods')->limit(10)->offset(10)->get();
```

### Publishing config

[](#publishing-config)

```
php artisan vendor:publish --provider="SsWiking\ElasticOrm\Providers\ElasticOrmServiceProvider" --tag=config
```

### Generate model's meta

[](#generate-models-meta)

```
php artisan elastic-orm:meta "App\Models\Elastic\YourModelName"
```

### Testing

[](#testing)

```
composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Darii Kliementiev](https://github.com/ss-wiking)
- [Official Elasticsearch PHP Library](https://github.com/elastic/elasticsearch-php)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.8% 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 ~3 days

Total

7

Last Release

1506d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1f72dff3c306e80423634b1ae31bd8a68970fd29bb7cea64a94c7a1847db4e86?d=identicon)[ss-wiking](/maintainers/ss-wiking)

---

Top Contributors

[![ss-wiking](https://avatars.githubusercontent.com/u/32016311?v=4)](https://github.com/ss-wiking "ss-wiking (15 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

ss-wikingelastic-orm

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ss-wiking-elastic-orm/health.svg)

```
[![Health](https://phpackages.com/badges/ss-wiking-elastic-orm/health.svg)](https://phpackages.com/packages/ss-wiking-elastic-orm)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[pdphilip/elasticsearch

An Elasticsearch implementation of Laravel's Eloquent ORM

145360.2k4](/packages/pdphilip-elasticsearch)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[genealabs/laravel-pivot-events

This package introduces new eloquent events for sync(), attach(), detach() or updateExistingPivot() methods on BelongsToMany relation.

1404.9M8](/packages/genealabs-laravel-pivot-events)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)

PHPackages © 2026

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