00228: provide a search log

Summary: provide a search log
Created: 2004-12-10 11:02
Status: Closed
Category: Feature
Priority: 5
Version: 2

Description: Please add a "search log" feature to PmWiki. Have it configurable (on/off).

Every time a user does a search, log the actual query to a text file. This file could either be accessible to PmWiki users or restricted to the admin

I have used such logs on other systems to identify topics that are frequently searched, and thus not well exposed on the site.

For example, if there are dozens of searches for "search log", I might move a link to the SearchLog page into the SideBar.

This should probably be a cookbook item.

This is also part of the reason why I switched PmWiki 2 to use a ?q= parameter for search strings instead of ?text= (PmWiki v1). Many web log analysis tools will automatically extract search terms from the web logs -- so perhaps this is another easy (and more robust) way to find what search terms are being used to access the site? It would also have the advantage of showing the search terms that led people to the site from Google and other search engines.

Anyway, a cookbook item probably needs to wait on having a good function for programmatically appending things to wiki pages. Part of the problem of "logging to a text" file is that it requires yet another web-writable directory or file in which to do that. --Pm

Why does the server log idea sound so familiar? Because that is axactly how the "log to a text file" worked in the system I mentioned. It had a server feature that allowed logging of particular events to different logs, so all of the searches were logged in one file. The disadvantage of this method is that the search entries did not appear in the main log, complicating accurate stats gathering.

The ?q= logging will serve my purposes - no need for a special file or cookbook entry. I have declared this item closed. -- NeilHerber December 10, 2004, at 12:51 PM