-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsphinx.conf
73 lines (62 loc) · 1.48 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
source src1
{
type = mysql
sql_host = localhost
sql_user = root
sql_pass = cpp114
sql_db = test
sql_port = 3306 # optional, default is 3306
sql_sock = /var/lib/mysql/mysql.sock
sql_query_pre = SET NAMES utf8
sql_query = \
SELECT id, cate_ids, group_id, group_id2, UNIX_TIMESTAMP(date_added) AS date_added, title, content \
FROM documents
sql_attr_uint = group_id
sql_attr_uint = group_id2
sql_attr_timestamp = date_added
sql_attr_multi = uint cate_ids from field
sql_ranged_throttle = 0
sql_query_info = SELECT * FROM documents WHERE id=$id
}
index test1
{
source = src1
path = /usr/local/sphinx/var/data/test1
docinfo = extern
mlock = 0
morphology = none
min_word_len = 1
# known types are 'sbcs' (Single Byte CharSet) and 'utf-8'
charset_type = sbcs
html_strip = 0
}
indexer
{
mem_limit = 32M
# max_iops = 40
# max_iosize = 1048576
# max_xmlpipe2_field = 4M
# write_buffer = 1M
# max_file_field_buffer = 32M
}
searchd
{
listen = /var/run/searchd.sock
# listen = 9312
log = /usr/local/sphinx/var/log/searchd.log
query_log = /usr/local/sphinx/var/log/query.log
read_timeout = 5
client_timeout = 300
max_children = 30
pid_file = /usr/local/sphinx/var/log/searchd.pid
max_matches = 1000
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
mva_updates_pool = 1M
max_packet_size = 8M
max_filters = 256
max_filter_values = 4096
max_batch_queries = 32
workers = threads # for RT to work
}