承接 polysource/search 相关项目开发

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

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

polysource/search

最新稳定版本:v0.1.2

Composer 安装命令:

composer require polysource/search

包简介

Polysource — global cross-resource search with Cmd+K palette UI.

README 文档

README

Cross-resource search palette (Cmd+K / Ctrl+K / "/") for Polysource — Linear / Notion-style fastest-path navigation.

Part of the Polysource monorepo. MIT-licensed.

What it ships

  • SearchResult VO + SearchProviderInterface (3 methods: id / label / search with deadline contract).
  • SearchAggregator — fan-out across tagged providers with 3 contention layers:
    1. per-provider limit
    2. total budget 250 ms
    3. try/catch isolation per provider
  • ResourceSearchProvider — default impl wrapping any Polysource Resource via DataSource::search().
  • SearchController — JSON endpoint GET /admin/search?q=….
  • SearchExtension Twig (polysource_search_palette()).
  • Stimulus cmdk_controller.js — Cmd+K / Ctrl+K / "/" hooks, debounce 150 ms, arrow-keys + Enter nav, Esc close, results grouped per resource.
  • Accessible overlay template _palette.html.twig.

See ADR-023. Future bridges (search-meilisearch, search-algolia, search-elasticsearch) extend via SearchProviderInterface.

Extend it

SearchProviderInterface is 3 methods (getId / getLabel / search). To plug Algolia, Elasticsearch, your custom service into the Cmd+K palette:

#[AutoconfigureTag('polysource.search.provider')]
final class AlgoliaSearchProvider implements SearchProviderInterface
{
    public function getId(): string { return 'algolia:products'; }
    public function getLabel(): string { return 'Products (Algolia)'; }
    public function search(string $query, int $limit, float $deadline): array
    {
        // Respect the deadline; the aggregator enforces a 250ms global budget.
    }
}

Done. The aggregator fan-outs across every tagged provider. See extensibility map.

Install

composer require polysource/search

Register the bundle:

return [
    Polysource\Search\PolysourceSearchBundle::class => ['all' => true],
];

Documentation

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固