Forums / Developer / Search stats

Search stats

Author Message

Ivo Lukac

Tuesday 20 October 2009 8:40:25 am

I was quite surprised that search statistics is not counted when search from template is used:
The line:

eZSearchLog::addPhrase( $searchText, $searchData["SearchCount"] );

can be only found in content/search and content/advancedsearch module.

Any ideas how to make it work?

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Gaetano Giunta

Tuesday 20 October 2009 9:52:36 am

Post an issue in the tracker? ;)

Principal Consultant International Business
Member of the Community Project Board

Gaetano Giunta

Tuesday 20 October 2009 9:55:29 am

On a more serious note: you can create a template operator that executes exactly that php call, and add it to your templates that do the within-template search.

But for the long-term sustainability, I think we should add a 'register_in_logs' param to the search fetch function.

You could even write your custom search fetch function that calls the underlying one and adds the search logging...

Principal Consultant International Business
Member of the Community Project Board

Ivo Lukac

Wednesday 21 October 2009 1:52:26 am

Template operator could be the eaZy way right now, but it should be added into search functions (not in content/search) to have more uniform solution...

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac