elliotsawyer / silverstripe-typesense
Typesense 是一款快速、开源的搜索引擎。无需博士学位。是 Algolia、Pinecone 的开源替代方案,也是 ElasticSearch 和 Solr 更易于使用的替代方案。它是一个快速、容错、内存模糊搜索引擎,用于构建愉悦的搜索体验。这使得 Silverstripe 能够 ...
Requires
- lekoala/silverstripe-cms-actions: ^1.7|^1.5
- php-http/curl-client: ^2.3
- silverstripe/framework: ^4.10|^5
- symbiote/silverstripe-gridfieldextensions: ^3.6|^4
- symbiote/silverstripe-multivaluefield: ^6.1.0|^5.2
- symbiote/silverstripe-queuedjobs: ^5.1|^4
- typesense/typesense-php: ^4
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2024-08-26 10:01:15 UTC
README
作者: Elliot Sawyer
仓库: https://codeberg.org/0x/silverstripe-typesense
文档: https://0x.codeberg.page/silverstripe-typesense/
在线演示: https://sawyer.nz/demos
![]() | ![]() |
---|
Typesense 是闪电般快速的开源搜索——无需博士学位!它是 Algolia 和 ElasticSearch 及 Solr 的开源替代方案,同时也是一个更易于使用的替代方案。它提供快速、容错的内存模糊搜索,用于构建愉悦的搜索体验。
此模块旨在使用 Typesense 进行索引创建可搜索的 Silverstripe 网站。它提供高性能、几乎即时的响应时间,通常在亚毫秒级别。
Typesense 支持
- 分面搜索
- 排序
- 定制搜索
- 同义词
- 范围搜索,键保护搜索
- 地理空间搜索
- 机器学习和 GPU 加速搜索
- 自动模式检测
- 分析
- 文档文本提取
- 多语言支持,包括重音符号识别和非拉丁字符。
- 联邦搜索
快速入门
在 .env 或环境变量中设置全局 API 密钥。这可以是任何值,但请确保它是保密的,不容易被猜测
#'head /dev/urandom | shasum -a 256' works great for this
TYPESENSE_API_KEY=5f02d0b58c49a99e8e8f65b74ebb9fdc5b1a2dfe56639bdc8551650900435f33
# this is your INTERNALLY accessible typesense server, not the one that appears in frontend
# see docs/07-searching.md for more info
TYPESENSE_SERVER="http://internal-hostname:8108"
# this is obtained from the Typesense dashboard, after you've started it up
# see docs/07-searching.md
TYPESENSE_SEARCH_KEY=""
安装模块
composer require elliotsawyer/silverstripe-typesense
在 CMS 中设置集合,或最初使用 YML 设置
ElliotSawyer\SilverstripeTypesense\Typesense:
collections:
Page:
name: Pages
fields:
- { name: Title, type: string, sort: true }
- { name: Content, type: string, optional: true }
- { name: Link, type: string, index: false, optional: true}
- { name: Tags, type: string[], facet: true, optional: true, sort: false}
- { name: Subsite, type: string, facet: true}
运行 vendor/bin/sake dev/tasks TypesenseSyncTask
文档
版权声明
此软件包括 Elliot Sawyer 的贡献,可在 LGPL3-With-Attribution 许可证下使用。此归属声明必须随模块一起分发,并在您的应用程序中显示。这些将在模块被使用的一些应用程序区域中显示。
支持
喜欢我的工作?如果此模块帮助您解决了问题,请考虑为我买杯咖啡或小额捐款。我接受以下地址的加密货币
- 比特币:12gSxkqVNr9QMLQMMJdWemBaRRNPghmS3p
- 比特币现金:1QETPtssFRM981TGjVg74uUX8kShcA44ni
- 莱特币:LbyhaTESx3uQvwwd9So4sGSpi4tTJLKBdz
提供付费支持。请联系 https://sawyer.nz/contact