New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

hungneox/ramen-elastic-query

Lumen/Laravel package for interacting with elasticsearch
4 7
Install
composer require hungneox/ramen-elastic-query:dev-master
License:MIT
Last Updated:Jan 21, 2018
Links: GitHub  ·  Packagist
Maintainer: hungneox

Ramen Elastic Query (In development)

Build Status

Fluent Pseudo-SQL query builder for Elasticsearch built on top of Lumen Elasticsearch

Installation

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);

Usage

Simple select

Object initiation or Facade both work

$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']);

Normal where clause

$result = $builder->select('id', 'description')
			->from('recipe')
			->where('_id', '=', $id)
			->get();

Fulltext match

$result = $builder
            ->use('content')
            ->select('id', 'title', 'description', 'featured')
            ->from('article')
            ->where('title', 'like', 'Auringonkukan')
            ->orderBy('featured', 'desc')
            ->get();

Deletion

ES::use('content')->from('article')->delete($id);

License

See LICENSE.

Related Packages

richan-fongdasen/laravel-gcr-worker

Google Cloud Run Worker for Laravel

74,317 4
betterde/logger

Elasticsearch logger handler

32,983 30
aviationcode/elasticsearch

Laravel elasticsearch and eloquent integration

26,477 5
isswp101/elasticsearch-eloquent

Elasticsearch functionality like Laravel Eloquent models.

25,356 112
thehome/statamic-elasticsearch

Elasticsearch driver for Statamic

3,614 4