This package offers advanced functionality for searching and filtering data in Elasticsearch.

Overview

Scout Elasticsearch Driver

💥 Introducing a new Elasticsearch ecosystem for Laravel. 💥


Packagist Packagist Build Status Donate


This package offers advanced functionality for searching and filtering data in Elasticsearch. Check out its features!

Contents

Features

Requirements

The package has been tested in the following configuration:

  • PHP version >=7.1.3, <=7.3
  • Laravel Framework version >=5.8, <=6
  • Elasticsearch version >=7

Installation

Use composer to install the package:

composer require babenkoivan/scout-elasticsearch-driver

If you are using Laravel version <= 5.4 or the package discovery is disabled, add the following providers in config/app.php:

'providers' => [
    Laravel\Scout\ScoutServiceProvider::class,
    ScoutElastic\ScoutElasticServiceProvider::class,
]

Configuration

To configure the package you need to publish settings first:

php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"
php artisan vendor:publish --provider="ScoutElastic\ScoutElasticServiceProvider"

Then, set the driver setting to elastic in the config/scout.php file (or set SCOUT_DRIVER=elastic in the .env) and configure the driver itself in the config/scout_elastic.php file. The available options are:

Option Description
client A setting hash to build Elasticsearch client. More information you can find here. By default the host is set to localhost:9200.
update_mapping The option that specifies whether to update a mapping automatically or not. By default it is set to true.
indexer Set to single for the single document indexing and to bulk for the bulk document indexing. By default is set to single.
document_refresh This option controls when updated documents appear in the search results. Can be set to 'true', 'false', 'wait_for' or null. More details about this option you can find here. By default set to null.

Note, that if you use the bulk document indexing you'll probably want to change the chunk size, you can do that in the config/scout.php file.

Index configurator

An index configurator class is used to set up settings for an Elasticsearch index. To create a new index configurator use the following artisan command:

php artisan make:index-configurator MyIndexConfigurator

It'll create the file MyIndexConfigurator.php in the app folder of your project. You can specify index name and settings like in the following example:

<?php

namespace App;

use ScoutElastic\IndexConfigurator;

class MyIndexConfigurator extends IndexConfigurator
{
    // It's not obligatory to determine name. By default it'll be a snaked class name without `IndexConfigurator` part.
    protected $name = 'my_index';  
    
    // You can specify any settings you want, for example, analyzers. 
    protected $settings = [
        'analysis' => [
            'analyzer' => [
                'es_std' => [
                    'type' => 'standard',
                    'stopwords' => '_spanish_'
                ]
            ]    
        ]
    ];
}

More about index settings you can find in the index management section of Elasticsearch documentation.

To create an index just run the artisan command:

php artisan elastic:create-index "App\MyIndexConfigurator"

Note, that every searchable model requires its own index configurator.

Indices created in Elasticsearch 6.0.0 or later may only contain a single mapping type. Indices created in 5.x with multiple mapping types will continue to function as before in Elasticsearch 6.x. Mapping types will be completely removed in Elasticsearch 7.0.0.

You can find more information here.

Searchable model

To create a model with the ability to perform search requests in an Elasticsearch index use the command:

php artisan make:searchable-model MyModel --index-configurator=MyIndexConfigurator

After executing the command you'll find the file MyModel.php in you app folder:

<?php

namespace App;

use ScoutElastic\Searchable;
use Illuminate\Database\Eloquent\Model;

class MyModel extends Model
{
    use Searchable;

    protected $indexConfigurator = MyIndexConfigurator::class;

    protected $searchRules = [
        //
    ];

    // Here you can specify a mapping for model fields
    protected $mapping = [
        'properties' => [
            'title' => [
                'type' => 'text',
                // Also you can configure multi-fields, more details you can find here https://www.elastic.co/guide/en/elasticsearch/reference/current/multi-fields.html
                'fields' => [
                    'raw' => [
                        'type' => 'keyword',
                    ]
                ]
            ],
        ]
    ];
}

