2017 © Pedro Peláez
 

library elasticsearch

Laravel's elasticsearch Paginator/Collection/Logger Helper.

image

addons/elasticsearch

Laravel's elasticsearch Paginator/Collection/Logger Helper.

  • Tuesday, July 17, 2018
  • by addons
  • Repository
  • 2 Watchers
  • 32 Stars
  • 274 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 8 Forks
  • 1 Open issues
  • 6 Versions
  • 17 % Grown

The README.md

Laravel-Elasticsearch

An easy way to use the official Elastic Search 5.x~6.x client in your Laravel 5., (*1)

Warning: This Manual is for addons/elasticsearch:3.0.0, Elasticsearch 6.x. If you use the Elasticsearch 5.x, Please visit 2.0.1, (*2)

Version

  • addons/elasticsearch:1.0.2
    • Elasticsearch 5.x
    • Laravel/Scout 3.0
    • Laravel 5.1~5.5
  • addons/elasticsearch:2.0.1
    • Elasticsearch 5.x
    • Laravel/Scout 3.0~4.0
    • Laravel 5.1~5.6
  • addons/elasticsearch:3.0.0 - master
    • Elasticsearch 6.x
    • Laravel/Scout 4.0
    • Laravel 5.1~5.6

Difference

Elasticsearch 6.0 removes(deprecats) the TYPE. (like database's table), (*3)

So We use the ES's index named env('SCOUT_PREFIX').$mode->getTable() for each table, (*4)

eg:, (*5)

.env, (*6)

SCOUT_PREFIX = my_application_name-

Index name like:, (*7)

my_application_name-users
my_application_name-roles

Example

Search like Laravel's Model

This Builder will search in ES, not Database., (*8)

User::search('must')->where('name', 'admin')->whereIn('type', ['1', '2'])->get();

Page

// page 1
User::search()->where(...)->paginate(25);

// page 4
User::search()->where(...)->paginate(25, ['*'], 'page', 4)

Read/Modify the Elastic DSL JSON

User::search('must', function($elasticsearch, &$query){
    print_r($query); // Show the DSL JSON

    // ... edit the $query.

})->where(...)->get();

elasticsearch was written by Colin Viebrock, Fly and is released under the MIT License., (*9)

Copyright (c) 2016-2018, (*10)

The Versions

17/07 2018

dev-master

9999999-dev https://www.load-page.com/manuals

Laravel's elasticsearch Paginator/Collection/Logger Helper.

  Sources   Download

MIT

The Requires

 

by Fly

laravel collection monolog elasticsearch laravel 5 l5 paginator

06/07 2018

2.0.1

2.0.1.0 https://www.load-page.com/manuals

Laravel's elasticsearch Paginator/Collection/Logger Helper.

  Sources   Download

MIT

The Requires

 

by Fly

laravel collection monolog elasticsearch laravel 5 l5 paginator

01/06 2018

2.0.0

2.0.0.0 https://www.load-page.com/manuals

Laravel's elasticsearch Paginator/Collection/Logger Helper.

  Sources   Download

MIT

The Requires

 

by Fly

laravel collection monolog elasticsearch laravel 5 l5 paginator

01/03 2018

1.0.2

1.0.2.0 https://www.load-page.com/manuals

Laravel's elasticsearch Paginator/Collection/Logger Helper.

  Sources   Download

MIT

The Requires

 

by Fly

laravel collection monolog elasticsearch laravel 5 l5 paginator

01/08 2017

1.0.1

1.0.1.0 https://www.load-page.com/manuals

Laravel's elasticsearch Paginator/Collection/Logger Helper.

  Sources   Download

MIT

The Requires

 

by Fly

laravel collection monolog elasticsearch laravel 5 l5 paginator

25/07 2017

1.0.0

1.0.0.0 https://www.load-page.com/manuals

Laravel's elasticsearch Paginator/Collection/Logger Helper.

  Sources   Download

MIT

The Requires

 

by Fly

laravel collection monolog elasticsearch laravel 5 l5 paginator