source foorum
{
    type                            = mysql
    
    sql_host                        = __HOST__
    sql_user                        = __USER__
    sql_pass                        = __PASS__
    sql_db                          = foorum
    sql_port                        = __PORT__

    sql_query_pre                   = \
            REPLACE INTO variables SELECT 'global', 'sphinx_tid', MAX(topic_id) FROM topic
    sql_query                       = \
            SELECT \
                    topic_id as id, topic_id, forum_id, title, author_id, status, post_on, last_update_date \
            FROM \
                    topic \
            WHERE \
                    status = 'healthy' \
                    AND topic_id <= (SELECT value FROM variables WHERE type = 'global' AND name = 'sphinx_tid');

    sql_attr_timestamp  = last_update_date
    sql_attr_timestamp  = post_on
    sql_attr_uint       = author_id
    sql_attr_uint       = forum_id

    # document info query
    sql_query_info          = SELECT topic_id, title, forum_id, author_id \
                              FROM topic WHERE topic_id=$id
}

source foorumdelta : foorum
{
    sql_query_pre                   = 
    sql_query                       = \
            SELECT \
                    topic_id as id, topic_id, forum_id, title, author_id, status, post_on, last_update_date \
            FROM \
                    topic \
            WHERE \
                    status = 'healthy' \
                    AND topic_id > (SELECT value FROM variables WHERE type = 'global' AND name = 'sphinx_tid');
}

index foorum
{
    source                  = foorum
    path                    = __HOME__/data/sphinx/foorum
}

index foorumdelta : foorum
{
    source                  = foorumdelta
    path                    = __HOME__/data/sphinx/foorumdelta
}

searchd
{
	port				= 3312
	log				    = __HOME__/log/searchd.log
	query_log			= __HOME__/log/query.log
	pid_file			= __HOME__/log/searchd.pid
}
