How is Search Terms report produced?

I am looking to put together a SQL query to show me top search items for any given date range along with the CTR. Does anyone know how is the Search Logs report produced (it’s in …/admin/logs/search_logs?period=weekly) and especially how is the CTR calculated?

I see that there is a search_logs table, but not sure what is being looked at for CTR.

Thanks,
Oleg.

답변이 없는 오래된 주제네요, 한번 더 올려볼게요 :smiley:

특정 검색어에 대해 어떤 주제들이 클릭되었는지 확인하고 싶습니다. 이 쿼리를 찾았는데 꽤 근접한 것 같지만, 해당 테이블은 그 이후로 비추천(deprecated)된 상태인 것 같습니다:

최신 버전에서 이를 구현할 수 있는 방법이 있을까요?

:wave:

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

그리고

이 두 파일만 보면 필요한 모든 정보를 얻을 수 있습니다.