Question about Search Log


#1

Is there a way I can collect all the search queries made by anyone. I would like to examine the log more thoroughly than the current admin panel search log report?
Thank you.


(Simon Cossar) #2

If you need information about search queries that you can’t get from the admin search logs, you could try using the Data Explorer plugin. Here’s a Data Explorer query that returns search terms for a given username.

-- [params]
-- string :username

SELECT
sl.term,
COUNT(sl.term) AS query_count
FROM search_logs sl
JOIN users u
ON u.id = sl.user_id
WHERE u.username = :username
GROUP BY sl.term
ORDER BY query_count DESC

#3

Thank you for the speedy reply.
I need visitor and users (everyones) search queries all together with search count like it is on the log.
I think this is crucially important for not only me but many other discourse users who would like to reliably search, analyze, and visualize their data.
More than half of my search logs listed are incomplete words or words like “The, What, When” or words like these in nature.
Thanks