Support » Plugin: Relevanssi - A Better Search » Filter Request (w/ solution)

  • Resolved justin_k

    (@justin_k)


    Hey Mikko,

    I have a small request: would you be willing to stick a filter at the beginning of relevanssi_get_comments(), like:

    if(apply_filters('relevanssi_index_comments_exclude', $postID)) return "";

    This would allow the exclusion of comments on specific posts from being indexed, without needing to exclude the post entirely:

    add_filter('relevanssi_index_comments_exclude', 'jgk_relevanssi_excludecomments');
    function jgk_relevanssi_excludecomments($postID)
    {
        if($postID == 6493) return true;
    }

    It’d be much appreciated. I really like the ability to index comments, but I have just ONE page with a ridiculous number of comments (thousands), the indexing of which makes search time blow up from ~1s to >30s. By just excluding those, I could continue to enjoy comment-indexing in general without the penalty of just that one page.

    Thanks in advance! 🙂

    http://wordpress.org/extend/plugins/relevanssi/

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Filter Request (w/ solution)’ is closed to new replies.