Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # Minimal Sphinx configuration sample (clean, simple, functional)
- #
- source articles
- {
- type = mysql
- sql_host = localhost
- sql_user = username
- sql_pass = mypassword
- sql_db = mydatabase
- sql_port = 3306 # optional, default is 3306
- sql_query = SELECT ID, 1 AS table_id, Title, Title AS Titless, Description FROM articles
- sql_attr_uint = table_id
- }
- index articles
- {
- source = articles
- path = data/articles
- docinfo = extern
- charset_type = utf-8
- min_word_len = 3
- min_prefix_len = 0
- min_infix_len = 3
- }
- source publications
- {
- type = mysql
- sql_host = localhost
- sql_user = username
- sql_pass = mypassword
- sql_db = mydatabase
- sql_port = 3306 # optional, default is 3306
- sql_query = SELECT Title_ID, 2 AS table_id, Title, PageTitle, PageContent, Description FROM publications
- sql_attr_uint = table_id
- }
- index publications
- {
- source = publications
- path = data/publications
- docinfo = extern
- charset_type = utf-8
- min_word_len = 3
- min_prefix_len = 0
- min_infix_len = 3
- }
- source library_content
- {
- type = mysql
- sql_host = localhost
- sql_user = username
- sql_pass = mypassword
- sql_db = mydatabase
- sql_port = 3306 # optional, default is 3306
- sql_query = SELECT articles.ID, articles.Title, library_article_content.ArticleID, 3 AS table_id, library_article_content.FileText FROM library_article_content \
- INNER JOIN articles ON articles.id = library_article_content.ArticleID \
- WHERE ( \
- ( SELECT Live FROM publications \
- WHERE publications.Title_ID=articles.PublicationID \
- ) = 1 \
- OR isNULL(articles.PublicationID) \
- OR ( \
- articles.PublicationID = -1 \
- AND ( \
- SELECT COUNT(*) \
- FROM library_article_content \
- WHERE library_article_content.ArticleID=articles.ID \
- ) = 0 \
- ) \
- )
- sql_attr_uint = table_id
- }
- index library_content
- {
- source = library_content
- path = data/library_content
- docinfo = extern
- charset_type = utf-8
- min_word_len = 3
- min_prefix_len = 0
- min_infix_len = 3
- }
- source tt_content
- {
- type = mysql
- sql_host = localhost
- sql_user = username
- sql_pass = mypassword
- sql_db = mydatabase
- sql_port = 3306 # optional, default is 3306
- sql_query = SELECT articles.ID, articles.Title, tt_article_content.ArticleID, 4 AS table_id, \
- tt_article_content.PageContent FROM tt_article_content \
- INNER JOIN articles ON articles.id = tt_article_content.ArticleID \
- WHERE ( \
- ( SELECT Live FROM publications \
- WHERE publications.Title_ID=articles.PublicationID \
- ) = 1 \
- OR isNULL(articles.PublicationID) \
- OR ( \
- articles.PublicationID = -1 \
- AND ( \
- SELECT COUNT(*) \
- FROM tt_article_content \
- WHERE tt_article_content.ArticleID=articles.ID \
- ) = 0 \
- ) \
- )
- sql_attr_uint = table_id
- }
- index tt_content
- {
- source = tt_content
- path = data/tt_content
- docinfo = extern
- charset_type = utf-8
- min_word_len = 3
- min_prefix_len = 0
- min_infix_len = 3
- }
- indexer
- {
- mem_limit = 32M
- }
- searchd
- {
- listen = 9312
- listen = 3312:mysql41
- log = /var/log/searchd.log
- query_log = /var/log/query.log
- read_timeout = 5
- max_children = 0
- pid_file = /var/log/searchd.pid
- max_matches = 1000
- seamless_rotate = 1
- preopen_indexes = 1
- unlink_old = 1
- workers = threads # for RT to work
- binlog_path = /var/data
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement