indexer
{
    mem_limit = 512M
}

source base
{
    type            = mysql
    sql_host        = localhost
    sql_user        = root
    sql_pass        = abc1234$
    sql_db          = qole
    sql_port        = 3306

    sql_query_pre  = SET NAMES utf8
    sql_query_pre  = SET CHARACTER SET utf8
    sql_query_pre  = SET CHARACTER_SET_RESULTS=utf8
}

source shops:base
{
    sql_query          = SELECT id, area_id, name, slug, description, logo, `order` AS `order_list`, is_activated, UNIX_TIMESTAMP(created_at) AS created_at FROM shops WHERE is_deleted = 0

    sql_field_string   = name
    sql_attr_uint      = area_id
    sql_attr_string    = slug
    sql_attr_string    = description
    sql_attr_string    = logo
    sql_attr_uint      = order_list
    sql_attr_uint      = is_activated
    sql_attr_uint      = created_at
}

source areas:base
{
    sql_query          = SELECT id, name, slug, description FROM areas

    sql_field_string   = name
    sql_attr_string    = slug
    sql_attr_string    = description
}

index shops_index
{
    source            = shops
    path              = /var/lib/sphinxsearch/data/shops_index
    min_word_len      = 1
    min_prefix_len    = 0
}

index areas_index
{
    source            = areas
    path              = /var/lib/sphinxsearch/data/areas_index
    min_word_len      = 1
    min_prefix_len    = 0
}

searchd
{
    listen          = 9306:mysql41
    log             = /var/log/sphinxsearch/searchd.log
    query_log       = /var/log/sphinxsearch/query.log
    read_timeout    = 5
    max_children    = 30
    pid_file        = /var/run/sphinxsearch/searchd.pid
    seamless_rotate = 1
    preopen_indexes = 1
    unlink_old      = 1
    binlog_path     = /var/lib/sphinxsearch/data
}
