Thread:Extension talk:SphinxSearch/Adding wiki prefix in Installation Step 2/reply

You would need to change the sql_query line like this:

sql_query = SELECT page_id, page_title, page_namespace, page_is_redirect, old_id, old_text FROM Wiki_page, Wiki_revision, Wiki_text WHERE rev_id=page_latest AND old_id=rev_text_id