# Advanced search by post count is missing results

**URL:** https://meta.discourse.org/t/advanced-search-by-post-count-is-missing-results/53371
**Category:** Bug
**Created:** [2016 年 11 月 25 日午後 4:35 UTC](https://meta.discourse.org/t/advanced-search-by-post-count-is-missing-results/53371 "2016-11-25T16:35:55Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)
#### Post date: [2016 年 11 月 25 日午後 4:35 UTC](https://meta.discourse.org/t/advanced-search-by-post-count-is-missing-results/53371/1 "2016-11-25T16:35:56Z")

</div>

I’d expect that this search should bring up more results than it did - I know we’re capped to a maximum of 50 results, but the following only has a single result:

[https://meta.discourse.org/search?expanded=true&q=posts\_count%3A100](https://meta.discourse.org/search?expanded=true&q=posts_count%3A100)

---

<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: [2016 年 11 月 27 日午後 11:16 UTC](https://meta.discourse.org/t/advanced-search-by-post-count-is-missing-results/53371/2 "2016-11-27T23:16:50Z")

</div>

Turns out `post_count` was not correctly mapped for advanced search.

`post_count` means exact post count. Turns out only one topic has 100 posts.

Looks like we want a PR to add a `min_post_count` filter as well:

> <https://github.com/discourse/discourse/blob/main/lib/search.rb#L251-L253>

cc @cpradio

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2016 年 11 月 27 日午後 11:21 UTC](https://meta.discourse.org/t/advanced-search-by-post-count-is-missing-results/53371/3 "2016-11-27T23:21:08Z")

</div>

Ah, so the translation is wrong. Easiest thing to do right now is to change “Minimum Post Count” to be “With Post Count of”

Funny enough, I originally had it that way and changed it based on @erlend_sh’s suggestion

> [@Expandable advanced search UI panel](https://meta.discourse.org/t/expandable-advanced-search-ui-panel/48440/5):
>
> First, a few notes: Disregard the values in the drop downs, they are fake Assume that the fields related to tags, groups, categories, posted by will help you choose the type of object that belongs there Okay, so I’m finally able to get this started, would love feedback on the wording in all of the locations you see above. So with all that said, here is what each of those areas are related to, in the current “Search Help” detailing verbiage in screenshot to verbiage in help modal. …

> [@Expandable advanced search UI panel](https://meta.discourse.org/t/expandable-advanced-search-ui-panel/48440/12):
>
> I think this should be “Minimum Post Count”

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [2016 年 11 月 28 日午後 4:48 UTC](https://meta.discourse.org/t/advanced-search-by-post-count-is-missing-results/53371/4 "2016-11-28T16:48:02Z")

</div>

[https://github.com/discourse/discourse/pull/4576](https://github.com/discourse/discourse/pull/4576)

I’ve gone ahead and added support for `min_post_count`

---

<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: [2016 年 11 月 28 日午後 11:39 UTC](https://meta.discourse.org/t/advanced-search-by-post-count-is-missing-results/53371/5 "2016-11-28T23:39:51Z")

</div>


