# Sphinx configuration file for primary and delta search indexes # for a MARIADB/MYSQL database # The only fields you may have to change are sql_host, sql_user, sql_pass and sql_db # after you install sphinx # # Additionally, there are lines marked with the comment # "Distribution Dependant, VALIDATE" # Please check to ensure this configuration agrees with your particular distribution # Typically, you should be able to reference the supplied sphinx.conf to compare # # change to the sphinx configuration directory (usually /etc/sphinx) # rename sphinx.conf to sphinx.conf.dist # then save this file as sphinx.conf # ############################################################################# ## data source definition ############################################################################# source ttrss { type = mysql # this is a MARIADB/MYSQL database sql_host = localhost # this is your hostname, typically localhost sql_user = ttrss_user # this is the ttrss_user name you defined sql_pass = your_password # this is the ttrss_user password you defined sql_db = ttrss # this is the name of the ttrss MARIADB/MYSQL database sql_port = 3306 # optional, default is 3306 for MARIADB/MYSQL sql_query_pre = SET NAMES utf8 sql_query = \ SELECT int_id AS id, ref_id, UNIX_TIMESTAMP() AS updated, \ ttrss_entries.title AS title, link, content, \ ttrss_feeds.title AS feed_title, \ marked, published, unread, \ author, ttrss_user_entries.owner_uid \ FROM ttrss_entries, ttrss_user_entries, ttrss_feeds \ WHERE ref_id = ttrss_entries.id AND feed_id = ttrss_feeds.id; sql_attr_uint = owner_uid sql_attr_uint = ref_id sql_ranged_throttle = 0 sql_query_info = \ SELECT * FROM ttrss_entries, \ ttrss_user_entries WHERE ref_id = id AND int_id=$id } source delta : ttrss { sql_query = \ SELECT int_id AS id, ref_id, UNIX_TIMESTAMP() AS updated, \ ttrss_entries.title AS title, link, content, \ ttrss_feeds.title AS feed_title, \ marked, published, unread, \ author, ttrss_user_entries.owner_uid \ FROM ttrss_entries, ttrss_user_entries, ttrss_feeds \ WHERE ref_id = ttrss_entries.id AND feed_id = ttrss_feeds.id \ AND ttrss_entries.updated > UNIX_TIMESTAMP() - INTERVAL 24 HOUR; sql_query_killlist = \ SELECT int_id FROM ttrss_entries, ttrss_user_entries \ WHERE ref_id = ttrss_entries.id AND updated > UNIX_TIMESTAMP() - INTERVAL 24 HOUR; } index ttrss { source = ttrss path = /var/lib/sphinx/ttrss # Distribution Dependant, VALIDATE docinfo = extern mlock = 0 morphology = none min_word_len = 1 charset_type = utf-8 min_prefix_len = 3 prefix_fields = title, content, feed_title, author enable_star = 1 html_strip = 1 } index delta : ttrss { source = delta path = /var/lib/sphinx/ttrss_delta # Distribution Dependant, VALIDATE } indexer { mem_limit = 32M } ############################################################################# ## searchd settings ############################################################################# searchd { log = /var/log/sphinx/searchd.log # Distribution Dependant, VALIDATE query_log = /var/log/sphinx/query.log # Distribution Dependant, VALIDATE read_timeout = 5 client_timeout = 300 max_children = 30 pid_file = /var/run/sphinx/searchd.pid # Distribution Dependant, VALIDATE max_matches = 1000 seamless_rotate = 1 preopen_indexes = 1 unlink_old = 1 mva_updates_pool = 1M max_packet_size = 8M max_filters = 256 max_filter_values = 4096 compat_sphinxql_magics = 0 } # --eof--