2017 © Pedro Peláez
 

library ramen-elastic-query

Lumen/Laravel package for interacting with elasticsearch

image

hungneox/ramen-elastic-query

Lumen/Laravel package for interacting with elasticsearch

  • Sunday, January 21, 2018
  • by hungneox
  • Repository
  • 1 Watchers
  • 6 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Ramen Elastic Query (In development)

Build Status, (*1)

Fluent Pseudo-SQL query builder for Elasticsearch built on top of Lumen Elasticsearch, (*2)

Installation

Run the following command to install the package through Composer:, (*3)

composer require hungneox/ramen-elastic-query

Add the following line to bootstrap/app.php:, (*4)

$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., (*5)

The Versions

21/01 2018

dev-master

9999999-dev

Lumen/Laravel package for interacting with elasticsearch

  Sources   Download

MIT

The Requires

 

The Development Requires

by Hung Neo

command elasticsearch utility laravel-package lumen-package