承接 silverstripe/silverstripe-discoverer 相关项目开发

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

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

silverstripe/silverstripe-discoverer

Composer 安装命令:

composer require silverstripe/silverstripe-discoverer

包简介

Service agnostic abstraction of search querying requirements

README 文档

README

Purpose

To provide you (a Silverstripe developer) with interfaces for search querying that do not change, even when you switch between different search service providers (EG: Elastic, Algolia, Silverstripe Search).

Delivery

To deliver on our purpose, the way that you perform filtering, faceting, and certainly the way that you display results, is very likely going to change. We hope that the learning curve is reasonable, and that the majority of developer interactions with this code is intuative (once you understand the mentality behind it).

You will not be able to perform any sort of "raw filtering" or "raw querying" with service specific formats, as that would not meet the purpose of this module - which is to use a common interface that will allow you to easily switch between services.

Installation

Note: this module does not function without an integration module

If you want to install this module for developing your own integration module, then you can install it with:

composer require "silverstripe/silverstripe-discoverer"

If you are planning to search through a page and controller, then you might also want to consider using Silverstripe Discoverer > Search UI

Feature support

Whether or not certain features are supported by this module. Noting that different search providers often do things in different ways, and often have different levels of support for features. This module attempts to provide a level of functionality that is commonly supported by many different services.

Feature Module support Future module support Rationale
Filters Yes Yes You should (hopefully) be able to achieve any sort of nested filtering that you require.
Facets Partial Partial Facet support differs hugely between search services. Current thinking is to try and limit what sort of Facet integrations we support (EG: no Geolocation) in the hopes that if you switch services in the future, you won't lose functionality.
Multi-search No If desired Not supported by many search services. It wouldn't be unreasonable effort to add this functionality though. Plugin modules for services without mult-search could manually perform 2 searches and combine the results.
Query suggestions (aka auto-complete) Yes Yes Query suggestions and Spelling suggestions are the same feature for some services, but a different feature for others. Discoverer treats them as different features with a common goal (providing some form of "suggestion")
Spelling suggestions (aka "did you mean") Yes Yes Query suggestions and Spelling suggestions are the same feature for some services, but a different feature for others. Discoverer treats them as different features with a common goal (providing some form of "suggestion")
Click through logging Yes Yes Supported in Elastic App Search, but not supported by many other Search Services (including Elasticsearch). This feature in particular is an example of the "silent treatment" that might be applied when a feature disappears between service providers.

Getting started

  • Querying, filtering, faceting, etc, will now all be performed through interfaces that are provided by this module. There is no ability to perform (eg) "raw filtering", or "raw faceting", where you pass data that is in a specific format for a specific search service provider. This would break the purpose of this module, since if your search service provided changed, then your "raw filtering" would also likely break.
  • This module does not assume that your search Documents relate to a DataObject, as such, it is recommended that your search Documents contain all of the data required for you to build out search results without needing to query the application for any additional information.
  • When you perform a search, you will receive a Result object that includes a PaginatedList of Record objects. The Record objects will contain any/all information that you requested during your query, and this is how you will output info into your template.
  • Fields within your Record objects will match the fields in your search index, but be converted to PascalCase, with abbreviations presented as (eg) Id, Url, etc. You can read more about this under Field convensions.

Additional documentation can also be found below:

  • Simple usage
    • Provides some basic code samples.
    • Includes a bit more detail on how Results and Records work.
  • Detailed result handling
    • Lots more information about Results, Records, pagination, analytics.
  • Detailed querying
    • Lots more information about filters, facets, sorts, and (hopefully) everything else you need to know to perform whatever sort of search you require.

Protected field names

You're mostly free to use any field names you would like when configuring your data sources, however, there are 2 methods provided in our Record class that will effectively override any field that is made available under:

  • AnalyticsData
  • DecoratedLink

Available service integration modules

silverstripe/silverstripe-discoverer 适用场景与选型建议

silverstripe/silverstripe-discoverer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.38k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2024 年 07 月 31 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 silverstripe/silverstripe-discoverer 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 9
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2024-07-31