-
Notifications
You must be signed in to change notification settings - Fork 3
/
sphinx.conf
76 lines (59 loc) · 1.31 KB
/
sphinx.conf
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# Minimal Sphinx configuration sample (clean, simple, functional)
#
source src1
{
type = mysql
sql_host = 127.0.0.1
sql_user = root
sql_pass =
sql_db = ssbc
sql_port = 3306 # optional, default is 3306
sql_query_pre = SET NAMES utf8
sql_query = \
SELECT id, name, CRC32(category) AS category, length, UNIX_TIMESTAMP(create_time) AS create_time, UNIX_TIMESTAMP(last_seen) AS last_seen\
FROM search_hash
sql_attr_bigint = length
sql_attr_timestamp = create_time
sql_attr_timestamp = last_seen
sql_attr_uint = category
}
index main
{
source = src1
path = /data/bt/index/db/main
ngram_len = 1
ngram_chars = U+3000..U+2FA1F
}
index rt_main
{
type = rt
rt_mem_limit = 512M
path = /data/bt/index/db/rt_main
rt_field = name
rt_attr_bigint = length
rt_attr_timestamp = create_time
rt_attr_timestamp = last_seen
rt_attr_uint = category
ngram_len = 1
ngram_chars = U+3000..U+2FA1F
}
indexer
{
mem_limit = 1500M
}
searchd
{
listen = 9312
listen = 9306:mysql41
log = /data/bt/index/searchd.log
query_log = /data/bt/index/query.log
read_timeout = 5
max_children = 0
pid_file = /data/bt/index/searchd.pid
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
#workers = threads # for RT to work
binlog_path = /data/bt/index/binlog/
}