Enable query logging in SharePoint Server
SharePoint Server search collects information about user search queries and search results that users select on their computers. SharePoint Server uses this information to improve the relevance of search results and to improve query suggestions. Site collection administrators, tenant administrators and administrators of the Search service application can also create reports based on this information. Query logging is enabled by default. Use this procedure to enable or disable query logging.
To enable or disable query logging
Verify that the user account performing this procedure is an administrator for the Search service application.
In Central Administration, in the Application Management section, click Manage service applications.
On the Manage Service Applications page, click the Search service application for which you want to configure query logging.
On the Search Administration page, in the System Status section, locate Query logging.
The Query logging status displays as Off Enable or On Disable.
By default, query logging is turned On. Click Disable to turn off query logging or click Enable to turn on query logging.
The option is set and no other actions are necessary. User search queries and user selected results will no longer be logged if you clicked Disable, or will now be logged if you clicked Enable.