Each searchable model represents an Elasticsearch type. By default a type name is the same as a table name, but you can set any type name you want through the searchableAs method. You can also specify fields which will be indexed by the driver through the toSearchableArray method. More information about these options you will find in the scout official documentation.

The last important option you can set in the MyModel class is the $searchRules property. It allows you to set different search algorithms for a model. We'll take a closer look at it in the search rules section.

After setting up a mapping in your model you can update an Elasticsearch type mapping:

php artisan elastic:update-mapping "App\MyModel"

Usage

Once you've created an index configurator, an Elasticsearch index itself and a searchable model, you are ready to go. Now you can index and search data according to the documentation.

Basic search usage example:

// set query string
App\MyModel::search('phone')
    // specify columns to select
    ->select(['title', 'price'])
    // filter 
    ->where('color', 'red')
    // sort
    ->orderBy('price', 'asc')
    // collapse by field
    ->collapse('brand')
    // set offset
    ->from(0)
    // set limit
    ->take(10)
    // get results
    ->get();

If you only need the number of matches for a query, use the count method:

App\MyModel::search('phone') 
    ->count();

If you need to load relations, use the with method:

App\MyModel::search('phone') 
    ->with('makers')
    ->get();

In addition to standard functionality the package offers you the possibility to filter data in Elasticsearch without specifying a query string:

App\MyModel::search('*')
    ->where('id', 1)
    ->get();

Also you can override model search rules:

App\MyModel::search('Brazil')
    ->rule(App\MySearchRule::class)
    ->get();

And use variety of where conditions:

App\MyModel::search('*')
    ->whereRegexp('name.raw', 'A.+')
    ->where('age', '>=', 30)
    ->whereExists('unemployed')
    ->get();

And filter out results with a score less than min_score:

App\MyModel::search('sales')
    ->minScore(1.0)
    ->get();

And add more complex sorting (geo_distance eg.)

$model = App\MyModel::search('sales')
    ->orderRaw([
       '_geo_distance' =>  [
           'coordinates' => [
               'lat'   =>  51.507351,
               'lon'   =>  -0.127758
           ],
           'order'     =>  'asc',
           'unit'      =>  'm'
       ]
    ])
    ->get();

// To retrieve sort result, use model `sortPayload` attribute:
$model->sortPayload;

At last, if you want to send a custom request, you can use the searchRaw method:

App\MyModel::searchRaw([
    'query' => [
        'bool' => [
            'must' => [
                'match' => [
                    '_all' => 'Brazil'
                ]
            ]
        ]
    ]
]);

This query will return raw response.

Console commands

Available artisan commands are listed below:

Command Arguments Description
make:index-configurator name - The name of the class Creates a new Elasticsearch index configurator.
make:searchable-model name - The name of the class Creates a new searchable model.
make:search-rule name - The name of the class Creates a new search rule.
elastic:create-index index-configurator - The index configurator class Creates an Elasticsearch index.
elastic:update-index index-configurator - The index configurator class Updates settings and mappings of an Elasticsearch index.
elastic:drop-index index-configurator - The index configurator class Drops an Elasticsearch index.
elastic:update-mapping model - The model class Updates a model mapping.
elastic:migrate-model model - The model class, target-index - The index name to migrate Migrates model to another index.

For detailed description and all available options run php artisan help [command] in the command line.

Search rules

A search rule is a class that describes how a search query will be executed. To create a search rule use the command:

php artisan make:search-rule MySearchRule

In the file app/MySearchRule.php you will find a class definition:

<?php

namespace App;

use ScoutElastic\SearchRule;

class MySearch extends SearchRule
{
    // This method returns an array, describes how to highlight the results.
    // If null is returned, no highlighting will be used. 
    public function buildHighlightPayload()
    {
        return [
            'fields' => [
                'name' => [
                    'type' => 'plain'
                ]
            ]
        ];
    }
    
