# Sphinx configuration file for primary and delta search indexes # for a POSTGRESQL 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 = pgsql # this is a POSTGRESQL 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 POSTGRESQL database sql_port = 5432 # optional, default is 5432 for POSTGRESQL sql_query_pre = SET client_encoding TO unicode sql_query = \ SELECT int_id AS id, ref_id, date_part('epoch', updated) 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 } source delta : ttrss { sql_query = \ SELECT int_id AS id, ref_id, date_part('epoch', updated) 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 > NOW() - INTERVAL '24 hours' sql_query_killlist = \ SELECT int_id FROM ttrss_entries, ttrss_user_entries \ WHERE ref_id = ttrss_entries.id AND updated > NOW() - INTERVAL '24 hours' } index ttrss { source = ttrss path = /var/lib/sphinx/ttrss # Distribution Dependent, VALIDATE docinfo = extern mlock = 0 morphology = none min_word_len = 1 min_prefix_len = 3 html_strip = 1 } index delta : ttrss { source = delta path = /var/lib/sphinx/ttrss_delta # Distribution Dependent, VALIDATE } indexer { mem_limit = 32M } ############################################################################# ## searchd settings ############################################################################# searchd { log = /var/log/sphinx/searchd.log # Distribution Dependent, VALIDATE query_log = /var/log/sphinx/query.log # Distribution Dependent, VALIDATE read_timeout = 5 client_timeout = 300 max_children = 30 pid_file = /var/run/sphinx/searchd.pid # Distribution Dependent, VALIDATE seamless_rotate = 1 preopen_indexes = 1 unlink_old = 1 mva_updates_pool = 1M max_packet_size = 8M max_filters = 256 max_filter_values = 4096 binlog_path = /var/lib/sphinx # Distribution Dependent, VALIDATE } # --eof--