1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#
# Minimal Sphinx configuration sample (clean, simple, functional)
#

source src1
{
    type            = mysql

    sql_host        = localhost
    sql_user        = user
    sql_pass        = pass
    sql_db          = db
    sql_port        = 3306  # optional, default is 3306

    sql_query_pre       = SET NAMES utf8
    sql_query_pre       = SET CHARACTER SET utf8

    sql_query       = \
        SELECT id, name, description_short \
        FROM it25_unitcatalog_product

    sql_attr_string     = name
    sql_attr_string     = description_short

    #sql_query_info     = SELECT * FROM documents WHERE id=$id
}


index test1
{
    source          = src1
    path            = /var/lib/sphinx/test1
    docinfo         = extern
    charset_type    = utf-8
}

indexer
{
    mem_limit       = 128M
}


searchd
{
    listen          = 9312
    listen          = 9306:mysql41
    log             = /var/log/sphinx/searchd.log
    query_log       = /var/log/sphinx/query.log
    read_timeout    = 5
    max_children    = 30
    pid_file        = /var/run/sphinx/searchd.pid
    max_matches     = 1000
    seamless_rotate = 1
    preopen_indexes = 1
    unlink_old      = 1
    workers         = threads # for RT to work
    binlog_path     = /var/lib/sphinx/
}