glue-agency/craft-elastic-app-search
Composer 安装命令:
composer require glue-agency/craft-elastic-app-search
包简介
Index Craft Entries to Elastic App Search
README 文档
README
Index Craft Entries to Elastic App Search
Requirements
This plugin requires Craft CMS 4.0.0 or later, and PHP 8.0.2 or later.
Installation
You can install this plugin from the Plugin Store or with Composer.
From the Plugin Store
Go to the Plugin Store in your project’s Control Panel and search for “Elastic App Search”. Then press “Install”.
With Composer
Open your terminal and run the following commands:
# go to the project directory cd /path/to/my-project.test # tell Composer to load the plugin composer require glue-agency/craft-elastic-app-search # tell Craft to install the plugin ./craft plugin/install elastic-app-search
Usage
Backend
WIP
Frontend
Install the elasticsearch @elastic/app-search-javascript package.
The ElasticAppSearch Plugin config elastic-app-search.php has a setting exposeJsVars. When this is set to true,
you are able to access the searchKey endpointBase and engineName that are needed to setup the Elastic Client.
Setup the Client
ElasticAppSearch.createClient({ searchKey: window.elasticAppSearch.searchKey, endpointBase: window.elasticAppSearch.endpointBase, engineName: window.elasticAppSearch.engineName });
Configuration
If you create a elastic-app-search.php file in the config folder you can overwrite the following plugin settings. The config file supports multi env setup.
<?php return [ /** * Connection settings */ 'endpoint' => 'https://your-endpoint.found.io', 'port' => '9200', /** * Authentication * * Supported auth keys: "basic", "apiKey", "token" * * Each auth key requires different settings: * basic: "username", "password" * apiKey: "apiKey" * token: "token" */ 'auth' => 'apiKey', 'apiKey' => 'private-xxxxxxxxxxxxxxxxxxxx', /** * Search */ 'searchKey' => 'search-xxxxxxxxxxxxxxxxxxxx', /** * Sites * * Manage Site indexing and linked indexes. Always requires * the "enabled" and "index" key for each indexable site. * Missing sites will not be indexed. */ 'sites' => [ 'site_nl' => [ 'enabled' => true, 'index' => 'site_index_nl', ], 'site_en' => [ 'enabled' => true, 'index' => 'site_index_en', ], ], ];
glue-agency/craft-elastic-app-search 适用场景与选型建议
glue-agency/craft-elastic-app-search 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 144 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 08 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 glue-agency/craft-elastic-app-search 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 glue-agency/craft-elastic-app-search 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 144
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: mit
- 更新时间: 2023-08-01