sphinx.conf
4.19 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#############################################################################
## source definition
#############################################################################
source beunishop
{
type = mysql
###
sql_host = localhost
sql_user = root
sql_pass = root
sql_db = shop1
sql_port = 3306 # optional, default is 3306
###
# sql_sock = /tmp/mysql.sock
sql_query_pre = SET NAMES utf8
sql_query_pre = SET CHARACTER SET utf8
sql_query_pre = SET SESSION query_cache_type=OFF
sql_query =\
SELECT id \
FROM fv_catalog_product
}
source beuni_products : beunishop{
sql_query = \
SELECT id,manufacturer_id,manufacturer_trademark_id,sku,alias,price,title,info,content \
FROM fv_catalog_product, fv_catalog_product_lang \
WHERE fv_catalog_product.id = fv_catalog_product_lang.rid AND \
fv_catalog_product.published='1' AND fv_catalog_product.deleted='0' \
AND id>=$start AND id<=$end
sql_query_range = \
SELECT MIN(id),MAX(id) \
FROM fv_catalog_product, fv_catalog_product_lang \
WHERE fv_catalog_product.id = fv_catalog_product_lang.rid AND \
fv_catalog_product.published='1' AND fv_catalog_product.deleted='0'
sql_range_step = 1000
sql_attr_uint = manufacturer_id
sql_attr_uint = manufacturer_trademark_id
sql_attr_float = price
sql_field_string = sku
sql_field_string = title
}
#############################################################################
## index definition
#############################################################################
index beunishop
{
type = plain
source = beunishop
path = C:/sphinx/data/beunishop
docinfo = extern
dict = keywords
mlock = 0
###
# a list of morphology preprocessors to apply
# builtin preprocessors are 'none', 'stem_en', 'stem_ru', 'stem_enru',
# morphology = stem_en, stem_ru, soundex
# morphology = libstemmer_german
# morphology = libstemmer_sv
morphology = stem_en, stem_ru, soundex
index_exact_words=1
# default is 1 (index everything)
min_word_len = 1
# minimum word prefix length to index
# min_prefix_len = 1
# minimum word infix length to index
min_infix_len = 1
# maximum substring (prefix or infix) length to index
# max_substring_len = 8
html_strip = 0
expand_keywords = 1
enable_star = 1
}
index beuni_products : beunishop{
path = C:/sphinx/data/beuni_products
source = beuni_products
morphology = stem_en, stem_ru, soundex
}
#############################################################################
## indexer settings
#############################################################################
indexer
{
# optional, default is 128M, max is 2047M, recommended is 256M to 1024M
mem_limit = 128M
}
#############################################################################
## searchd settings
#############################################################################
searchd
{
listen = 9312
listen = 9306:mysql41
log = C:/sphinx/log/searchd.log
query_log = C:/sphinx/log/query.log
# client read timeout, seconds
read_timeout = 5
# request timeout, seconds
# optional, default is 5 minutes
client_timeout = 300
# maximum amount of children to fork (concurrent searches to run)
max_children = 30
# maximum amount of persistent connections from this master to each agent host
persistent_connections_limit = 30
# PID file, searchd process ID file name
pid_file = C:/sphinx/log/searchd.pid
# seamless rotate, prevents rotate stalls if precaching huge datasets
seamless_rotate = 1
# whether to forcibly preopen all indexes on startup
preopen_indexes = 1
# whether to unlink .old index copies on succesful rotation.
# optional, default is 1 (do unlink)
unlink_old = 1
# MVA updates pool size
mva_updates_pool = 1M
# max allowed network packet size
max_packet_size = 8M
# max allowed per-query filter count
max_filters = 256
# max allowed per-filter values count
max_filter_values = 4096
# max allowed per-batch query count (aka multi-query count)
# optional, default is 32
max_batch_queries = 32
# multi-processing mode (MPM)
workers = threads # for RT to work
collation_server = utf8_general_ci
# server-wide locale for libc based collations
# collation_libc_locale = ru_RU.UTF-8
}