-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathsphinx.conf
More file actions
143 lines (113 loc) · 3.82 KB
/
Copy pathsphinx.conf
File metadata and controls
143 lines (113 loc) · 3.82 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
source posts {
type = mysql
sql_host = localhost
sql_user = ***
sql_pass = ***
sql_db = ***
sql_port = 3306 # optional, default is 3306
sql_query_pre = SET NAMES utf8
}
source src:posts {
sql_query = \
SELECT post_id, post_slug, post_space_id, post_date, post_tl, post_title, post_content, \
post_votes, post_is_deleted, post_draft, space_id, space_name, space_slug, space_img \
FROM posts \
join spaces on space_id = post_space_id \
where post_is_deleted = 0 and post_draft = 0 and post_tl = 0
# поля, по которым может идти группировка, фильтрация и сортировка (см. http://sphinxsearch.com/docs/current.html#attributes)
sql_field_string = post_title
sql_field_string = post_content
sql_field_string = post_slug
sql_field_string = post_space_id
sql_field_string = post_votes
sql_field_string = space_name
sql_field_string = space_slug
sql_field_string = space_img
}
index postind {
source = src
expand_keywords = 1
morphology = stem_en, stem_ru, soundex
stopwords = /var/www/***/data/index/stopwords.txt
## wordforms = /var/www/***/data/index/wordforms.txt
path = /var/www/***/data/index/postind
docinfo = extern #тип хранения атрибутов индекса
rt_field = post_title
rt_field = post_content
rt_attr_string = post_title
rt_attr_string = post_content
}
source tags:posts {
sql_query = \
SELECT topic_id, topic_title, topic_slug, topic_count \
FROM topics
# поля, по которым может идти группировка, фильтрация и сортировка (см. http://sphinxsearch.com/docs/current.html#attributes)
sql_field_string = topic_title
sql_field_string = topic_slug
sql_field_string = topic_count
}
index tagind {
source = tags
expand_keywords = 1
morphology = stem_en, stem_ru, soundex
stopwords = /var/www/***/data/index/stopwords.txt
## wordforms = /var/www/***/data/index/wordforms.txt
path = /var/www/***/data/index/tagind
docinfo = extern #тип хранения атрибутов индекса
rt_field = topic_title
rt_field = topic_slug
rt_attr_string = topic_title
rt_attr_string = topic_slug
}
############### / ПОДДЕРЖКА #######################
source docs {
type = mysql
sql_host = localhost
sql_user = lorisql
sql_pass = iR4vV3kI9nvG1t
sql_db = docs
sql_port = 3306 # optional, default is 3306
sql_query_pre = SET NAMES utf8
}
source articles:docs {
sql_query = \
SELECT article_id, article_title, article_slug, article_content \
FROM articles
sql_field_string = article_title
sql_field_string = article_slug
sql_field_string = article_content
}
index articlesind {
source = articles
expand_keywords = 1
morphology = stem_en, stem_ru, soundex
stopwords = /var/www/***/data/index/stopwords.txt
## wordforms = /var/www/***/data/index/wordforms.txt
path = /var/www/***/data/index/articlesind
docinfo = extern #тип хранения атрибутов индекса
rt_field = article_title
rt_field = article_slug
rt_attr_string = article_title
rt_attr_string = article_slug
rt_attr_string = article_content
}
############### / БЛОГ ИНДЕКСАЦИИ #######################
indexer
{
mem_limit = 128M
}
searchd
{
listen = 127.0.0.1:9312
listen = 127.0.0.1:9306:mysql41
log = /var/www/***/data/index/log/searchd.log
query_log = /var/www/***/data/index/log/query.log
read_timeout = 5
max_children = 30
collation_server = utf8_general_ci
pid_file = /var/www/***/data/index/log/searchd.pid
seamless_rotate = 1
preopen_indexes = 1
unlink_old = 1
binlog_path = /var/www/***/data/index
}