搜索词报告是如何生成的?

我想编写一个 SQL 查询,以显示任意给定日期范围内的热门搜索项及其点击率(CTR)。是否有人了解搜索日志报告(位于 …/admin/logs/search_logs?period=weekly)是如何生成的,特别是 CTR 是如何计算的?

我看到有一个 search_logs 表,但不确定 CTR 是基于哪些数据计算的。

谢谢,
Oleg。

What an old topic without an answer, let’s bump it :smiley:

I would like to find out which topics were clicked for particular search term. I found this query, which comes close, but the tables seem to be deprecated since then:

Is there any way to achieve it on the latest version?

:wave:

https://github.com/discourse/discourse/blob/master/app/models/reports/trending_search.rb

and

Should give you all you need to know.