• Hey Mikko,

    A small feature I might suggest you add to the plugin:

    It would be nice if an option existed to exclude a specific user from logged queries. Why? Well, my main purpose of the logs is to evaluate what users are looking for, but since I also do a lot of testing myself, the logs become cluttered with terms that I myself have searched for. My “view count” plugin similarly omits views by the admin, only counting those from “real visitors.”

    This should be a simple matter of adding a check to relevanssi_update_log(), something like

    if( wp_get_current_user()->ID == get_option('relevanssi_omit_from_logs') )
      return;
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Mikko Saari

    (@msaari)

    That’s a good idea, and is implemented in 2.1.3. Thanks!

    Thread Starter kuprosa

    (@metal450)

    Nice, that was fast! ??

    Thread Starter kuprosa

    (@metal450)

    Oops, there’s a bug in the logic.

    Once I’ve saved “1” (the admin’s ID), then cleared it and saved with nothing, it omits all logs by anonymous users. This is because the array becomes Array ( [0] => ), and since the “anonymous user” has ID=0, in_array(wp_get_current_user()->ID, $omit) returns true – thus ommiting all logs once the textbox has been “cleared.”

    Plugin Author Mikko Saari

    (@msaari)

    Good catch. Update coming…

    Thread Starter kuprosa

    (@metal450)

    Weird…I just noticed that SOMETIMES it still seems to be logging my searches…

    This made me think of another log-related thing you might consider including, though: It would probably be handy to log the UID who performed the search, and/or their IP address – again, for Analytics-style log interpretation. While I think that at the moment the only way to view logs is by looking at the database directly, this might be the type of thing that’d come in handy when log-presentation functionality is (presumably) eventually included.

    Plugin Author Mikko Saari

    (@msaari)

    Strange.

    Sure, more stuff could be logged. The only thing the logs are used for is the “Did you mean” suggestions and the top lists at the admin panel. I’ve been waiting for people to suggest something useful for the logs.

    User id, IP – anything else that might be worth logging?

    Thread Starter kuprosa

    (@metal450)

    At the moment that’s all that occurs to me. With IPs you could do all kinds of analysis based on number of unique visitors, popular terms by country of origin, etc. And UID could help with issues like that above. You could always go a step farther and log referrer as well, but my personal thoughts are that it’d add unneeded bloat to the database, as an IP and UID are tiny values whereas a referrer could potentially be much longer (and wouldn’t reveal as much as far as summarizing results, when it comes to that.)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Relevanssi] Feature Suggestion: Omit from Logs’ is closed to new replies.