PHPackages                             thiagoprz/vegvisir-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. thiagoprz/vegvisir-elasticsearch

ActiveLibrary

thiagoprz/vegvisir-elasticsearch
================================

Vegvisir Elasticsearch - Laravel Search Indexer

03PHP

Since May 7Pushed 4y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Vegvisir Elastic Search - Laravel Elasticsearch Indexer
=======================================================

[](#vegvisir-elastic-search---laravel-elasticsearch-indexer)

[![PHPUnit](https://github.com/thiagoprz/vegvisir-elasticsearch/actions/workflows/phpunit.yml/badge.svg?branch=main)](https://github.com/thiagoprz/vegvisir-elasticsearch/actions/workflows/phpunit.yml)

This is the elastic search adapter for the [vegvisir](https://github.com/thiagoprz/vegvisir) package which provides ability to implement search tools for boosting search performance on laravel applications. Supports direct implementation using Eloquent but also gives the possibility to use Repositories as an alternative approach.

Table of contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Contributing](#contributing)
- [Testing](#testing)
- [Support](#support)
    - [Issues](#issues)
- [License](#license)

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

[](#installation)

Install it using composer on your application: `composer require thiagoprz/vegvisir-elasticsearch`

Configuration
-------------

[](#configuration)

If necessary add the service provider to `config/app.php` (if auto discovery is enabled this not necessary):

```
..
'providers' => [
...
    \Thiagoprz\VegvisirElasticsearch\VegvisirElasticSearchServiceProvider::class,
],
...

```

Publish configuration by running `php artisan vendor:publish`.

This will add the `vegvisir.php` file to the `config` directory.

Usage
-----

[](#usage)

This adapter connects to Elasticsearch host(s) and will insert/update/delete everytime changes happen to your model.

To enable Elasticsearch Adapter you just have to add the related Service provider to your app configuration and also define the environmental variable related to your Elasticsearch hosts.

1. Enable VegvisirElasticSearchServiceProvider on config/app.php

```
