Tutorial :How do SharePoint search statistics get generated?


We have a heavily customised SharePoint publishing (WCM) site that uses no web parts in order to meet with XHTML and (AA) accessibilty guidelines. The trouble is that the search functionality is not generating any usage statistics (Usage reports within Search Administration in the SSP). We know this is down to our customisations because we have a couple of the OOTB team sites in the farm which are generating search statistics. We are not sure where/how we need to fix this. It seems we may need to wire up a call to the search.asmx web service but I'm not sure. Perhaps we need to call something from within the SharePoint API as part of our call to the search service? I'm not sure.

Has anyone out there built a heavily customised SharePoint site (no web parts) and are logging search statistics, can you comment on how you did it? Or can anyoone provide insight into how the staistics are generated?

If it helps we are running a medium sized farm with 2 WFEs, 1 Index server and 1 SQL Server box. All Windows 2003 R2 SP2, 32-Bit. MOSS 2007 SP1 (plus December CU) Enterprise Edition.

Thanks, James.


have you checked Usage Reports in the CA-->Operations tab ?


Our (intranet) site is heavily customized and the Search Usage Reports are turned on (they should be by default). You do have to enable ALL usage reporting options though, both in the SSP as in CA, the key one being "Enable search query logging.", in the SSP -> Usage reporting. I have also found that disabling / reenabling this option will sometimes help if it is already supposed to be running.

P.S. I will vote to move this question to serverfault as that is where this question belongs.


The SharePoint search statistics is only gathered when you use the standard search webparts (SearchBoxEx, CoreResultsWebPart). This is because they use an internal hidden object to perform the searches, which, in turn, logs to the statistics. AFAIK there is no way (except possibly reflection) to write to these logs when using a custom search webpart.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »