PHPackages                             jobtech/jt-opensearch-support - 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. [Search &amp; Filtering](/categories/search)
4. /
5. jobtech/jt-opensearch-support

ActiveLibrary[Search &amp; Filtering](/categories/search)

jobtech/jt-opensearch-support
=============================

Jobtech OpenSearch Support

1.0.4(1y ago)435MITPHP

Since Mar 28Pushed 1y ago2 watchersCompare

[ Source](https://github.com/jobtech-dev/laravel-opensearch)[ Packagist](https://packagist.org/packages/jobtech/jt-opensearch-support)[ RSS](/packages/jobtech-jt-opensearch-support/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (6)Used By (0)

   ![Social Card of Laravel Markable](https://camo.githubusercontent.com/674153a3d72c9241c1fe9badcaa7b772cecd890efb1782aa7c6c483264f214ab/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4a6f62746563682532304f70656e536561726368253230537570706f72742e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6a6f62746563682532466a742d6f70656e7365617263682d737570706f7274267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d4f70656e5365617263682b77726170706572266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)

Jobtech OpenSearch Support
==========================

[](#jobtech-opensearch-support)

This package makes it easy to communicate with OpenSearch

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

[](#installation)

Install the package in your application using composer

```
composer require jobtech/laravel-opensearch
```

Publish vendor

```
php artisan laravel-opensearch:install --tag="jt-opensearch-config"
```

This is the content of the published config file:

```
return [
    /*
    |--------------------------------------------------------------------------
    | Client config
    |--------------------------------------------------------------------------
    |
    | This is where client configurations are set up
    |
    */
    'client' => [
        'hosts' => [
            'host' => env('OPENSEARCH_HOST'),
        ],
        'basicAuthentication' => [env('OPENSEARCH_USER'), env('OPENSEARCH_SECRET')],
    ],

    /*
    |--------------------------------------------------------------------------
    | Indices config
    |--------------------------------------------------------------------------
    |
    | Put OpenSearch indices here
    |
    */
    'indices' => [],

    /*
    |--------------------------------------------------------------------------
    | Indices prefix
    |--------------------------------------------------------------------------
    |
    | Enter the OpenSearch prefix if you want indexes to have a specific prefix
    |
    */
    'prefix' => env('OPENSEARCH_PREFIX'),
];
```

Usage
-----

[](#usage)

Create own index that implements

```
\Jobtech\Support\OpenSearch\Contracts\Index
```

Declare in opensearch.php file your indices

```
'indices' => [
    //your index
],
```

Configure the connection parameters to OpenSearch, as host and basicAuthentication.

```
'client' => [
    'hosts' => [],
    'basicAuthentication' => [],
]
```

There is the possibility of adding a prefix to the indexes that are created with this package. The prefix is then handled automatically by the package.

```
'prefix' => [
    //your prefix
]
```

API
---

[](#api)

### existsIndex

[](#existsindex)

Returns whether or not an index already exists.

```
$bool = \Jobtech\Support\OpenSearch\Facades\IndexManager::existsIndex($index) // return OpenSearch response
```

### getIndex

[](#getindex)

This operation returns information on an index.

```
$array = \Jobtech\Support\OpenSearch\Facades\IndexManager::getIndex($index) // return OpenSearch response
```

### createIndex

[](#createindex)

An empty index can be created for later use. When creating an index, it is possible to specify its mappings, settings and aliases.

```
$array = \Jobtech\Support\OpenSearch\Facades\IndexManager::createIndex($index) // return OpenSearch response
```

### putIndexSettings

[](#putindexsettings)

Index-level settings can be updated. Dynamic index settings can be changed at any time, whereas static settings cannot be changed after the index has been created.

```
$array = \Jobtech\Support\OpenSearch\Facades\IndexManager::putIndexSettings($index) // return OpenSearch response
```

### putIndexMappings

[](#putindexmappings)

It is possible to create or add mappings and fields to an index. This operation cannot be used to update mappings that already correspond to existing data in the index.

```
$array = \Jobtech\Support\OpenSearch\Facades\IndexManager::putIndexMappings($index) // return OpenSearch response
```

### deleteIndex

[](#deleteindex)

This operation delete an index.

```
$array = \Jobtech\Support\OpenSearch\Facades\IndexManager::deleteIndex($index) // return OpenSearch response
```

### openIndex

[](#openindex)

A closed index can be opened, allowing data to be added or searched within the index.

```
$array = \Jobtech\Support\OpenSearch\Facades\IndexManager::openIndex($index) // return OpenSearch response
```

### closeIndex

[](#closeindex)

This operation closes an index. Once an index is closed, it is no longer possible to add data to it or search for data within the index.

```
$array = \Jobtech\Support\OpenSearch\Facades\IndexManager::closeIndex($index) // return OpenSearch response
```

### retrieveDocument

[](#retrievedocument)

This api permit to retrieve a document with information and data, from index with specified id.

```
$document = \Jobtech\Support\OpenSearch\Facades\DocumentManager::retrieveDocument('index', 'id') // return OpenSearch response
```

### createDocument

[](#createdocument)

It allows a document to be created with its data and a specific id.

```
$array = \Jobtech\Support\OpenSearch\Facades\DocumentManager::createDocument('index', 'id', ['']) // return OpenSearch response
```

### createDocumentWithoutId

[](#createdocumentwithoutid)

It allows a document to be created with its data and without a specific id.

```
$array = \Jobtech\Support\OpenSearch\Facades\DocumentManager::createDocumentWithoutId('index', ['']) // return OpenSearch response
```

### createDocumentFrom

[](#createdocumentfrom)

Allows you to create a document from an array of specific parameters.,

```
$array = \Jobtech\Support\OpenSearch\Facades\DocumentManager::createDocumentFrom([
    'index' => 'index',
    'id' => 'id',
    'body' => [''],
    'refresh' => true
]) // return OpenSearch response
```

### updateDocument

[](#updatedocument)

It is possible to update the fields of a document in a specific index. Is it possible specify new data to be included in the index.

```
$array = \Jobtech\Support\OpenSearch\Facades\DocumentManager::updateDocument('index', 'id', ['']) // return OpenSearch response
```

### upsertDocument

[](#upsertdocument)

Upsert is an operation that conditionally either updates an existing document or inserts a new one based on information in the object.

```
$array = \Jobtech\Support\OpenSearch\Facades\DocumentManager::upsertDocument('index', 'id', ['']) // return OpenSearch response
```

### deleteDocument

[](#deletedocument)

This operation delete a document.

```
$array = \Jobtech\Support\OpenSearch\Facades\DocumentManager::deleteDocument('index', 'id') // return OpenSearch response
```

### countDocument

[](#countdocument)

Returns how many document there are in the index.

```
$count = \Jobtech\Support\OpenSearch\Facades\DocumentManager::countDocument('index') // return OpenSearch response
```

### search

[](#search)

Allows a search request to be made to search for data in the cluster according to the required parameters.

```
$search = \Jobtech\Support\OpenSearch\Facades\SearchManager::search('index') // return OpenSearch response
```

### searchWithPagination

[](#searchwithpagination)

Allows a search request to be made to search for data in the cluster according to the required parameters. Everything is returned with a pagination.

```
$search = \Jobtech\Support\OpenSearch\Facades\SearchManager::searchWithPagination('index', 1, 10) // return OpenSearch response
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [SECURITY](SECURITY.md) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Alessandro Romano](https://github.com/Dasheel)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~21 days

Total

5

Last Release

697d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bcd582fcb8d6129305d8f72485d53593551e4ddd87ec3d322f92875f9ad4366d?d=identicon)[IlGala](/maintainers/IlGala)

---

Top Contributors

[![Dasheel](https://avatars.githubusercontent.com/u/32876274?v=4)](https://github.com/Dasheel "Dasheel (7 commits)")[![darfijt](https://avatars.githubusercontent.com/u/124694163?v=4)](https://github.com/darfijt "darfijt (3 commits)")[![ilgala](https://avatars.githubusercontent.com/u/1577699?v=4)](https://github.com/ilgala "ilgala (1 commits)")

---

Tags

jobtechjt-opensearch-support

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/jobtech-jt-opensearch-support/health.svg)

```
[![Health](https://phpackages.com/badges/jobtech-jt-opensearch-support/health.svg)](https://phpackages.com/packages/jobtech-jt-opensearch-support)
```

###  Alternatives

[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

934529.3k2](/packages/mailerlite-laravel-elasticsearch)[jeroen-g/explorer

Next-gen Elasticsearch driver for Laravel Scout.

397612.3k](/packages/jeroen-g-explorer)[swisnl/laravel-fulltext

Fulltext indexing and searching for Laravel

184104.5k6](/packages/swisnl-laravel-fulltext)[shopware/elasticsearch

Elasticsearch for Shopware

153.6M8](/packages/shopware-elasticsearch)[zing/laravel-scout-opensearch

Laravel Scout custom engine for OpenSearch

33340.2k](/packages/zing-laravel-scout-opensearch)[romanstruk/manticore-scout-engine

Laravel Manticore Scout Engine

4818.1k](/packages/romanstruk-manticore-scout-engine)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
