PHPackages                             olekjs/elasticsearch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. olekjs/elasticsearch

ActiveLibrary

olekjs/elasticsearch
====================

v1.13.0(1y ago)279[1 issues](https://github.com/olekjs/elasticsearch-laravel/issues)MITPHPPHP ^8.1

Since May 23Pushed 1y ago2 watchersCompare

[ Source](https://github.com/olekjs/elasticsearch-laravel)[ Packagist](https://packagist.org/packages/olekjs/elasticsearch)[ RSS](/packages/olekjs-elasticsearch/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (18)Used By (0)

Introduction
------------

[](#introduction)

This is a simple package that is used to integrate the Elasticsearch API with a Laravel project.

*The package is still in development.*

- [Installation](#installation)
- [Custom Indices](#custom-indices)
- [General usage](#general-usage)
- [Examples](#examples)
- [Client class reference](#client-class-reference)
- [Running Tests](#running-tests)

Installation
------------

[](#installation)

Install using composer

```
  composer require olekjs/elasticsearch
```

Set Elasticsearch base URL in `.env` file

```
ELASTICSEARCH_URL=http://localhost:9200
```

Custom Indices
--------------

[](#custom-indices)

Custom Indices work similarly to Laravel models. First, you need to define your own class that extends AbstractIndex:

```
