diff options
-rw-r--r-- | askbot/search/sphinx/sphinx.conf | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/askbot/search/sphinx/sphinx.conf b/askbot/search/sphinx/sphinx.conf index 7ff44604..cdf0f004 100644 --- a/askbot/search/sphinx/sphinx.conf +++ b/askbot/search/sphinx/sphinx.conf @@ -25,12 +25,13 @@ source src_askbot INNER JOIN \ ( \ SELECT MAX(id) as id, question_id \ - FROM question_revision \ + FROM askbot_postrevision \ + WHERE revision_type = 1 \ GROUP BY question_id \ ) \ AS mqr \ ON q.id=mqr.question_id \ - INNER JOIN question_revision AS qr ON qr.id=mqr.id \ + INNER JOIN askbot_postrevision AS qr ON qr.id=mqr.id \ LEFT JOIN \ ( \ SELECT GROUP_CONCAT(answer_current.text SEPARATOR '. ') AS text, \ @@ -42,12 +43,13 @@ source src_askbot INNER JOIN \ ( \ SELECT MAX(id) as id, answer_id \ - FROM answer_revision \ + FROM askbot_postrevision \ + WHERE revision_type = 2 \ GROUP BY answer_id \ ) \ AS mar \ ON mar.answer_id = a.id \ - INNER JOIN answer_revision AS ar ON ar.id=mar.id \ + INNER JOIN askbot_postrevision AS ar ON ar.id=mar.id \ WHERE a.deleted=0 \ ) \ AS answer_current \ |