# Show only liked posts in a thread

**URL:** https://meta.discourse.org/t/show-only-liked-posts-in-a-thread/27460
**Category:** Feature
**Created:** [11 באפריל,‏ 2015,‏ 8:51pm UTC](https://meta.discourse.org/t/show-only-liked-posts-in-a-thread/27460 "2015-04-11T20:51:32Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![rubo77](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rubo77/32/41019_2.png) [@rubo77](https://meta.discourse.org/u/rubo77)
#### Post date: [11 באפריל,‏ 2015,‏ 8:51pm UTC](https://meta.discourse.org/t/show-only-liked-posts-in-a-thread/27460/1 "2015-04-11T20:51:32Z")

</div>

It would come handy if you want to get an overview of a topic with lots of posts if you could narrow down the view to only posts that have at least one like.

Alternatively It would already help if all posts withoul likes would be shown minimized somehow, (maybe only the first line and a more-button)

How could this be implemented?

---

<div class="post-metadata">

### Author: ![Moter8](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moter8/32/120941_2.png) [@Moter8](https://meta.discourse.org/u/Moter8)
#### Post date: [11 באפריל,‏ 2015,‏ 10:06pm UTC](https://meta.discourse.org/t/show-only-liked-posts-in-a-thread/27460/2 "2015-04-11T22:06:18Z")

</div>

That’s basically the summarize thread feature which already exists 😊

---

<div class="post-metadata">

### Author: ![rubo77](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rubo77/32/41019_2.png) [@rubo77](https://meta.discourse.org/u/rubo77)
#### Post date: [11 באפריל,‏ 2015,‏ 10:42pm UTC](https://meta.discourse.org/t/show-only-liked-posts-in-a-thread/27460/3 "2015-04-11T22:42:25Z")

</div>

But If I use Summarize it also hides some posts, that have a “like”.

What is the exact mechanism for “summarize”?

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [11 באפריל,‏ 2015,‏ 11:04pm UTC](https://meta.discourse.org/t/show-only-liked-posts-in-a-thread/27460/4 "2015-04-11T23:04:10Z")

</div>

> [@rubo77](#):
>
> But If I use Summarize it also hides some posts, that have a “like”.
> 
> What is the exact mechanism for “summarize”?

Good question. I looked a very little for the code that does the logic but didn’t find it.

Using the topic I used to answer your post in the other topic

> [@\[Superseded\] What cool badge queries have you come up with?](https://meta.discourse.org/t/what-cool-badge-queries-have-you-come-up-with/18978):
>
> warning Enabling Badge SQL entails security and performance risks so it is not available by default. For more information, see: [Enable Badge SQL](https://meta.discourse.org/t/badge-sql-can-no-longer-be-edited-by-default/47894) This topic became too long to be easily searched and has been broken down into separate topics. If you have any questions about how to write a badge query, or have one to share, please start a new topic in the #data & reporting category and tag it with the #sql-triggered-badge tag. +1 More ideas: [Some common badge queries](https://meta.discourse.org/t/some-common-badge-queries-idea/31859)

It says there is a total of 116 Likes in the topic. If my math is correct, all of the posts in the Summary have Likes, but only add up to 78

So some posts that received Likes did get collapsed.

It seems that Frequent poster may be in play, and possibly OP.

Some of the Collapsed posts had from 1 to 4 Likes.  
Some were shorter replies, some not so short.  
Some were “infrequent” posters, some were not.  
Some had cross-reference links, some did not.  
And I’m guessing there may be some kind of “keyword” matching involved.

I can’t grasp the logic and would need to see the code involved.

---

<div class="post-metadata">

### Author: ![rubo77](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rubo77/32/41019_2.png) [@rubo77](https://meta.discourse.org/u/rubo77)
#### Post date: [12 באפריל,‏ 2015,‏ 12:11am UTC](https://meta.discourse.org/t/show-only-liked-posts-in-a-thread/27460/5 "2015-04-12T00:11:03Z")

</div>

> [@Mittineague](#):
>
> would need to see the code involved.

Which exact code is involved? (I could take a look at it)

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [12 באפריל,‏ 2015,‏ 1:10am UTC](https://meta.discourse.org/t/show-only-liked-posts-in-a-thread/27460/6 "2015-04-12T01:10:33Z")

</div>

That’s what I need to know, _where_ is the code?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [12 באפריל,‏ 2015,‏ 2:27am UTC](https://meta.discourse.org/t/show-only-liked-posts-in-a-thread/27460/8 "2015-04-12T02:27:15Z")

</div>

No, that is not our repo.

---

<div class="post-metadata">

### Author: ![rubo77](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rubo77/32/41019_2.png) [@rubo77](https://meta.discourse.org/u/rubo77)
#### Post date: [12 באפריל,‏ 2015,‏ 2:37am UTC](https://meta.discourse.org/t/show-only-liked-posts-in-a-thread/27460/9 "2015-04-12T02:37:03Z")

</div>

It could be in here: [discourse/lib/filter\_best\_posts.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/lib/filter_best_posts.rb)

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [12 באפריל,‏ 2015,‏ 2:43am UTC](https://meta.discourse.org/t/show-only-liked-posts-in-a-thread/27460/10 "2015-04-12T02:43:19Z")

</div>

If that is the right file (and not used only for Digest inclusion or the Top pages) then it looks as though it uses Likes by Moderators and posts by a members Trust Level

```ruby
  def filter
    @posts = if @min_replies && @topic.posts_count < @min_replies + 1
                []
              else
                filter_posts_liked_by_moderators
                setup_posts
                filter_posts_based_on_trust_level
                filter_posts_based_on_score
                sort_posts
              end
  end

```

---

<div class="post-metadata">

### Author: ![rubo77](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rubo77/32/41019_2.png) [@rubo77](https://meta.discourse.org/u/rubo77)
#### Post date: [25 באפריל,‏ 2015,‏ 6:07am UTC](https://meta.discourse.org/t/show-only-liked-posts-in-a-thread/27460/11 "2015-04-25T06:07:32Z")

</div>

is this documented somewhere?

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [4 בדצמבר,‏ 2025,‏ 11:35am UTC](https://meta.discourse.org/t/show-only-liked-posts-in-a-thread/27460/12 "2025-12-04T11:35:51Z")

</div>


