Comment Count

Post Indexer doesn't seem to keep track of comment counts for the posts, there's no comment_count column in wp_site_posts table like there is in wp_posts.

Is there any reason for this? Would it be simple enough to just edit the plugin to add that extra column and it would dynamically update?

  • drmike

    The post indexer database table isn;t a live table like the wp_posts table is. Content isn;t sent over to the post indexer table expect for when a post is created or edited. If a post gets a comment, right now, nothing is done to the post indexer table.

    It would just be a matter of editing the plugin and adding in an additional call to the post indexer when a comment is made. The problem with that though is load. On a site like problogger which gets hundreds of comments on each and every post, you would be accessing the post indexer table over and over again. That's what we had with ITDamage's sitewide feed plugin and most of us old timers will tell you of the load problems that had. (It ran though all of the blogs on a site, grabbed the last 100 posts and created an array with all of them in there.)