SELECT i.type, i.sid, 5 * (5.3625104165763 * SUM(i.score * t.count)) + 5 * POW(2, (GREATEST(MAX(n.created), MAX(n.changed), COALESCE(MAX(c.last_comment_timestamp), 0)) - 1353051499) * 6.43e-8) + 5 * (2.0 - 2.0 / (1.0 + MAX(c.comment_count) * 0.04)) AS score FROM search_index i INNER JOIN search_total t ON i.word = t.word INNER JOIN node n ON n.nid = i.sid LEFT JOIN node_comment_statistics c ON c.nid = i.sid WHERE n.status = 1 AND (n.language ='en' OR n.language ='' OR n.language IS NULL) AND (i.word = 'iso' OR i.word = 'japan') AND i.type = 'node' GROUP BY i.type, i.sid HAVING COUNT(*) >= 2 ORDER BY score DESC LIMIT 0, 10