code711/solrtools
Composer 安装命令:
composer require code711/solrtools
包简介
A set of CLI tools to manage Solr indexes for multi site setups
README 文档
README
This Extension provides CLI Tools to initialize the EXT:solr index queues from the command line, and to scan for file-references in the content to add the corresponding sites to the sys_file metadata where a file is being used.
The tools are aimed for installations with multiple sites. They will not do anything what could not be done in the TYPO3 Backend, but might save some time, or might be usefull in certain CI/CD Situations.
Additionally, a SolrEntityInterface is available for Extbase Models to update the solr index of a record if it has been changed through extbase in the frontend (similar to EXT:slug_extbase )
Changelog
2.0.8
- added command solr:tools:indexqueueworker - this runs the indexer on all sites
2.0.1
- Support of TYPO3 v11-v12
- SolrfilemetaCommand.php does not set 'enable_indexing' for files on hidden pages or pages with restricted FE user access anymore
2.0.0
- Support of TYPO3 v11-v12
- SolrfilemetaCommand.php does not set 'enable_indexing' for files on hidden pages or pages with restricted FE user access anymore
1.2.0
- better handling of non-solr-configured sites
- added possibility to use the keyword 'all' with option -w/--what to create indexes for all configured tables in a site
1.1.1
- better identifier for events
1.1.0
- added
Code711\SolrTools\Interfaces\SolrEntityInterfaceto enable Extbase models to update its index when persisted through extbase
1.0.2
- added promised but missing scan for file-references in tt_content:header_link
1.0.1
- Updated TER Description
1.0.0
- Initial release
Code711\SolrTools\Interfaces\SolrEntityInterface
To enable this feature for your models simply add to the models class definition of your model, for example:
class MyModel extends TYPO3\CMS\Extbase\DomainObject\AbstractEntity implements \Code711\SolrTools\Interfaces\SolrEntityInterface
now when persisting an object of this class, it will check if it is indexed in solr and if yes that its index will be added or updated through the normal scheduler process. The Interface itself has no further requirements and is only used as a marker to identify the models to watch out for.
solr:tools:createindex
./vendor/bin/typo3 solr:tools:createindex --help
Description:
This tool creates (re)index tasks for solr per table and site or all sites
Usage:
solr:tools:createindex [options] [--] ...
Arguments:
site Site identifier or ALL for all sites
Options:
-w, --what=WHAT what to index (eq pages) (multiple values allowed). Enter "all" to index all configured pages
-c, --cleanup clean the solr index per site
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
This tool expects EXT:solr to be set up and configured in TYPO3.
Examples
This will create index-tasks for the table pages in all Sites and it will run cleanup before that
./vendor/bin/typo3 solr:tools:createindex -w pages --cleanup ALL
This will create index-tasks for the tables tx_news and sys_file_metadata in the sites with the identifiers customer1 and customer3
./vendor/bin/typo3 solr:tools:createindex -w tx_news -w sys_file_metadata customer1 customer3
The following will create index tasks for all tables in all sites
./vendor/bin/typo3 solr:tools:createindex -w all all
solr:tools:filemeta
This tool will search the file references table and the header_link and bodytext fields for files which match the given file extensions. It will then look up the corresponding site based on the page-id associated with the record and add that site id to the enable_indexing field provided by EXT:solr_file_indexer.
The tool will check if the element is visible (deleted=0, hidden=0) and if the page and its parent pages are visible, to ensure only 'active' files are added to the solr index.
./vendor/bin/typo3 solr:tools:filemeta --help
Description:
This tool searches for relations of files in the database and adds the correct site reference in the Files metadata, in order for EXT:solr to index those files correctly
Usage:
solr:tools:filemeta [options]
Options:
--ext[=EXT] File extensions to allow [default: ["doc","docx","pdf"]] (multiple values allowed)
-c, --cleanup clean the site field in all meta data
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
code711/solrtools 适用场景与选型建议
code711/solrtools 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 9.45k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 02 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「solr」 「typo3」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 code711/solrtools 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 code711/solrtools 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 code711/solrtools 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A bundle which extend ibexa solr search handler
This extension provides integration with solr to output content from TYPO3 in JSON format.
Laminas Module for interaction between a laminas application and a SOLR search engine using Solarium
Set Links with a specific language parameter
An Apache Solr driver for laravel scout
TYPO3 CMS extension to create gallery content element with preset crop ratios and pagination
统计信息
- 总下载量: 9.45k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-02-21