# 搜索结果应优先显示标题匹配搜索词的帖子首楼

**URL:** <https://meta.discourse.org/t/search-results-should-prioritize-first-post-in-topic-when-title-matches-search-term/175154>\
**Category:** Feature\
**Created:** [2021年一月5日 13:15 UTC](https://meta.discourse.org/t/search-results-should-prioritize-first-post-in-topic-when-title-matches-search-term/175154 "2021-01-05T13:15:39Z")\
**Posts on this page:** 4\
**Page:** 3

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2021年三月8日 01:23 UTC](https://meta.discourse.org/t/search-results-should-prioritize-first-post-in-topic-when-title-matches-search-term/175154/43 "2021-03-08T01:23:20Z")

</div>

也许……是的，在稍后阶段我们可以考虑将首帖也包含在内。不过这将是一项极其复杂的改动。

---

<div class="post-metadata">

**Author:** ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)\
**Post date:** [2021年三月9日 06:16 UTC](https://meta.discourse.org/t/search-results-should-prioritize-first-post-in-topic-when-title-matches-search-term/175154/44 "2021-03-09T06:16:46Z")

</div>

其中一个示例（如果有帮助的话）如下。理想情况下，该链接应因与主题标题完全匹配而将 [Creating and managing events](https://meta.discourse.org/t/discourse-event/149964) 这个主题作为第一个匹配结果展示，但实际上它在结果中排在第 10 位。

[https://meta.discourse.org/search?q=Discourse%20Event](https://meta.discourse.org/search?q=Discourse%20Event)

---

<div class="post-metadata">

**Author:** ![seanblue](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@seanblue](https://meta.discourse.org/u/seanblue)\
**Post date:** [2022年二月17日 12:40 UTC](https://meta.discourse.org/t/search-results-should-prioritize-first-post-in-topic-when-title-matches-search-term/175154/45 "2022-02-17T12:40:33Z")

</div>

> [@sam](#):
>
> 我刚把它（`SiteSetting.search_recent_posts_size`）改成了 250k，你只有 163k 个主题。这个改变需要几天时间才能生效，一个计划任务需要运行。

几天前我创建了一个支持主题，因为我再次无法通过搜索找到主题，但它似乎因为某种原因被删除了/未列出。这次，在 [community.wanikani.com](http://community.wanikani.com) 上搜索“本好きの下克上”这个词并没有返回所有标题包含该词的主题。它返回的两个主题是关于一个看似随机的帖子，碰巧包含了该文本，但不是第一个帖子，即使搜索词就在主题标题中。

我们已经达到了这个新的 250k 限制了吗？还需要再次增加吗？

我还想知道，即使我们现在有 250k 个主题（或者你指的是帖子？），搜索索引中的主题/帖子是如何确定的？如果按年龄，我不明白为什么我期望找到的[主题](https://community.wanikani.com/t/%E6%9C%AC%E5%A5%BD%E3%81%8D%E3%81%AE%E4%B8%8B%E5%89%8B%E4%B8%8A-volume-4-discussion-thread/50392)没有返回，因为它甚至不到一年。或者算法又有什么变化导致了这个问题？

> [@sam](#):
>
> 也许……是的，稍后我们可以考虑包含第一个帖子。但这将是一个非常复杂的变化。

已经有一段时间了，我不记得所有细节了，但是否有可能/更简单地将主题标题直接包含在搜索索引中，而不考虑主题的年龄，而不是强制第一个帖子本身始终被包含？既然你说了强制第一个帖子本身始终被包含会很复杂，我想如果你觉得有用的话，就提出一个替代想法。

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2022年二月18日 00:06 UTC](https://meta.discourse.org/t/search-results-should-prioritize-first-post-in-topic-when-title-matches-search-term/175154/46 "2022-02-18T00:06:37Z")

</div>

> [@seanblue](#):
>
> 好像被删除了/未列出，不知何故。

糟糕了 Sean，我已将其转换为私信，但已将你从列表中移除 🤦‍♂️

请查看你的私信，长篇讨论在那里。

[上一頁](https://meta.discourse.org/t/search-results-should-prioritize-first-post-in-topic-when-title-matches-search-term/175154.md?page=2)
