silverstripe/silverstripe-search-service-elastic
Composer 安装命令:
composer require silverstripe/silverstripe-search-service-elastic
包简介
Provide Elastic Enterprise Search Functionality to Silverstripe Search Service
README 文档
README
Elastic Service provider for Silverstripe Search Service.
This module uses Elastic's Enterprise Search PHP library to provide the ability to index content for an Elastic App Search engine. This module does not provide any method for performing searches on your engines - we've added some suggestions though.
Requirements
- php: ^8.1
- silverstripe/framework: ^5
- silverstripe/silverstripe-search-service: ^3
- elastic/enterprise-search: ^8.3
- guzzlehttp/guzzle: ^7
Installation
composer require silverstripe/silverstripe-search-service-elastic
Activating EnterpriseSearch
To start using EnterpriseSearch, define environment variables containing your private API key, endpoint, and prefix.
ENTERPRISE_SEARCH_ENDPOINT="https://abc123.app-search.ap-southeast-2.aws.found.io"
ENTERPRISE_SEARCH_API_KEY="private-abc123"
ENTERPRISE_SEARCH_ENGINE_PREFIX="value-excluding-index-name"
SEARCH_DASHBOARD_URL="https://abc123.app-search.kb-southeast-2.aws.found.io"
Elastic enterprise search dashboard URL(SEARCH_DASHBOARD_URL). If this matches the ENTERPRISE_SEARCH_ENDPOINT, there's no need to define it. It will automatically fall back to the value of the ENTERPRISE_SEARCH_ENDPOINT environment variable.
Configuring EnterpriseSearch
The most notable configuration surface for EnterpriseSearch is the schema, which determines how data is stored in your EnterpriseSearch index (engine). There are four types of data in EnterpriseSearch:
text(default)datenumbergeolocation
You can specify these data types in the options node of your fields.
SilverStripe\SearchService\Service\IndexConfiguration: indexes: myindex: includeClasses: SilverStripe\CMS\Model\SiteTree: fields: title: true summary_field: property: SummaryField options: type: text
Note: Be careful about whimsically changing your schema. EnterpriseSearch may need to be fully reindexed if you change the data type of a field.
Additional documentation
Majority of documentation is provided by the Silverstripe Search Service module. A couple in particular that might be useful to you are:
Searching
Elastic themselves provide a headless Search UI JS library, which can be used with vanilla JS or any framework like React, Vue, etc.
There are two main libraries:
- @elastic/search-ui-app-search-connector
- Provides a class to help you connect to your Elastic App Search API.
- @elastic/search-ui
- Provides a class that allows you to perform searches and manage your search state.
If you are using React, then there is also @elastic/react-search-ui, which provides interface components.
If you are not using React, then the creation of the view will be up to you.
silverstripe/silverstripe-search-service-elastic 适用场景与选型建议
silverstripe/silverstripe-search-service-elastic 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13.25k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 03 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 silverstripe/silverstripe-search-service-elastic 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 silverstripe/silverstripe-search-service-elastic 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 13.25k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2023-03-06