# Searching order seems to be broken when searching in topic

**URL:** https://meta.discourse.org/t/searching-order-seems-to-be-broken-when-searching-in-topic/312303
**Category:** Bug
**Tags:** search, fixed
**Created:** [June 16, 2024, 9:54pm UTC](https://meta.discourse.org/t/searching-order-seems-to-be-broken-when-searching-in-topic/312303 "2024-06-16T21:54:16Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [June 16, 2024, 9:54pm UTC](https://meta.discourse.org/t/searching-order-seems-to-be-broken-when-searching-in-topic/312303/1 "2024-06-16T21:54:16Z")

</div>

Looking at the [topic map](https://meta.discourse.org/t/feedback-on-our-simplified-topic-map-experiment/307584) of [DiscoTOC - automatic table of contents - #438 by fbpbdmin](https://meta.discourse.org/t/discotoc-automatic-table-of-contents/111143/438), I noticed that something is not right with the most liked replies.

 ![image](https://global.discourse-cdn.com/meta/original/4X/d/4/5/d455025f208da7ebce4561d39e1802f1420c5656.png)  
The most liked post shown has 6 likes, but even the last one has 7.

Then I tried to find the three most liked posts by searching ordered by likes, but this did not work either. The results were definitely not the most liked posts. The second result was a small action post which is very unlikely to be one of the most liked posts. Then I noticed that the order was the same as when I chose relevance, most viewed, or latest topic.  
[Example link for search](https://meta.discourse.org/search?q=topic%3A111143%20%23theme-component%20order%3Alikes)  
**Edit: It seems the posts are always ordered like they appear in the topic.**

 ![image](https://global.discourse-cdn.com/meta/original/4X/a/1/7/a17f1d6292e36ae153a91d88aa83089990b810b7.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/d/1/a/d1afa8aa4df94faf948c1c786773bf8135a53c69.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/5/d/1/5d1c3853fb61b0cc85e71a4308f51c6226e88884.png)  
 ![image](https://global.discourse-cdn.com/meta/original/4X/5/3/1/5316eae2f0ebb2abe30de20bcb6670688960e86e.png)

---

_[View the full topic](https://meta.discourse.org/t/searching-order-seems-to-be-broken-when-searching-in-topic/312303)._
