Search by field: state the provider contract, tighten a baseline test and add three tests

未关闭
#3,376 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
csharp

调研方向

Start by reading the documentation for SearchRequest.Fields and MatchesByField, then locate IndexesChangedInTheBaseline and the existing field search tests. Add coverage for newly hidden searchable fields, field-limited API keys over HTTP, and rebuild/write cleanup across each provider. Done when the full index line is checked, both docs define null-list behavior, and all three tests pass on every provider.

由索引模型根据 Issue 内容生成。

描述

area:testing plugin type:chore

Follow-ups from the second review of #3357 (#3263), none of which is a leak with the search plugin of the repository:

  • The contract of SearchRequest.Fields for another provider is not written down: a null list means "the searchable fields that are not hidden", not "every row of the index". A provider that indexes hidden or stale fields would return them to an unrestricted caller. State it in the documentation of Fields and of MatchesByField.
  • IndexesChangedInTheBaseline checks only that the line of ux_cms_search_entry_document contains field, then leaves the index out of both catalogs, so a change of its uniqueness or of its other columns would pass. Compare the full expected line.
  • Tests still missing:
    • a stale index row of a field that is searchable and newly hidden does not match (the present test uses a field that was never searchable);
    • a real API key with a field-limited role, over HTTP, cannot match on a hidden field;
    • a rebuild and the next write of an entry delete the rows of a field that is no longer searchable.

Acceptance

  • The documentation of Fields and MatchesByField states what a null list means
  • The baseline test compares the full line of the index
  • The three tests exist and pass on each provider
主要语言
C#
星标
567
派生
107
平均合并
1 小时 19 分钟
30 天内合并 PR
353

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

fluentcms/FluentCMS 的其他 Issue

查看 fluentcms/FluentCMS 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。