Download the PHP package ecode/laravel-scout-opensearch without Composer
On this page you can find all versions of the php package ecode/laravel-scout-opensearch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download ecode/laravel-scout-opensearch
More information about ecode/laravel-scout-opensearch
Files in ecode/laravel-scout-opensearch
Download ecode/laravel-scout-opensearch
More information about ecode/laravel-scout-opensearch
Files in ecode/laravel-scout-opensearch
Vendor ecode
Package laravel-scout-opensearch
Short Description Aliyun OpenSearch for Laravel 5.
License MIT
Package laravel-scout-opensearch
Short Description Aliyun OpenSearch for Laravel 5.
License MIT
Please rate this library. Is it a good library?
Informations about the package laravel-scout-opensearch
laravel-scout-opensearch
Laravel Scout 的阿里云 Open Search 驱动。
Installation
建议使用 composer 方式安装此包
composer require ecode/laravel-scout-opensearch
Usage
-
在阿里云 OpenSearch 控制台配置:
-
Laravel 5.5 以下,
config/app.php
中添加service provider
Ecode\\OpenSearch\\OpenSearchServiceProvider
Laravel 5.5 及以上,自动加载
service provider
,无需手动添加。 -
在 scout.php 添加配置:
-
修改
.env
配置 scout driver:SCOUT_DRIVER=opensearch
-
添加
.env
Open Search 相关配置:OPENSEARCH_ACCESS_KEY=ACCESS_KEY OPENSEARCH_ACCESS_SECRET=ACCESS_SECRET OPENSEARCH_HOST=HOST OPENSEARCH_APP_NAME=APP_NAME OPENSEARCH_SUGGEST_NAME=SUGGEST_NAME OPENSEARCH_DEBUG=true OPENSEARCH_LOG_FILE=opensearch
- 项目中使用:
- 在相应的 model 中引用
use OpenSearchable
,本例中以商品模型为例; - 在相应的控制器中进行查询
$data = Goods::search("keywords:'test'")->filter(['id','>','0'])->paginate(3)
。
- 在相应的 model 中引用
Desciption:
Based: https://github.com/ruogoo/laravel-scout-opensearch
And: https://github.com/lingxi/ali-opensearch-sdk
All versions of laravel-scout-opensearch with dependencies
PHP Build Version
Package Version
The package ecode/laravel-scout-opensearch contains the following files
Loading the files please wait ....