# # Minimal Sphinx configuration sample (clean, simple, functional) # source files_index { type = mysql sql_host = localhost sql_user = btsearch sql_pass = pirateal100x sql_db = btsearch sql_port = 3306 # optional, default is 3306 sql_query = \ SELECT fls.fileid, fls.path, fls.size as filesize, \ torrents.hash as hash, torrents.name as name, torrents.size as size, \ torrents.seeders, torrents.leechers, torrents.completed, \ torrents.files, torrents.contentType, torrents.contentCategory \ FROM files as fls INNER JOIN torrents ON(torrents.hash = fls.hash) sql_field_string = path sql_attr_string = hash sql_attr_bigint = filesize sql_attr_string = name sql_attr_bigint = size sql_attr_uint = files sql_attr_uint = seeders sql_attr_uint = leechers sql_attr_uint = completed sql_attr_string = contentType sql_attr_string = contentCategory } index files_index { source = files_index path = /var/lib/sphinx/btsearch min_word_len = 3 } source torrents_index { type = mysql sql_host = localhost sql_user = btsearch sql_pass = pirateal100x sql_db = btsearch sql_port = 3306 # optional, default is 3306 sql_query = \ SELECT torrents.hash as hash, torrents.name as name, torrents.size as size, \ torrents.seeders, torrents.leechers, torrents.completed, \ torrents.files, torrents.contentType, torrents.contentCategory \ FROM torrents sql_field_string = name sql_attr_bigint = size sql_attr_uint = files sql_attr_uint = seeders sql_attr_uint = leechers sql_attr_uint = completed sql_attr_string = contentType sql_attr_string = contentCategory } index torrents_index { source = torrents_index path = /var/lib/sphinx/btsearch min_word_len = 3 } indexer { mem_limit = 128M } searchd { listen = 9312 listen = 9306:mysql41 log = /var/log/sphinx/searchd.log query_log = /var/log/sphinx/query.log read_timeout = 5 max_children = 30 pid_file = /var/run/sphinx/searchd.pid seamless_rotate = 1 preopen_indexes = 1 unlink_old = 1 workers = threads # for RT to work binlog_path = /var/lib/sphinx/ }