Support » Plugin: Relevanssi - A Better Search » [Plugin: Relevanssi – A Better Search] Relevanssi not logging searches

  • Resolved VFHwebdev


    Been running Relevanssi for a while now and decided to go see what I could learn from looking at user searches. It doesn’t appear to be logging user searches even though I have that option checked.

    The table on the User Searches dashboard shows the following:

    Today and yesterday 0
    Last 7 days 0
    Last 30 days 0
    Forever 281

    Nothing appears under Common Queries or Unsuccessful Queries.

    Any suggestions?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Mikko Saari


    Sounds like an update that didn’t upgrade the log database. Your log database has the wrong format, so Relevanssi can’t write to it.

    Try to deactivate and reactivate the plugin to see if it helps. You can also take a look at the database with phpMyAdmin or similar to see if it has an ‘ip’ column. If it doesn’t, you can add it manually (it’s a varchar(40) column).

    I don’t see an ‘ip’ column in any of the relevanssi tables and deactivating and reactivating didn’t seem to create one.

    So I added a column as you described to the table relevanssi_log.

    I’ll give it a day and see if it starts working. Thanks for the help.

    That didn’t seem to have any effect. I’ve run a couple searches (even logged out to make sure I wasn’t being filtered as a logged in user) and they’re not showing up in the log.

    I downloaded a fresh copy of the plugin, uploaded it to my web server, then deactivated and reactivated the plugin. It’s still not working. Any other ideas?

    Don’t know if this helps but it looks like my sites that were recording logs all stopped around 7/17/2012.

    Plugin Author Mikko Saari


    The logging stopped, because after the update the IP column was required and it is missing.

    If it doesn’t work with the correct database table, then I don’t know what is the problem. Make sure the logging is enabled, that the option hasn’t been turned off accidentally for some reason.

    Just to be sure I’m putting the column in the right table, the ip column goes in the relevanssi_log table right?

    Ok, I think I worked it out. I found another one of my sites where search logging was working and compared the tables.

    In the relevanssi_log table there were a number of changes I needed to make in addition to creating the ip column mentioned above.

    I also needed to change id from tinyint to bigint and add a user_id (bigint(20)) column.

    Plugin Author Mikko Saari


    Oh, ok, forgot the user_id column was changed as well. Glad to hear you figured it out.

    Can you please post the correct structure of Relevansii tables so we can all fix this problems?

    Plugin Author Mikko Saari


    You can find the correct database structure for the current version from the plugin files (see lib/init.php which is responsible for installing the database tables).

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Relevanssi – A Better Search] Relevanssi not logging searches’ is closed to new replies.