High level Elasticsearch ORM for Laravel with query builder and models
You can install the package via composer:
composer require ss-wiking/elastic-ormuse 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';
}$products = Product::whereIn('id', $ids)
->whereGreaterThan('price', $minPrice)
->get();use SsWiking\ElasticOrm\Facades\ElasticOrm;
ElasticOrm::index('goods')->limit(10)->offset(10)->get();php artisan vendor:publish --provider="SsWiking\ElasticOrm\Providers\ElasticOrmServiceProvider" --tag=configphp artisan elastic-orm:meta "App\Models\Elastic\YourModelName"composer testPlease see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.