承接 roblib/solr_facet_field_formatter 相关项目开发

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

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

roblib/solr_facet_field_formatter

Composer 安装命令:

composer require roblib/solr_facet_field_formatter

包简介

Format text and string fields to link to solr facet searches

关键字:

README 文档

README

Formats a field as links into a Search API search page, pre-filtered by a Facets facet whose value is set to the field value.

For example, a "Genus" field rendered with this formatter becomes a link to your search page with the Genus facet already filtered to that value.

Supported field types

The formatter is available for every field type. The value used in the facet query is resolved per field type:

  • Reference fields (entity_reference, typed_relation, …): the referenced entity's label is used, so the facet is filtered by the readable value (e.g. the taxonomy term name) rather than the internal entity id.
  • All other fields (text, string, list, numeric, boolean, datetime, …): the field's main property value is used.

This matches how such fields are normally indexed and faceted in Solr — make sure the facet you select indexes the same readable value.

You can override this per field with the Facet value setting:

  • Automatic (default): referenced entity label for reference fields, the field value otherwise.
  • Referenced entity label: always use the referenced entity's label.
  • Raw stored value: use the stored value — the entity id for reference fields. Choose this when your facet indexes entity ids rather than labels.

Dependencies

  • search_api_solr
  • facets

Configuration

The formatter is configured per field, under Manage display for the entity (e.g. /admin/structure/types/manage/<bundle>/display). Choose the Solr Facet Field Formatter format for a text/string field and set:

  • Search page (facet source): the search results page the link points to. This determines both the URL path and the facet filter key, read from the selected facet source.
  • Facet: the facet to filter on. Pick the facet configured for this field on the chosen search page. Its URL alias is used as the facet key in the generated query.
  • Facet value: which value of the field to filter by. See Supported field types above.
  • Reset fulltext search (optional): adds an empty fulltext query parameter so following the link starts a fresh, facet-only search. The parameter name (default search_api_fulltext) is configurable to match your view's exposed fulltext filter.

The generated link matches the query string that Facets itself produces, e.g. /<search-path>?f[0]=<facet-alias>:<field-value>.

Upgrading

Earlier versions hardcoded a specific view (herbarium_search). After upgrading, each field using this formatter must be reconfigured on its Manage display page to select a facet source and facet. Until configured, the field renders as plain text.

roblib/solr_facet_field_formatter 适用场景与选型建议

roblib/solr_facet_field_formatter 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 07 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「drupal」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 roblib/solr_facet_field_formatter 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 roblib/solr_facet_field_formatter 我们能提供哪些服务?
定制开发 / 二次开发

基于 roblib/solr_facet_field_formatter 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2026-07-15