{"repo":"designmynight/laravel-elasticsearch","free":true,"listed":false,"github":"https://github.com/designmynight/laravel-elasticsearch","clone":"git clone https://github.com/designmynight/laravel-elasticsearch.git","description":"Use Elasticsearch as a database in Laravel to retrieve Eloquent models and perform aggregations.","language":"PHP","stars":30,"topics":["laravel","elasticsearch","eloquent","eloquent-models","laravel-framework","shared"],"license":"MIT","category":"databases-storage","readme_excerpt":"laravel-elasticsearch Use Elasticsearch as a database in Laravel to retrieve Eloquent models and perform aggregations. Build Elasticsearch queries as you're used to with Eloquent, and get Model instances in return, with some nice extras: - Use query , filter and postFilter query types - Perform geo searches - Build and perform complex aggregations on your data - Use the Elasticsearch scroll API to retrieve large numbers of results Versions Depending on your version of Elasticsearch you can use the following version of this package Elasticsearch Laravel Elasticsearch :-------------- :---------------------- = 7.0, = 6.6, = 5.0, < 6.0 4 Setup Add elasticsearch connection configuration to database.php Create or update your base Model.php class to override newEloquentBuilder() and newBaseQueryBuilder() : Search You're now ready to carry out searches on your data. The query will look for an Elasticsearch index with the same name as the database table that your models reside in. Aggregations Aggregations can be added to a query with an approach that's similar to querying Elasticsearch directly, using nested functions rather than nested arrays. The aggregation() method takes three or four arguments: 1. A key to be used for the aggregation 2. The type of aggregation, such as 'filter' or 'terms' 3. (Optional) A callback or array providing options for the aggregation 4. (Optional) A function allowing you to provide further sub-aggregations Geo queries You can filter search results by di","default_branch":null,"files":null,"tree":[],"storefront":"/r/designmynight","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/designmynight/laravel-elasticsearch/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}