PHPackages                             drizzlel/aliyun-opensearch - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. drizzlel/aliyun-opensearch

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

drizzlel/aliyun-opensearch
==========================

Aliyun open search for Laravel5

06PHP

Since Jul 3Pushed 8y ago1 watchersCompare

[ Source](https://github.com/drizzleL/aliyun-opensearch)[ Packagist](https://packagist.org/packages/drizzlel/aliyun-opensearch)[ RSS](/packages/drizzlel-aliyun-opensearch/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Aliyun Opensearch
=========================

[](#laravel-aliyun-opensearch)

Aliyun Opensearch bridge for Laravel 5

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

[](#installation)

This package can be installed through Composer.

```
composer require orzcc/aliyun-opensearch
```

Once Opensearch is installed, you need to register the service provider. Open up `config/app.php` and add the following to the `providers` key.

- `'Orzcc\Opensearch\OpensearchServiceProvider'`

You can register the Opensearch facade in the `aliases` key of your `config/app.php` file if you like.

- `'Opensearch' => 'Orzcc\Opensearch\Facades\Opensearch'`

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

[](#configuration)

Opensearch requires connection configuration.

To get started, you'll need to publish all vendor assets:

```
$ php artisan vendor:publish
```

This will create a `config/opensearch.php` file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases.

There are two config options:

##### Default Connection Name

[](#default-connection-name)

This option (`'default'`) is where you may specify which of the connections below you wish to use as your default connection for all work. Of course, you may use many connections at once using the manager class. The default value for this setting is `'main'`.

##### Opensearch Connections

[](#opensearch-connections)

This option (`'connections'`) is where each of the connections are setup for your application. Example configuration has been included, but you may add as many connections as you would like.

Usage
-----

[](#usage)

##### OpensearchManager

[](#opensearchmanager)

This is the class of most interest. It is bound to the ioc container as `'opensearch'` and can be accessed using the `Facades\Opensearch` facade. This class implements the `ManagerInterface` by extending `AbstractManager`. The interface and abstract class are both part of my [Laravel Manager](https://github.com/GrahamCampbell/Laravel-Manager) package, so you may want to go and checkout the docs for how to use the manager class over at [that repo](https://github.com/GrahamCampbell/Laravel-Manager#usage). Note that the connection class returned will always be an instance of `CloudsearchSearch`.

##### Facades\\Opensearch

[](#facadesopensearch)

This facade will dynamically pass static method calls to the `'opensearch'` object in the ioc container which by default is the `OpensearchManager` class.

##### OpensearchServiceProvider

[](#opensearchserviceprovider)

This class contains no public methods of interest. This class should be added to the providers array in `config/app.php`. This class will setup ioc bindings.

##### Real Examples

[](#real-examples)

Here you can see an example of just how simple this package is to use. Out of the box, the default adapter is `main`. After you enter your authentication and host details in the config file, it will just work:

```
use Orzcc\Opensearch\Facades\Opensearch;
// you can alias this in config/app.php if you like

// Add a new app to search
// $opensearch = Opensearch::connection('main');
// $opensearch = Opensearch::connection('app2');
$opensearch = Opensearch::connection();
$opensearch->setFormat('json');
$opensearch->setQueryString('default:阿里云');

$result = $opensearch->search();
```

The opensearch manager will behave like it is a `CloudsearchSearch` class. If you want to call specific connections, you can do with the `connection` method:

For more information on how to use the `CloudsearchSearch` class we are calling behind the scenes here, check out the docs at [http://docs.aliyun.com/#/opensearch/sdk/php&amp;sdk-doc-cloudsearchsearch](http://docs.aliyun.com/#/opensearch/sdk/php&sdk-doc-cloudsearchsearch), and the manager class at .

License
-------

[](#license)

Laravel Aliyun Opensearch is licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8423006?v=4)[drizzleL](/maintainers/drizzleL)[@drizzleL](https://github.com/drizzleL)

---

Top Contributors

[![orzcc](https://avatars.githubusercontent.com/u/402270?v=4)](https://github.com/orzcc "orzcc (10 commits)")[![daids](https://avatars.githubusercontent.com/u/1639998?v=4)](https://github.com/daids "daids (1 commits)")[![drizzleL](https://avatars.githubusercontent.com/u/8423006?v=4)](https://github.com/drizzleL "drizzleL (1 commits)")

### Embed Badge

![Health badge](/badges/drizzlel-aliyun-opensearch/health.svg)

```
[![Health](https://phpackages.com/badges/drizzlel-aliyun-opensearch/health.svg)](https://phpackages.com/packages/drizzlel-aliyun-opensearch)
```

###  Alternatives

[symfony/polyfill-php56

Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions

1.6k207.1M28](/packages/symfony-polyfill-php56)[react/event-loop

ReactPHP's core reactor event loop that libraries can use for evented I/O.

1.3k152.5M726](/packages/react-event-loop)[dompdf/php-font-lib

A library to read, parse, export and make subsets of different types of font files.

1.8k40.2M11](/packages/dompdf-php-font-lib)[symfony/lock

Creates and manages locks, a mechanism to provide exclusive access to a shared resource

514135.1M628](/packages/symfony-lock)[pear/pear_exception

The PEAR Exception base class.

9883.5M121](/packages/pear-pear-exception)[illuminate/config

The Illuminate Config package.

10943.9M2.4k](/packages/illuminate-config)

PHPackages © 2026

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