# Top Trending Topics doesn't seem to honour date picker/ranges

**URL:** https://meta.discourse.org/t/top-trending-topics-doesnt-seem-to-honour-date-picker-ranges/92586
**Category:** Support
**Created:** [7월 18, 2018, 12:16오전 UTC](https://meta.discourse.org/t/top-trending-topics-doesnt-seem-to-honour-date-picker-ranges/92586 "2018-07-18T00:16:46Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Mark\_Walkom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mark_walkom/32/77411_2.png) [@Mark\_Walkom](https://meta.discourse.org/u/Mark_Walkom)
#### Post date: [7월 18, 2018, 12:16오전 UTC](https://meta.discourse.org/t/top-trending-topics-doesnt-seem-to-honour-date-picker-ranges/92586/1 "2018-07-18T00:16:46Z")

</div>

You can change the time range for " Community health" reports on the admin page which then updates all the graphs. However this doesn’t apply for the “Top Trending Topics”, which is a bit of disconnect. I did try a few API calls on the report, passing in date ranges, but these also didn’t seem to have an impact either.

I’m not sure how this is calculated, is it as an all time thing, or can we bucket it up into an adjustable range?

The reason is it’d be super cool to highlight trending topics, or to use them to provide feedback to others, eg “hey this is spiking, do we need to do X or Y to reduce the friction?” or “this topic is super active, let’s do a deep dive blog post”.

---

<div class="post-metadata">

### Author: ![Mark\_Walkom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mark_walkom/32/77411_2.png) [@Mark\_Walkom](https://meta.discourse.org/u/Mark_Walkom)
#### Post date: [7월 18, 2018, 12:40오전 UTC](https://meta.discourse.org/t/top-trending-topics-doesnt-seem-to-honour-date-picker-ranges/92586/2 "2018-07-18T00:40:54Z")

</div>

Note - I know `/top/monthly` exists. I don’t know if trending is supposed to be sufficiently distinctive.

If they are complimentary then that’s totally fine 🙂

---

<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: [7월 18, 2018, 1:25오전 UTC](https://meta.discourse.org/t/top-trending-topics-doesnt-seem-to-honour-date-picker-ranges/92586/3 "2018-07-18T01:25:27Z")

</div>

Oh, the date there only refers to the charts, not to anything else on the page.

Doing top referred over a year would be pretty expensive to say the least. I am open though to adding an extra link there to explore this data in different time ranges.

The first step would be fixing this (which is linked from: `admin/reports`)

[https://meta.discourse.org/admin/reports/top\_referred\_topics?category\_id=all&end\_date=2018-07-18&start\_date=2018-06-18](https://meta.discourse.org/admin/reports/top_referred_topics?category_id=all&end_date=2018-07-18&start_date=2018-06-18)

Going to this out to @j.jaffeux list to have a look when he has a chance.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [7월 18, 2018, 1:36오전 UTC](https://meta.discourse.org/t/top-trending-topics-doesnt-seem-to-honour-date-picker-ranges/92586/5 "2018-07-18T01:36:46Z")

</div>

Something like… ?

 ![01](https://global.discourse-cdn.com/meta/original/3X/c/7/c70bc9b23e28c289da9ec08359e128cc20aae796.png)

If so it’s coming very soon 😉

---

<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: [7월 18, 2018, 1:41오전 UTC](https://meta.discourse.org/t/top-trending-topics-doesnt-seem-to-honour-date-picker-ranges/92586/6 "2018-07-18T01:41:48Z")

</div>

we need to be absolutely sure we have guards here for data overload … if the query takes longer than say 20 seconds we should say:

“Sorry, query is taking too long, please pick a shorter interval”

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [7월 18, 2018, 1:42오전 UTC](https://meta.discourse.org/t/top-trending-topics-doesnt-seem-to-honour-date-picker-ranges/92586/7 "2018-07-18T01:42:34Z")

</div>

there’s a LIMIT, doesn’t sound enough ? If I make it reasonably low (10?) is it still too risky ?

---

<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: [7월 18, 2018, 1:50오전 UTC](https://meta.discourse.org/t/top-trending-topics-doesnt-seem-to-honour-date-picker-ranges/92586/8 "2018-07-18T01:50:16Z")

</div>

Yeah that does nothing really, if we tell it to run an aggregate on 20 million rows … this can get too expensive fast. We need this thing to time out after 20 seconds and tip the user that … sorry we just can’t run that query for you.

---

<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: [7월 18, 2018, 2:26오전 UTC](https://meta.discourse.org/t/top-trending-topics-doesnt-seem-to-honour-date-picker-ranges/92586/9 "2018-07-18T02:26:34Z")

</div>

> [@j.jaffeux](#):
>
> LIMIT, doesn’t sound enough ?

I don’t know what the query looks like, but a typical problem with LIMIT is that it happens _after_ the cost has happened. That is, it’s often more like a “post” filter than a “pre” filter.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [7월 18, 2018, 2:27오전 UTC](https://meta.discourse.org/t/top-trending-topics-doesnt-seem-to-honour-date-picker-ranges/92586/10 "2018-07-18T02:27:30Z")

</div>

> [@Mittineague](#):
>
> I don’t know what the query looks like, but a typical problem with LIMIT is that it happens _after_ the cost has happened. That is, it’s often more like a “post” filter than a “pre” filter.

Here it’s simply that even one record can take a lot of time on a very large database in specific cases.

---

<div class="post-metadata">

### Author: ![Mark\_Walkom](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mark_walkom/32/77411_2.png) [@Mark\_Walkom](https://meta.discourse.org/u/Mark_Walkom)
#### Post date: [7월 18, 2018, 2:54오전 UTC](https://meta.discourse.org/t/top-trending-topics-doesnt-seem-to-honour-date-picker-ranges/92586/11 "2018-07-18T02:54:46Z")

</div>

Thanks for the feedback, looking forward to it in future release!

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [7월 23, 2018, 2:36오후 UTC](https://meta.discourse.org/t/top-trending-topics-doesnt-seem-to-honour-date-picker-ranges/92586/12 "2018-07-23T14:36:10Z")

</div>

This has been released and should be available to you at he url `/admin/reports/top_traffic_sources` at the next update.

 ![54](https://global.discourse-cdn.com/meta/original/3X/7/1/7159154f14cfcff9f594b114d1eb7e1f861d7ec0.png)

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [7월 28, 2018, 10:00오후 UTC](https://meta.discourse.org/t/top-trending-topics-doesnt-seem-to-honour-date-picker-ranges/92586/13 "2018-07-28T22:00:02Z")

</div>

This topic was automatically closed after 5 days. New replies are no longer allowed.
