Thread:Extension talk:SphinxSearch/SphinxSearch - exclude jpg files from search results/reply

Perhaps by editing the query in sphinx.conf that gets the content to index? File uploads have their own namespace in the database, so instead of this:

sql_query   = SELECT page_id, page_title, page_namespace, page_is_redirect, old_id, old_text FROM page, revision, text WHERE rev_id=page_latest AND old_id=rev_text_id

You would have something like this:

sql_query   = SELECT page_id, page_title, page_namespace, page_is_redirect, old_id, old_text FROM page, revision, text WHERE rev_id=page_latest AND old_id=rev_text_id AND page_namespace NOT IN (6, 7)

These numbers are defined in includes/Defines.php

define( 'NS_FILE', 6 ); define( 'NS_FILE_TALK', 7 );