forked from psdshow/zsky
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsphinx.conf
54 lines (46 loc) · 1.51 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
source film
{
type = mysql
sql_host = 127.0.0.1
sql_user = root
sql_pass = 123456
sql_db = zsky
sql_port = 3306
sql_query_pre = SET NAMES utf8mb4
sql_query = SELECT id, name, info_hash, category, length, extension, requests, UNIX_TIMESTAMP(create_time) AS create_time, UNIX_TIMESTAMP(last_seen) AS last_seen FROM search_hash
sql_field_string = name
sql_attr_string = info_hash
sql_attr_string = category
sql_attr_string = extension
sql_attr_bigint = length
sql_attr_bigint = requests
sql_attr_timestamp = create_time
sql_attr_timestamp = last_seen
}
index film
{
source = film
path = /usr/local/sphinx-jieba/var/data/film
chinese_dictionary = /usr/local/sphinx-jieba/etc/xdict
ngram_len = 1
ngram_chars = U+3000..U+2FA1F
}
indexer
{
mem_limit = 512M #索引使用内存,如果是服务器可以适度增大
}
searchd
{
listen = 9312
listen = 9306:mysql41
log = /usr/local/sphinx-jieba/var/log/searchd.log
query_log = /usr/local/sphinx-jieba/var/log/query.log
read_timeout = 5
max_children = 30
pid_file = /usr/local/sphinx-jieba/var/log/searchd.pid
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
workers = threads
binlog_path = /usr/local/sphinx-jieba/var/data
}