# Zoekresultaten moeten de eerste post in een onderwerp prioriteren wanneer de titel overeenkomt met de zoekterm

**URL:** https://meta.discourse.org/t/search-results-should-prioritize-first-post-in-topic-when-title-matches-search-term/175154
**Category:** Feature
**Created:** [5 januari 2021 om 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:** 1
**Showing post:** 16

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [19 januari 2021 om 02:18 UTC](https://meta.discourse.org/t/search-results-should-prioritize-first-post-in-topic-when-title-matches-search-term/175154/16 "2021-01-19T02:18:46Z")

</div>

> [@Sailsman63](#):
>
> This is non-obvious,

The idea is that we will make UX changes to make this obvious.

> [@Sailsman63](#):
>
> Perhaps consider a two-stage search?
> 
> - Search Topic Titles, matching only on `EXACT_MATCH` and `CONTAINS_ALL`
> - These get placed at the top of the results, with `EXACT_MATCH` getting priority
> 
> - Then, fill in the rest of the results using the current weighted search, _excluding_ any topic-starter posts that were caught by the first stage.

The idea is sound but I don’t think we can execute the postgres search query efficiently since there is no index support when trying to match with the `like` and `ilike` operators. Another factor to consider is that there is no way to rank exact match or contains matches. This is the reason why we rely full text search capabilities that Postgres provides.

---

_[View the full topic](https://meta.discourse.org/t/search-results-should-prioritize-first-post-in-topic-when-title-matches-search-term/175154)._
