Package Data | |
---|---|
Maintainer Username: | hungneox |
Maintainer Contact: | hungnq1989@gmail.com (Hung Neo) |
Package Create Date: | 2018-01-10 |
Package Last Update: | 2018-01-21 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-23 03:11:33 |
Package Statistics | |
---|---|
Total Downloads: | 4 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 7 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Fluent Pseudo-SQL query builder for Elasticsearch built on top of Lumen Elasticsearch
Run the following command to install the package through Composer:
composer require hungneox/ramen-elastic-query
Add the following line to bootstrap/app.php:
$app->register(Neox\Ramen\Elastic\ElasticQueryServiceProvider::class);
$builder = app(Builder::class);
$result = $builder
->use('content') // collection
->from('article') // type
->find('TIYKtQX', '_id', ['id', 'title', 'description']);
$result = ES::use('content')
->from('article')
->find('TIYKtQX', '_id', ['id', 'title', 'description']);
$result = $builder->select('id', 'description')
->from('recipe')
->where('_id', '=', $id)
->get();
$result = $builder
->use('content')
->select('id', 'title', 'description', 'featured')
->from('article')
->where('title', 'like', 'Auringonkukan')
->orderBy('featured', 'desc')
->get();
ES::use('content')->from('article')->delete($id);
See LICENSE.