{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/20681","repository_url":"https://api.github.com/repos/joomla/joomla-cms","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/20681/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/20681/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/20681/events","html_url":"https://github.com/joomla/joomla-cms/pull/20681","id":330039604,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkzMTQ1OTM3","number":20681,"title":"[4.0] com_finder: add search statistics","user":{"login":"Hackwar","id":313866,"node_id":"MDQ6VXNlcjMxMzg2Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/313866?v=4","gravatar_id":"","url":"https://api.github.com/users/Hackwar","html_url":"https://github.com/Hackwar","followers_url":"https://api.github.com/users/Hackwar/followers","following_url":"https://api.github.com/users/Hackwar/following{/other_user}","gists_url":"https://api.github.com/users/Hackwar/gists{/gist_id}","starred_url":"https://api.github.com/users/Hackwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hackwar/subscriptions","organizations_url":"https://api.github.com/users/Hackwar/orgs","repos_url":"https://api.github.com/users/Hackwar/repos","events_url":"https://api.github.com/users/Hackwar/events{/privacy}","received_events_url":"https://api.github.com/users/Hackwar/received_events","type":"User","site_admin":false},"labels":[{"id":198658453,"node_id":"MDU6TGFiZWwxOTg2NTg0NTM=","url":"https://api.github.com/repos/joomla/joomla-cms/labels/Language%20Change","name":"Language Change","color":"eb6420","default":false},{"id":444033883,"node_id":"MDU6TGFiZWw0NDQwMzM4ODM=","url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-4.0-dev","name":"PR-4.0-dev","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2018-06-06T21:28:40Z","updated_at":"2018-06-26T17:57:28Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/20681","html_url":"https://github.com/joomla/joomla-cms/pull/20681","diff_url":"https://github.com/joomla/joomla-cms/pull/20681.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/20681.patch"},"body":"Smart Search right now has no own logging, but instead uses the crappy logging of com_search, which itself is from Mambo times... The logging of com_search only logs the search term and the number of times that it was searched for and while there is an idea that it should log the statistics separately for both com_search and com_finder, it can't even distinguish between the two... \r\n\r\nAnyway, this PR is based on issue #17437 and for now immitates the logging of com_search. In the component configuration I renamed the option to enable the logging to something that is a bit more descriptive. Then I added a new table for the logging data and in that table we now store the search term, the query object, the number of times this specific search was executed (including the filter settings), the number of given results for this and an md5sum to compare searches easily.\r\nIn the backend we have a new view, copied over from com_search mainly and updated to com_finder, that displays the statistics. At the top we have a button to reset these stats.\r\n\r\nThis PR implements the statistics that are part of com_search in com_finder, so that we can drop com_search and I would call this PR ready for now. In a second step, I would like to improve the FinderIndexerQuery class and the display of the stats to also display the filters of that search query and the language. But to be honest, I don't know how to display this nicely right now and I wanted to get this PR out there. So that would be part of another PR.\r\n\r\n@alikon Can you check if I did the Postgres queries right? I didn't test those and just modeled them after the other queries that we have so far.\r\n\r\nThis removes a blocker for #20637"},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/400407301","html_url":"https://github.com/joomla/joomla-cms/pull/20681#issuecomment-400407301","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/20681","id":400407301,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDQwNzMwMQ==","user":{"login":"carlitorweb","id":3956472,"node_id":"MDQ6VXNlcjM5NTY0NzI=","avatar_url":"https://avatars3.githubusercontent.com/u/3956472?v=4","gravatar_id":"","url":"https://api.github.com/users/carlitorweb","html_url":"https://github.com/carlitorweb","followers_url":"https://api.github.com/users/carlitorweb/followers","following_url":"https://api.github.com/users/carlitorweb/following{/other_user}","gists_url":"https://api.github.com/users/carlitorweb/gists{/gist_id}","starred_url":"https://api.github.com/users/carlitorweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlitorweb/subscriptions","organizations_url":"https://api.github.com/users/carlitorweb/orgs","repos_url":"https://api.github.com/users/carlitorweb/repos","events_url":"https://api.github.com/users/carlitorweb/events{/privacy}","received_events_url":"https://api.github.com/users/carlitorweb/received_events","type":"User","site_admin":false},"created_at":"2018-06-26T17:57:28Z","updated_at":"2018-06-26T17:57:28Z","author_association":"NONE","body":"Then, my local environment no was so crazy when I had this warning ;) ."}}
{"actor":{"display_login":"carlitorweb"}}