    // This method returns an array, that represents bool query.
    public function buildQueryPayload()
    {
        return [
            'must' => [
                'match' => [
                    'name' => $this->builder->query
                ]
            ]
        ];
    }
}

You can read more about bool queries here and about highlighting here.

The default search rule returns the following payload:

return [
   'must' => [
       'query_string' => [
           'query' => $this->builder->query
       ]
   ]
];

This means that by default when you call search method on a model it tries to find the query string in any field.

To determine default search rules for a model just add a property:

<?php

namespace App;

use ScoutElastic\Searchable;
use Illuminate\Database\Eloquent\Model;

class MyModel extends Model
{
    use Searchable;
    
    // You can set several rules for one model. In this case, the first not empty result will be returned.
    protected $searchRules = [
        MySearchRule::class
    ];
}

You can also set a search rule in a query builder:

// You can set either a SearchRule class
App\MyModel::search('Brazil')
    ->rule(App\MySearchRule::class)
    ->get();
    
// or a callable
App\MyModel::search('Brazil')
    ->rule(function($builder) {
        return [
            'must' => [
                'match' => [
                    'Country' => $builder->query
                ]
            ]
        ];
    })
    ->get();

To retrieve highlight, use model highlight attribute:

// Let's say we highlight field `name` of `MyModel`.
$model = App\MyModel::search('Brazil')
    ->rule(App\MySearchRule::class)
    ->first();

// Now you can get raw highlighted value:
$model->highlight->name;

// or string value:
 $model->highlight->nameAsString;

Available filters

You can use different types of filters:

Method Example Description
where($field, $value) where('id', 1) Checks equality to a simple value.
where($field, $operator, $value) where('id', '>=', 1) Filters records according to a given rule. Available operators are: =, <, >, <=, >=, <>.
whereIn($field, $value) whereIn('id', [1, 2, 3]) Checks if a value is in a set of values.
whereNotIn($field, $value) whereNotIn('id', [1, 2, 3]) Checks if a value isn't in a set of values.
whereBetween($field, $value) whereBetween('price', [100, 200]) Checks if a value is in a range.
whereNotBetween($field, $value) whereNotBetween('price', [100, 200]) Checks if a value isn't in a range.
whereExists($field) whereExists('unemployed') Checks if a value is defined.
whereNotExists($field) whereNotExists('unemployed') Checks if a value isn't defined.
whereMatch($field, $value) whereMatch('tags', 'travel') Filters records matching exact value. Here you can find more about syntax.
whereNotMatch($field, $value) whereNotMatch('tags', 'travel') Filters records not matching exact value. Here you can find more about syntax.
whereRegexp($field, $value, $flags = 'ALL') whereRegexp('name.raw', 'A.+') Filters records according to a given regular expression. Here you can find more about syntax.
whereGeoDistance($field, $value, $distance) whereGeoDistance('location', [-70, 40], '1000m') Filters records according to given point and distance from it. Here you can find more about syntax.
whereGeoBoundingBox($field, array $value) whereGeoBoundingBox('location', ['top_left' => [-74.1, 40.73], 'bottom_right' => [-71.12, 40.01]]) Filters records within given boundings. Here you can find more about syntax.
whereGeoPolygon($field, array $points) whereGeoPolygon('location', [[-70, 40],[-80, 30],[-90, 20]]) Filters records within given polygon. Here you can find more about syntax.
whereGeoShape($field, array $shape, $relation = 'INTERSECTS') whereGeoShape('shape', ['type' => 'circle', 'radius' => '1km', 'coordinates' => [4, 52]], 'WITHIN') Filters records within given shape. Here you can find more about syntax.

In most cases it's better to use raw fields to filter records, i.e. not analyzed fields.

Zero downtime migration

As you might know, you can't change the type of already created field in Elasticsearch. The only choice in such case is to create a new index with necessary mapping and import your models into the new index.
A migration can take quite a long time, so to avoid downtime during the process the driver reads from the old index and writes to the new one. As soon as migration is over it starts reading from the new index and removes the old index. This is how the artisan elastic:migrate-model command works.

Before you run the command, make sure that your index configurator uses the ScoutElastic\Migratable trait. If it's not, add the trait and run the artisan elastic:update-index command using your index configurator class name as an argument:

php artisan elastic:update-index "App\MyIndexConfigurator"

When you are ready, make changes in the model mapping and run the elastic:migrate-model command using the model class as the first argument and desired index name as the second argument:

php artisan elastic:migrate-model "App\MyModel" my_index_v2

Note, that if you need just to add new fields in your mapping, use the elastic:update-mapping command.

Debug

There are two methods that can help you to analyze results of a search query:

  • explain

    App\MyModel::search('Brazil')
        ->explain();
  • profile

    App\MyModel::search('Brazil')
        ->profile();

Both methods return raw data from ES.

Besides, you can get a query payload that will be sent to ES, by calling the buildPayload method.

App\MyModel::search('Brazil')
    ->buildPayload();

Note, that this method returns a collection of payloads, because of possibility of using multiple search rules in one query.

Alternatives

Recently I've released a new Elasticsearch ecosystem for Laravel, it includes:

  • Elastic Scout Driver - a generic Elasticsearch driver for Laravel Scout. It's perfect, if you need to build a simple search in your Laravel application.
  • Elastic Scout Driver Plus - an extension for Elastic Scout Driver. If you want to take advantage of such Elasticsearch features as bool queries, highlighting, etc., it's a way to go.
  • Elastic Migrations - an easy way to create, delete or update Elasticsearch index schema and share it with your teammates. It has quite similar interface to Laravel database migrations.

If any of it sounds interesting to you and you want to get more details, please read The Ultimate Guide to Elasticsearch in Laravel Application. The article makes a good overview of the mentioned packages and provides usage examples.

FAQ:

  • Why did you create a new package instead of a new scout-elasticsearch-driver version? - I didn't want to create another all in one package for obvious reasons: no separation of concerns, not compatible with other Scout drivers, hard to test and develop, etc. As Elastic Scout Driver is a generic driver and doesn't implement all the scout-elasticsearch-driver features, it would be wrong to call it a new scout-elasticsearch-driver version.
  • What does it mean for scout-elasticsearch-driver? - Well, it's maintained by the community at the moment (thank you @iget-esoares and @lucamichot for keeping the project alive 🎉 ). I hope they will continue contributing to the project and bring a new version of scout-elasticsearch-driver in the future.
Comments
  • Always run bootSearchable method

    Always run bootSearchable method

    This PR adjusts the bootSearchable method to run each time the trait is used, which matches the behavior of the default Scout Seachable trait.

    By only running this once, we risk issues observers or macros not being available that Scout requires. We were running into an issue with our tests where the ::searachable() and ::unsearchable() methods were not available on the Eloquent builder unless we ran the test using those methods before any other tests. This is due to the application being refreshed between tests, and since the $isSearchableTraitBooted stays true, this trait wasn't being booted again and thus the macros required by Scout weren't being loaded.

    I'm sure there are other places where the current implementation could be causing issues, but the above example is just the one that we ran into.

    opened by aaronhuisinga 5
  • PHP 8 Support

    PHP 8 Support

    Hi,

    https://github.com/elastic/elasticsearch-php has just released the new package for PHP8 support. I've updated the dependencies and fixed a couple things.

    Thanks!

    opened by adithyasrinivasan 4
  • Adds ability to perform more advanced sorting.

    Adds ability to perform more advanced sorting.

    Background

    I needed to be able to sort based on distance with geo_point and get the distance returned with my model. The library already supports searching by this information, but not sorting (that I could see).

    I modified to the orderBy method to allow passing of an array for the sort field, instead of just the field name and direction (see $orderBy below for an example). This successfully let me sort by the geo_point field.

    Next, I modified the map() method to add the information that returns from the _geo_distance sort to your Eloquent model as a sortPayload property.

    Reference: https://www.elastic.co/guide/en/elasticsearch/guide/current/sorting-by-distance.html

    Example

    $geoPoint = [
            'lat' => '43.53297880',
            'lon' => '-96.73129820',
        ];
    
        $distance = '1mi';
        
        $orderBy = [
            '_geo_distance' => [
                'location' => $geoPoint,
                'order' => 'asc',
                'unit' => 'mi',
                'distance_type' => 'plane',
            ]
        ];
    
    Listing::search('*')->whereGeoDistance('location', $geoPoint, $distance)->orderBy($orderBy)->get();
    
    

    Results

    array:2 [▼
      0 => array:7 [▼
        "id" => 1
        "name" => "Kramer"
        "lat" => "42.53297880"
        "lon" => "-95.73129820"
        "created_at" => "2018-06-05 17:34:36"
        "updated_at" => "2018-06-05 17:34:36"
        "sortPayload" => array:1 [▼
          0 => 2.5084632731254E-6
        ]
      ]
      1 => array:7 [▼
        "id" => 2
        "name" => "EP HQ"
        "lat" => "44.54327940"
        "lon" => "-97.72791280"
        "created_at" => "2018-06-05 17:34:36"
        "updated_at" => "2018-06-05 17:34:36"
        "sortPayload" => array:1 [▼
          0 => 0.73162197868807
        ]
      ]
    ]```
    opened by mitchkramez 4
  • Ensure Eloquent\Collection returned after filtering

    Ensure Eloquent\Collection returned after filtering

    I encountered an error when the FilterBuilder tried to access Collection::load() on a Support Collection, and not an Eloquent Collection. This is related to #257.

    I tracked it down locally and realised that I had indexed IDs, that did not exist in the database. When the ElasticEngine maps the Eloquent Collection data, if a model was not found, null would be returned. If this happens, the Eloquent Collection is converted to a Support Collection, thus causing the error. The Collection::filter() method is called right after map to filter out the nulled values, but the collection has already been converted at this stage.

    This PR will ensure the returned collection is an Eloquent Collection.

    opened by gtjamesa 3
  • Fixed Laravel 6.8 conflict

    Fixed Laravel 6.8 conflict

    Artisan command for searchable model creating updated to fix conflict from new Laravel 6.8 version update.

    Command aliases "i" and "s" removed from repository class.

    opened by atoropin 3
  • Allow elasticsearch/elasticsearch >= 7.4.1

    Allow elasticsearch/elasticsearch >= 7.4.1

    Follow-up to #297. elasticsearch/elasticsearch 7.4.1 has been released, which fixes the BC issues introduced in 7.4.0. Therefore, we only have to exclude the broken 7.4.0 version.

    See https://github.com/ruflin/Elastica/pull/1715 for reference.

    opened by AegirLeet 3
  • Change Elasticsearch SDK version constraint to v7.3.* (Fixes #297)

    Change Elasticsearch SDK version constraint to v7.3.* (Fixes #297)

    Hi,

    This PR fixes the issue #297 caused by a breaking change on elasticsearch/elasticsearch v7.4.0.

    IMO the elasticsearch package versioning is wrong since it introduces a breaking change in a minor version. :-1:

    To fix it, I've changed our constraints to use only v7.3.*

    In the future we need to move away from types completely since ES 8 will remove it completely.

    opened by iget-esoares 3
  • Use getScoutKey instead of getKey to get the ID field

    Use getScoutKey instead of getKey to get the ID field

    This will allow us to explicitly redefine which field we want to use as an ID without having to change the base method getKey().

    Given that getScoutKey() internally calls getKey() I see no reason for this to be an breaking issue with current projects.

    All tests are passing.

    Thank you and keep up the good work!

    opened by ferpetrelli 3
  • Magic _ID support to enable multiple models in same index (post type support ES)

    Magic _ID support to enable multiple models in same index (post type support ES)

    Allows for multiple model types inside the same index, without using the deprecated “type” in ES 6.x

    Syntax for _id → tablename_id → adding the _source record is recommended → Adds a config var to disable/enable the parsing

    Please design your indexes carefully, there is a good reason why ES phases the type param. I use this magic id thing to allow certain low record count, simpel models to be indexed in the same index - who often have the same table structure.

    This is my very first pull request :) give feedback if I forgot something

    opened by Gompje 3
  • Silence notice thrown by php74 on array offset access of non-array types

    Silence notice thrown by php74 on array offset access of non-array types


    name: 🐛 Bug report -- about: PHP 7.4 Array Offset Access Throws out a Notice

    Versions

    • scout-elastic-driver: 6.8.5
    • laravel/framwork: 5.8.38
    • php: 7.4.7
    • elasticsearch: 6.8.5

    Description

    When using laravel tinker, we tried the following command:

    Model::search('text')->get(), and it outputs the following error message.

    PHP Notice: Trying to access array offset on value of type int in <project_root>/.../src/ElasticEngine.php
    

    Simple Fix

    Just a one line change using the following syntax: $not_array['key'] ?? 0. This silences the error, enabling the code to execute normally and fall back to a normal value if the key is not found.

    opened by zehao-sean-huang 2
  • Feature/optional database store

    Feature/optional database store

    Repository maintainer maybe can find prettier solution, but for my active project it is must, to be able to optionally disable data saving to database and only store it in Elasticsearch, with this solution it is possible configure database store per model.

    opened by IlmLV 2
  • Adds match filter

    Adds match filter

    It is compatible with ES 6.x, and quite important.

    PS: if you look in 7.x docs, the syntax is actually slightly changed, and will refuse it in 8.x (as a note for V4.x which still does ES communication with 6.x syntax. Probably v4 could be both tested using ES 6 and 7. I do not find yet any justifiable differences for the purpose of this package.

    opened by madalinignisca 1
  • Add option to return ElasticSearch score

    Add option to return ElasticSearch score

    When providing a set of results, you may want to return the score that ElasticSearch is providing for a result to allow the consumer to determine its validity. This change will allow the user to make a call while working with the builder that would assign the _score to the model after retrieval.

    Fixes #158.

    opened by likeadeckofcards 2
  • added support of OR operation and nested conditions

    added support of OR operation and nested conditions

    Hello.

    Thanks you for a wondering library which save my time. ElasticSearch support not only "must" (like AND) construction, it support "should" (like OR) construction too.

    Look at my implementation of this functionality.

    opened by dizews 4
  • Search Settings (Edit the body of the request)

    Search Settings (Edit the body of the request)

    Adds the ability to add data into the body of each request set in the Seachable model.

    eg: protected $searchSettings = [ 'track_total_hits' => true, ];

    opened by eqxDev 1
Releases(v4.3.0)
Owner
Ivan Babenko
Ivan Babenko
Laravel package to search through multiple Eloquent models. Supports sorting, pagination, scoped queries, eager load relationships and searching through single or multiple columns.

Laravel Cross Eloquent Search This Laravel package allows you to search through multiple Eloquent models. It supports sorting, pagination, scoped quer

Protone Media 844 Dec 25, 2022
Sphinx Search library provides SphinxQL indexing and searching features

Sphinx Search Sphinx Search library provides SphinxQL indexing and searching features. Introduction Installation Configuration (simple) Usage Search I

Ripa Club 62 Mar 14, 2022
Unmaintained: Laravel Searchy makes user driven searching easy with fuzzy search, basic string matching and more to come!

!! UNMAINTAINED !! This package is no longer maintained Please see Issue #117 Here are some links to alternatives that you may be able to use (I do no

Tom Lingham 533 Nov 25, 2022
Fulltext indexing and searching for Laravel

Laravel fulltext index and search This package creates a MySQL fulltext index for models and enables you to search through those. Install Install with

SWIS 171 Jan 4, 2023
Laravel Scout provides a driver based solution to searching your Eloquent models.

Introduction Laravel Scout provides a simple, driver-based solution for adding full-text search to your Eloquent models. Once Scout is installed and c

The Laravel Framework 1.3k Dec 31, 2022
Think-scout - A driver based solution to searching your models. Inspired By Laravel Scout

前言 whereof/think-scout根据thinkphp设计思想参考laravel/scout进行扩展 whereof/think-scout 为模型的全文搜索提供了一个简单的、基于驱动程序的解决方案。 目前,Scout 自带了一个 Elasticsearch 驱动;而编写自定义驱动程序很简

wangzhiqiang 6 Mar 18, 2022
Store and retrieve objects from Algolia or Elasticsearch

Store and retrieve objects from a search index This is an opinionated Laravel 5.1 package to store and retrieve objects from a search index. Currently

Spatie 440 Dec 30, 2022
Build and execute an Elasticsearch search query using a fluent PHP API

PACKAGE IN DEVELOPMENT, DO NOT USE YET Build and execute ElasticSearch queries using a fluent PHP API This package is a lightweight query builder for

Spatie 94 Dec 14, 2022
Search among multiple models with ElasticSearch and Laravel Scout

For PHP8 support use php8 branch For Laravel Framework < 6.0.0 use 3.x branch The package provides the perfect starting point to integrate ElasticSear

Sergey Shlyakhov 592 Dec 25, 2022
Official PHP low-level client for Elasticsearch.

elasticsearch-php Official low-level client for Elasticsearch. Its goal is to provide common ground for all Elasticsearch-related code in PHP; because

elastic 5k Dec 31, 2022
Elastica is a PHP client for elasticsearch

Elastica: elasticsearch PHP Client All documentation for Elastica can be found under Elastica.io. If you have questions, don't hesitate to ask them on

Nicolas Ruflin 2.2k Dec 23, 2022
Maps Laravel Eloquent models to Elasticsearch types

Elasticquent Elasticsearch for Eloquent Laravel Models Elasticquent makes working with Elasticsearch and Eloquent models easier by mapping them to Ela

Elasticquent 1.3k Jan 4, 2023
Elasticsearch driver for Laravel Scout

Elasticsearch driver for Laravel Scout. Contents Compatibility Installation Configuration Basic Usage Advanced Search Migrations Pitfalls Compatibilit

Ivan Babenko 197 Dec 19, 2022
Elasticsearch migrations for Laravel

Elastic Migrations Elasticsearch migrations for Laravel allow you to easily modify and share indices schema across the application's environments. Con

Ivan Babenko 151 Dec 20, 2022
Official PHP low-level client for Elasticsearch.

elasticsearch-php Official low-level client for Elasticsearch. Its goal is to provide common ground for all Elasticsearch-related code in PHP; because

elastic 5k Jan 1, 2023
Laravel 8.* Elasticsearch Eloquent

Elasticsearch Installation composer require etsetra/elasticsearch Create config file $ php artisan vendor:publish --tag="etsetra-elasticsearch-config

Etsetra 2 Jan 14, 2022
This modules provides a Search API Backend for Elasticsearch.

Search API ElasticSearch This modules provides a Search API Backend for Elasticsearch. This module uses the official Elasticsearch PHP Client. Feature

null 1 Jan 20, 2022
Search products, categories, brands or tags with ElasticSearch

ElasticSearch for Shopaholic This plugin allows you to use ElasticSearch as search engine for Shopaholic. Benefits Easy to install, easy to use Opened

Biz-Mark 4 Feb 18, 2022
Query Builder for Elasticsearch

Query Builder for Elasticsearch

wangzhiqiang 5 Mar 2, 2022