承接 directorytree/opensearch-scout-driver 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

directorytree/opensearch-scout-driver

Composer 安装命令:

composer require directorytree/opensearch-scout-driver

包简介

OpenSearch driver for Laravel Scout

README 文档

README

An OpenSearch driver for Laravel Scout.

Installation

Install the package with Composer:

composer require directorytree/opensearch-scout-driver

Publish the Scout configuration file if your application has not already done so:

php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"

Set Scout to use OpenSearch:

'driver' => env('SCOUT_DRIVER', 'opensearch'),

Publish the OpenSearch client configuration:

php artisan vendor:publish --provider="DirectoryTree\OpenSearchClient\OpenSearchClientServiceProvider"

Publish the OpenSearch Scout configuration:

php artisan vendor:publish --provider="DirectoryTree\OpenSearchScoutDriver\OpenSearchScoutServiceProvider"

Configuration

Configure the OpenSearch client connection in config/opensearch-client.php:

'default' => env('OPENSEARCH_CONNECTION', 'default'),

'connections' => [
    'default' => [
        'hosts' => [
            env('OPENSEARCH_HOST', 'localhost:9200'),
        ],
    ],
],

The Scout driver configuration is published to config/opensearch-scout.php:

'refresh_documents' => env('OPENSEARCH_SCOUT_REFRESH_DOCUMENTS', false),

Usage

Use Scout as usual:

use App\Models\Post;

$posts = Post::search('laravel')->get();

The driver converts Scout builders into OpenSearch search requests and uses the configured OpenSearch client connection to index, delete, flush, and search models.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固