ultrasphinx 1.8 → 1.9
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +1 -3
- data/CHANGELOG +4 -0
- data/DEPLOYMENT_NOTES +7 -3
- data/Manifest +10 -0
- data/RAKE_TASKS +4 -2
- data/README +35 -18
- data/TODO +0 -1
- data/examples/default.base +24 -19
- data/lib/ultrasphinx.rb +1 -1
- data/lib/ultrasphinx/configure.rb +66 -25
- data/lib/ultrasphinx/core_extensions.rb +10 -1
- data/lib/ultrasphinx/is_indexed.rb +49 -6
- data/lib/ultrasphinx/search.rb +81 -69
- data/lib/ultrasphinx/search/internals.rb +61 -38
- data/lib/ultrasphinx/search/parser.rb +17 -7
- data/lib/ultrasphinx/ultrasphinx.rb +69 -16
- data/tasks/ultrasphinx.rake +47 -29
- data/test/config/ultrasphinx/test.base +50 -21
- data/test/integration/app/app/models/geo/address.rb +2 -1
- data/test/integration/app/app/models/person/user.rb +12 -3
- data/test/integration/app/app/models/seller.rb +2 -1
- data/test/integration/app/config/environment.rb +2 -0
- data/test/integration/app/config/ultrasphinx/default.base +16 -8
- data/test/integration/app/config/ultrasphinx/development.conf +319 -0
- data/test/integration/app/config/ultrasphinx/development.conf.canonical +152 -24
- data/test/integration/app/db/schema.rb +56 -0
- data/test/integration/app/test/fixtures/sellers.yml +1 -1
- data/test/integration/app/test/fixtures/users.yml +1 -1
- data/test/integration/app/test/unit/country_test.rb +8 -0
- data/test/integration/delta_test.rb +39 -0
- data/test/integration/search_test.rb +60 -1
- data/test/integration/spell_test.rb +6 -2
- data/test/profile/benchmark.rb +44 -0
- data/test/test_helper.rb +6 -1
- data/test/unit/parser_test.rb +21 -2
- data/ultrasphinx.gemspec +4 -4
- data/vendor/riddle/README +2 -2
- data/vendor/riddle/lib/riddle.rb +1 -1
- data/vendor/riddle/lib/riddle/client.rb +45 -10
- data/vendor/riddle/spec/fixtures/data/anchor.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/any.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/boolean.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/distinct.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/field_weights.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/filter.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/group.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/index.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/index_weights.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/phrase.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/rank_mode.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/simple.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/sort.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/update_simple.bin +0 -0
- data/vendor/riddle/spec/fixtures/data/weights.bin +0 -0
- data/vendor/riddle/spec/fixtures/data_generator.php +130 -0
- data/vendor/riddle/spec/fixtures/sphinxapi.php +1066 -0
- data/vendor/riddle/spec/spec_helper.rb +1 -0
- data/vendor/riddle/spec/unit/client_spec.rb +18 -4
- metadata +12 -2
- metadata.gz.sig +0 -0
@@ -19,32 +19,40 @@
|
|
19
19
|
# people think they need to do that. It's wrong.
|
20
20
|
#
|
21
21
|
|
22
|
+
<% tmp = "/tmp/sphinx/" %>
|
23
|
+
|
22
24
|
indexer
|
23
25
|
{
|
24
26
|
# Indexer running options
|
25
27
|
mem_limit = 256M
|
28
|
+
|
29
|
+
# Ultrasphinx-specific key
|
30
|
+
delta = <%= 1.day + 30.minutes %>
|
26
31
|
}
|
27
32
|
|
28
33
|
searchd
|
29
34
|
{
|
30
35
|
# Daemon options
|
31
|
-
|
36
|
+
|
37
|
+
# What interface the search daemon should listen on
|
32
38
|
address = 0.0.0.0
|
33
39
|
port = 3312
|
34
40
|
seamless_rotate = 1
|
35
|
-
|
36
|
-
|
41
|
+
|
42
|
+
# Where to to store the logs
|
43
|
+
log = <%= tmp %>searchd.log
|
44
|
+
query_log = <%= tmp %>query.log
|
37
45
|
read_timeout = 5
|
38
46
|
max_children = 300
|
39
|
-
pid_file =
|
47
|
+
pid_file = <%= tmp %>searchd.pid
|
40
48
|
max_matches = 100000
|
41
49
|
}
|
42
50
|
|
43
51
|
client
|
44
52
|
{
|
45
|
-
#
|
53
|
+
# Ultrasphinx-specific client options
|
46
54
|
# Name of the Aspell dictionary (two letters max)
|
47
|
-
dictionary_name = ap
|
55
|
+
dictionary_name = <%= dictionary = 'ap' %>
|
48
56
|
# How your application connects to the search daemon (not necessarily the same as above)
|
49
57
|
server_host = localhost
|
50
58
|
server_port = 3312
|
@@ -61,10 +69,10 @@ source
|
|
61
69
|
index
|
62
70
|
{
|
63
71
|
# Index building options
|
64
|
-
path =
|
72
|
+
path = <%= tmp %>
|
65
73
|
docinfo = extern # just leave this alone
|
66
74
|
morphology = stem_en
|
67
|
-
stopwords = #
|
75
|
+
stopwords = # <%= tmp %>/<%= dictionary %>-stopwords.txt
|
68
76
|
min_word_len = 1
|
69
77
|
|
70
78
|
# HTML-specific options
|
@@ -0,0 +1,319 @@
|
|
1
|
+
|
2
|
+
# Auto-generated at Sat Mar 08 14:50:18 -0500 2008.
|
3
|
+
# Hand modifications will be overwritten.
|
4
|
+
# /Users/eweaver/Desktop/projects/ub/vendor/plugins/ultrasphinx/test/integration/app/config/ultrasphinx/default.base
|
5
|
+
indexer {
|
6
|
+
mem_limit = 256M
|
7
|
+
}
|
8
|
+
|
9
|
+
searchd {
|
10
|
+
read_timeout = 5
|
11
|
+
max_children = 300
|
12
|
+
log = /tmp/sphinx/searchd.log
|
13
|
+
port = 3312
|
14
|
+
max_matches = 100000
|
15
|
+
query_log = /tmp/sphinx/query.log
|
16
|
+
seamless_rotate = 1
|
17
|
+
pid_file = /tmp/sphinx/searchd.pid
|
18
|
+
address = 0.0.0.0
|
19
|
+
}
|
20
|
+
|
21
|
+
# Source configuration
|
22
|
+
|
23
|
+
source geo__states_main
|
24
|
+
{
|
25
|
+
sql_range_step = 5000
|
26
|
+
sql_query_post =
|
27
|
+
sql_ranged_throttle = 0
|
28
|
+
|
29
|
+
type = mysql
|
30
|
+
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
31
|
+
sql_query_pre = SET NAMES utf8
|
32
|
+
|
33
|
+
sql_db = ultrasphinx_development
|
34
|
+
sql_host = localhost
|
35
|
+
sql_pass =
|
36
|
+
sql_user = root
|
37
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM states
|
38
|
+
sql_query = SELECT (states.id * 5 + 0) AS id, CAST(GROUP_CONCAT(DISTINCT addresses.name SEPARATOR ' ') AS CHAR) AS address_name, 0 AS capitalization, 'Geo::State' AS class, 0 AS class_id, '' AS company, 0 AS company_facet, '' AS company_name, 0 AS company_name_facet, '' AS company_two, 0 AS company_two_facet, '' AS content, 18000 AS created_at, 0 AS deleted, '' AS email, '' AS login, '' AS mission_statement, '' AS name, '' AS state, 0 AS user_id FROM states LEFT OUTER JOIN addresses AS addresses ON states.id = addresses.state_id WHERE states.id >= $start AND states.id <= $end GROUP BY states.id
|
39
|
+
|
40
|
+
sql_attr_float = capitalization
|
41
|
+
sql_attr_uint = class_id
|
42
|
+
sql_attr_uint = company_facet
|
43
|
+
sql_attr_uint = company_name_facet
|
44
|
+
sql_attr_uint = company_two_facet
|
45
|
+
sql_attr_timestamp = created_at
|
46
|
+
sql_attr_bool = deleted
|
47
|
+
sql_attr_str2ordinal = mission_statement
|
48
|
+
sql_attr_uint = user_id
|
49
|
+
sql_query_info = SELECT * FROM states WHERE states.id = (($id - 0) / 5)
|
50
|
+
}
|
51
|
+
|
52
|
+
|
53
|
+
# Source configuration
|
54
|
+
|
55
|
+
source sellers_main
|
56
|
+
{
|
57
|
+
sql_range_step = 5000
|
58
|
+
sql_query_post =
|
59
|
+
sql_ranged_throttle = 0
|
60
|
+
|
61
|
+
type = mysql
|
62
|
+
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
63
|
+
sql_query_pre = SET NAMES utf8
|
64
|
+
|
65
|
+
sql_db = ultrasphinx_development
|
66
|
+
sql_host = localhost
|
67
|
+
sql_pass =
|
68
|
+
sql_user = root
|
69
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM sellers
|
70
|
+
sql_query = SELECT (sellers.id * 5 + 1) AS id, '' AS address_name, sellers.capitalization AS capitalization, 'Seller' AS class, 1 AS class_id, '' AS company, 0 AS company_facet, sellers.company_name AS company_name, CAST(CRC32(sellers.company_name) AS unsigned) AS company_name_facet, '' AS company_two, 0 AS company_two_facet, '' AS content, UNIX_TIMESTAMP(sellers.created_at) AS created_at, 0 AS deleted, '' AS email, '' AS login, sellers.mission_statement AS mission_statement, '' AS name, '' AS state, sellers.user_id AS user_id FROM sellers WHERE sellers.id >= $start AND sellers.id <= $end GROUP BY sellers.id
|
71
|
+
|
72
|
+
sql_attr_float = capitalization
|
73
|
+
sql_attr_uint = class_id
|
74
|
+
sql_attr_uint = company_facet
|
75
|
+
sql_attr_uint = company_name_facet
|
76
|
+
sql_attr_uint = company_two_facet
|
77
|
+
sql_attr_timestamp = created_at
|
78
|
+
sql_attr_bool = deleted
|
79
|
+
sql_attr_str2ordinal = mission_statement
|
80
|
+
sql_attr_uint = user_id
|
81
|
+
sql_query_info = SELECT * FROM sellers WHERE sellers.id = (($id - 1) / 5)
|
82
|
+
}
|
83
|
+
|
84
|
+
|
85
|
+
# Source configuration
|
86
|
+
|
87
|
+
source geo__addresses_main
|
88
|
+
{
|
89
|
+
sql_range_step = 5000
|
90
|
+
sql_query_post =
|
91
|
+
sql_ranged_throttle = 0
|
92
|
+
|
93
|
+
type = mysql
|
94
|
+
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
95
|
+
sql_query_pre = SET NAMES utf8
|
96
|
+
|
97
|
+
sql_db = ultrasphinx_development
|
98
|
+
sql_host = localhost
|
99
|
+
sql_pass =
|
100
|
+
sql_user = root
|
101
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM addresses
|
102
|
+
sql_query = SELECT (addresses.id * 5 + 2) AS id, '' AS address_name, 0 AS capitalization, 'Geo::Address' AS class, 2 AS class_id, '' AS company, 0 AS company_facet, '' AS company_name, 0 AS company_name_facet, '' AS company_two, 0 AS company_two_facet, CONCAT_WS(' ', addresses.line_1, addresses.line_2, addresses.city, addresses.province_region, addresses.zip_postal_code) AS content, 18000 AS created_at, 0 AS deleted, '' AS email, '' AS login, '' AS mission_statement, addresses.name AS name, state.name AS state, 0 AS user_id FROM addresses LEFT OUTER JOIN states AS state ON state.id = addresses.state_id WHERE addresses.id >= $start AND addresses.id <= $end GROUP BY addresses.id
|
103
|
+
|
104
|
+
sql_attr_float = capitalization
|
105
|
+
sql_attr_uint = class_id
|
106
|
+
sql_attr_uint = company_facet
|
107
|
+
sql_attr_uint = company_name_facet
|
108
|
+
sql_attr_uint = company_two_facet
|
109
|
+
sql_attr_timestamp = created_at
|
110
|
+
sql_attr_bool = deleted
|
111
|
+
sql_attr_str2ordinal = mission_statement
|
112
|
+
sql_attr_uint = user_id
|
113
|
+
sql_query_info = SELECT * FROM addresses WHERE addresses.id = (($id - 2) / 5)
|
114
|
+
}
|
115
|
+
|
116
|
+
|
117
|
+
# Source configuration
|
118
|
+
|
119
|
+
source users_main
|
120
|
+
{
|
121
|
+
sql_range_step = 5000
|
122
|
+
sql_query_post =
|
123
|
+
sql_ranged_throttle = 0
|
124
|
+
|
125
|
+
type = mysql
|
126
|
+
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
127
|
+
sql_query_pre = SET NAMES utf8
|
128
|
+
|
129
|
+
sql_db = ultrasphinx_development
|
130
|
+
sql_host = localhost
|
131
|
+
sql_pass =
|
132
|
+
sql_user = root
|
133
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM users
|
134
|
+
sql_query = SELECT (users.id * 5 + 3) AS id, '' AS address_name, 0 AS capitalization, 'User' AS class, 3 AS class_id, specific_seller.company_name AS company, CAST(CRC32(specific_seller.company_name) AS unsigned) AS company_facet, '' AS company_name, 0 AS company_name_facet, REPLACE(sellers_two.company_name, '6', ' replacement ') AS company_two, CAST(CRC32(REPLACE(sellers_two.company_name, '6', ' replacement ')) AS unsigned) AS company_two_facet, '' AS content, 18000 AS created_at, users.deleted AS deleted, users.email AS email, users.login AS login, '' AS mission_statement, '' AS name, '' AS state, 0 AS user_id FROM users LEFT OUTER JOIN sellers AS specific_seller ON users.id = specific_seller.user_id LEFT OUTER JOIN sellers AS sellers_two ON users.id = sellers_two.user_id WHERE users.id >= $start AND users.id <= $end AND (deleted = '0') GROUP BY users.id
|
135
|
+
|
136
|
+
sql_attr_float = capitalization
|
137
|
+
sql_attr_uint = class_id
|
138
|
+
sql_attr_uint = company_facet
|
139
|
+
sql_attr_uint = company_name_facet
|
140
|
+
sql_attr_uint = company_two_facet
|
141
|
+
sql_attr_timestamp = created_at
|
142
|
+
sql_attr_bool = deleted
|
143
|
+
sql_attr_str2ordinal = mission_statement
|
144
|
+
sql_attr_uint = user_id
|
145
|
+
sql_query_info = SELECT * FROM users WHERE users.id = (($id - 3) / 5)
|
146
|
+
}
|
147
|
+
|
148
|
+
|
149
|
+
# Source configuration
|
150
|
+
|
151
|
+
source geo__countries_main
|
152
|
+
{
|
153
|
+
sql_range_step = 5000
|
154
|
+
sql_query_post =
|
155
|
+
sql_ranged_throttle = 0
|
156
|
+
|
157
|
+
type = mysql
|
158
|
+
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
159
|
+
sql_query_pre = SET NAMES utf8
|
160
|
+
|
161
|
+
sql_db = ultrasphinx_development
|
162
|
+
sql_host = localhost
|
163
|
+
sql_pass =
|
164
|
+
sql_user = root
|
165
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM countries
|
166
|
+
sql_query = SELECT (countries.id * 5 + 4) AS id, '' AS address_name, 0 AS capitalization, 'Geo::Country' AS class, 4 AS class_id, '' AS company, 0 AS company_facet, '' AS company_name, 0 AS company_name_facet, '' AS company_two, 0 AS company_two_facet, '' AS content, 18000 AS created_at, 0 AS deleted, '' AS email, '' AS login, '' AS mission_statement, countries.name AS name, '' AS state, 0 AS user_id FROM countries WHERE countries.id >= $start AND countries.id <= $end GROUP BY countries.id
|
167
|
+
|
168
|
+
sql_attr_float = capitalization
|
169
|
+
sql_attr_uint = class_id
|
170
|
+
sql_attr_uint = company_facet
|
171
|
+
sql_attr_uint = company_name_facet
|
172
|
+
sql_attr_uint = company_two_facet
|
173
|
+
sql_attr_timestamp = created_at
|
174
|
+
sql_attr_bool = deleted
|
175
|
+
sql_attr_str2ordinal = mission_statement
|
176
|
+
sql_attr_uint = user_id
|
177
|
+
sql_query_info = SELECT * FROM countries WHERE countries.id = (($id - 4) / 5)
|
178
|
+
}
|
179
|
+
|
180
|
+
|
181
|
+
# Index configuration
|
182
|
+
|
183
|
+
index main
|
184
|
+
{
|
185
|
+
source = geo__addresses_main
|
186
|
+
source = geo__countries_main
|
187
|
+
source = geo__states_main
|
188
|
+
source = sellers_main
|
189
|
+
source = users_main
|
190
|
+
charset_type = utf-8
|
191
|
+
html_index_attrs =
|
192
|
+
charset_table = 0..9, A..Z->a..z, -, _, ., &, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F,U+C5->U+E5, U+E5, U+C4->U+E4, U+E4, U+D6->U+F6, U+F6, U+16B, U+0c1->a, U+0c4->a, U+0c9->e, U+0cd->i, U+0d3->o, U+0d4->o, U+0da->u, U+0dd->y, U+0e1->a, U+0e4->a, U+0e9->e, U+0ed->i, U+0f3->o, U+0f4->o, U+0fa->u, U+0fd->y, U+104->U+105, U+105, U+106->U+107, U+10c->c, U+10d->c, U+10e->d, U+10f->d, U+116->U+117, U+117, U+118->U+119, U+11a->e, U+11b->e, U+12E->U+12F, U+12F, U+139->l, U+13a->l, U+13d->l, U+13e->l, U+141->U+142, U+142, U+143->U+144, U+144,U+147->n, U+148->n, U+154->r, U+155->r, U+158->r, U+159->r, U+15A->U+15B, U+15B, U+160->s, U+160->U+161, U+161->s, U+164->t, U+165->t, U+16A->U+16B, U+16B, U+16e->u, U+16f->u, U+172->U+173, U+173, U+179->U+17A, U+17A, U+17B->U+17C, U+17C, U+17d->z, U+17e->z,
|
193
|
+
min_word_len = 1
|
194
|
+
# enable_star = 1
|
195
|
+
stopwords =
|
196
|
+
html_strip = 0
|
197
|
+
path = /tmp/sphinx//sphinx_index_main
|
198
|
+
docinfo = extern
|
199
|
+
morphology = stem_en
|
200
|
+
# min_infix_len = 1
|
201
|
+
}
|
202
|
+
|
203
|
+
|
204
|
+
# Source configuration
|
205
|
+
|
206
|
+
source sellers_delta
|
207
|
+
{
|
208
|
+
sql_range_step = 5000
|
209
|
+
sql_query_post =
|
210
|
+
sql_ranged_throttle = 0
|
211
|
+
|
212
|
+
type = mysql
|
213
|
+
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
214
|
+
sql_query_pre = SET NAMES utf8
|
215
|
+
|
216
|
+
sql_db = ultrasphinx_development
|
217
|
+
sql_host = localhost
|
218
|
+
sql_pass =
|
219
|
+
sql_user = root
|
220
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM sellers WHERE sellers.updated_at > DATE_SUB(NOW(), INTERVAL 88200 SECOND)
|
221
|
+
sql_query = SELECT (sellers.id * 5 + 1) AS id, '' AS address_name, sellers.capitalization AS capitalization, 'Seller' AS class, 1 AS class_id, '' AS company, 0 AS company_facet, sellers.company_name AS company_name, CAST(CRC32(sellers.company_name) AS unsigned) AS company_name_facet, '' AS company_two, 0 AS company_two_facet, '' AS content, UNIX_TIMESTAMP(sellers.created_at) AS created_at, 0 AS deleted, '' AS email, '' AS login, sellers.mission_statement AS mission_statement, '' AS name, '' AS state, sellers.user_id AS user_id FROM sellers WHERE sellers.id >= $start AND sellers.id <= $end AND sellers.updated_at > DATE_SUB(NOW(), INTERVAL 88200 SECOND) GROUP BY sellers.id
|
222
|
+
|
223
|
+
sql_attr_float = capitalization
|
224
|
+
sql_attr_uint = class_id
|
225
|
+
sql_attr_uint = company_facet
|
226
|
+
sql_attr_uint = company_name_facet
|
227
|
+
sql_attr_uint = company_two_facet
|
228
|
+
sql_attr_timestamp = created_at
|
229
|
+
sql_attr_bool = deleted
|
230
|
+
sql_attr_str2ordinal = mission_statement
|
231
|
+
sql_attr_uint = user_id
|
232
|
+
sql_query_info = SELECT * FROM sellers WHERE sellers.id = (($id - 1) / 5)
|
233
|
+
}
|
234
|
+
|
235
|
+
|
236
|
+
# Source configuration
|
237
|
+
|
238
|
+
source geo__addresses_delta
|
239
|
+
{
|
240
|
+
sql_range_step = 5000
|
241
|
+
sql_query_post =
|
242
|
+
sql_ranged_throttle = 0
|
243
|
+
|
244
|
+
type = mysql
|
245
|
+
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
246
|
+
sql_query_pre = SET NAMES utf8
|
247
|
+
|
248
|
+
sql_db = ultrasphinx_development
|
249
|
+
sql_host = localhost
|
250
|
+
sql_pass =
|
251
|
+
sql_user = root
|
252
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM addresses
|
253
|
+
sql_query = SELECT (addresses.id * 5 + 2) AS id, '' AS address_name, 0 AS capitalization, 'Geo::Address' AS class, 2 AS class_id, '' AS company, 0 AS company_facet, '' AS company_name, 0 AS company_name_facet, '' AS company_two, 0 AS company_two_facet, CONCAT_WS(' ', addresses.line_1, addresses.line_2, addresses.city, addresses.province_region, addresses.zip_postal_code) AS content, 18000 AS created_at, 0 AS deleted, '' AS email, '' AS login, '' AS mission_statement, addresses.name AS name, state.name AS state, 0 AS user_id FROM addresses LEFT OUTER JOIN states AS state ON state.id = addresses.state_id WHERE addresses.id >= $start AND addresses.id <= $end GROUP BY addresses.id
|
254
|
+
|
255
|
+
sql_attr_float = capitalization
|
256
|
+
sql_attr_uint = class_id
|
257
|
+
sql_attr_uint = company_facet
|
258
|
+
sql_attr_uint = company_name_facet
|
259
|
+
sql_attr_uint = company_two_facet
|
260
|
+
sql_attr_timestamp = created_at
|
261
|
+
sql_attr_bool = deleted
|
262
|
+
sql_attr_str2ordinal = mission_statement
|
263
|
+
sql_attr_uint = user_id
|
264
|
+
sql_query_info = SELECT * FROM addresses WHERE addresses.id = (($id - 2) / 5)
|
265
|
+
}
|
266
|
+
|
267
|
+
|
268
|
+
# Source configuration
|
269
|
+
|
270
|
+
source users_delta
|
271
|
+
{
|
272
|
+
sql_range_step = 5000
|
273
|
+
sql_query_post =
|
274
|
+
sql_ranged_throttle = 0
|
275
|
+
|
276
|
+
type = mysql
|
277
|
+
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
278
|
+
sql_query_pre = SET NAMES utf8
|
279
|
+
|
280
|
+
sql_db = ultrasphinx_development
|
281
|
+
sql_host = localhost
|
282
|
+
sql_pass =
|
283
|
+
sql_user = root
|
284
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM users WHERE users.created_at > DATE_SUB(NOW(), INTERVAL 88200 SECOND)
|
285
|
+
sql_query = SELECT (users.id * 5 + 3) AS id, '' AS address_name, 0 AS capitalization, 'User' AS class, 3 AS class_id, specific_seller.company_name AS company, CAST(CRC32(specific_seller.company_name) AS unsigned) AS company_facet, '' AS company_name, 0 AS company_name_facet, REPLACE(sellers_two.company_name, '6', ' replacement ') AS company_two, CAST(CRC32(REPLACE(sellers_two.company_name, '6', ' replacement ')) AS unsigned) AS company_two_facet, '' AS content, 18000 AS created_at, users.deleted AS deleted, users.email AS email, users.login AS login, '' AS mission_statement, '' AS name, '' AS state, 0 AS user_id FROM users LEFT OUTER JOIN sellers AS specific_seller ON users.id = specific_seller.user_id LEFT OUTER JOIN sellers AS sellers_two ON users.id = sellers_two.user_id WHERE users.id >= $start AND users.id <= $end AND (deleted = '0') AND users.created_at > DATE_SUB(NOW(), INTERVAL 88200 SECOND) GROUP BY users.id
|
286
|
+
|
287
|
+
sql_attr_float = capitalization
|
288
|
+
sql_attr_uint = class_id
|
289
|
+
sql_attr_uint = company_facet
|
290
|
+
sql_attr_uint = company_name_facet
|
291
|
+
sql_attr_uint = company_two_facet
|
292
|
+
sql_attr_timestamp = created_at
|
293
|
+
sql_attr_bool = deleted
|
294
|
+
sql_attr_str2ordinal = mission_statement
|
295
|
+
sql_attr_uint = user_id
|
296
|
+
sql_query_info = SELECT * FROM users WHERE users.id = (($id - 3) / 5)
|
297
|
+
}
|
298
|
+
|
299
|
+
|
300
|
+
# Index configuration
|
301
|
+
|
302
|
+
index delta
|
303
|
+
{
|
304
|
+
source = geo__addresses_delta
|
305
|
+
source = sellers_delta
|
306
|
+
source = users_delta
|
307
|
+
charset_type = utf-8
|
308
|
+
html_index_attrs =
|
309
|
+
charset_table = 0..9, A..Z->a..z, -, _, ., &, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F,U+C5->U+E5, U+E5, U+C4->U+E4, U+E4, U+D6->U+F6, U+F6, U+16B, U+0c1->a, U+0c4->a, U+0c9->e, U+0cd->i, U+0d3->o, U+0d4->o, U+0da->u, U+0dd->y, U+0e1->a, U+0e4->a, U+0e9->e, U+0ed->i, U+0f3->o, U+0f4->o, U+0fa->u, U+0fd->y, U+104->U+105, U+105, U+106->U+107, U+10c->c, U+10d->c, U+10e->d, U+10f->d, U+116->U+117, U+117, U+118->U+119, U+11a->e, U+11b->e, U+12E->U+12F, U+12F, U+139->l, U+13a->l, U+13d->l, U+13e->l, U+141->U+142, U+142, U+143->U+144, U+144,U+147->n, U+148->n, U+154->r, U+155->r, U+158->r, U+159->r, U+15A->U+15B, U+15B, U+160->s, U+160->U+161, U+161->s, U+164->t, U+165->t, U+16A->U+16B, U+16B, U+16e->u, U+16f->u, U+172->U+173, U+173, U+179->U+17A, U+17A, U+17B->U+17C, U+17C, U+17d->z, U+17e->z,
|
310
|
+
min_word_len = 1
|
311
|
+
# enable_star = 1
|
312
|
+
stopwords =
|
313
|
+
html_strip = 0
|
314
|
+
path = /tmp/sphinx//sphinx_index_delta
|
315
|
+
docinfo = extern
|
316
|
+
morphology = stem_en
|
317
|
+
# min_infix_len = 1
|
318
|
+
}
|
319
|
+
|
@@ -1,10 +1,11 @@
|
|
1
1
|
|
2
|
-
# Auto-generated at
|
2
|
+
# Auto-generated at Sat Mar 08 03:07:27 -0500 2008.
|
3
3
|
# Hand modifications will be overwritten.
|
4
|
-
# /Users/eweaver/Desktop/projects/
|
4
|
+
# /Users/eweaver/Desktop/projects/ub/vendor/plugins/ultrasphinx/test/integration/app/config/ultrasphinx/default.base
|
5
5
|
indexer {
|
6
6
|
mem_limit = 256M
|
7
7
|
}
|
8
|
+
|
8
9
|
searchd {
|
9
10
|
read_timeout = 5
|
10
11
|
max_children = 300
|
@@ -19,7 +20,7 @@ searchd {
|
|
19
20
|
|
20
21
|
# Source configuration
|
21
22
|
|
22
|
-
source
|
23
|
+
source geo__states_main
|
23
24
|
{
|
24
25
|
sql_range_step = 5000
|
25
26
|
sql_query_post =
|
@@ -33,12 +34,14 @@ sql_db = ultrasphinx_development
|
|
33
34
|
sql_host = localhost
|
34
35
|
sql_pass =
|
35
36
|
sql_user = root
|
36
|
-
sql_query_range = SELECT MIN(id) ,
|
37
|
-
sql_query = SELECT (states.id * 5 + 0) AS id, CAST(GROUP_CONCAT(DISTINCT addresses.name SEPARATOR ' ') AS CHAR) AS address_name, 0 AS capitalization, 'Geo::State' AS class, 0 AS class_id, '' AS company, '' AS company_name, 0 AS company_name_facet, '' AS company_two, '' AS content, 18000 AS created_at, 0 AS deleted, '' AS email, '' AS login, '' AS mission_statement, '' AS name, '' AS state, 0 AS user_id FROM states LEFT OUTER JOIN addresses AS addresses ON states.id = addresses.state_id WHERE states.id >= $start AND states.id <= $end GROUP BY states.id
|
37
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM states
|
38
|
+
sql_query = SELECT (states.id * 5 + 0) AS id, CAST(GROUP_CONCAT(DISTINCT addresses.name SEPARATOR ' ') AS CHAR) AS address_name, 0 AS capitalization, 'Geo::State' AS class, 0 AS class_id, '' AS company, 0 AS company_facet, '' AS company_name, 0 AS company_name_facet, '' AS company_two, 0 AS company_two_facet, '' AS content, 18000 AS created_at, 0 AS deleted, '' AS email, '' AS login, '' AS mission_statement, '' AS name, '' AS state, 0 AS user_id FROM states LEFT OUTER JOIN addresses AS addresses ON states.id = addresses.state_id WHERE states.id >= $start AND states.id <= $end GROUP BY states.id
|
38
39
|
|
39
40
|
sql_attr_float = capitalization
|
40
41
|
sql_attr_uint = class_id
|
42
|
+
sql_attr_uint = company_facet
|
41
43
|
sql_attr_uint = company_name_facet
|
44
|
+
sql_attr_uint = company_two_facet
|
42
45
|
sql_attr_timestamp = created_at
|
43
46
|
sql_attr_bool = deleted
|
44
47
|
sql_attr_str2ordinal = mission_statement
|
@@ -49,7 +52,7 @@ sql_query_info = SELECT * FROM states WHERE states.id = (($id - 0) / 5)
|
|
49
52
|
|
50
53
|
# Source configuration
|
51
54
|
|
52
|
-
source
|
55
|
+
source sellers_main
|
53
56
|
{
|
54
57
|
sql_range_step = 5000
|
55
58
|
sql_query_post =
|
@@ -63,12 +66,14 @@ sql_db = ultrasphinx_development
|
|
63
66
|
sql_host = localhost
|
64
67
|
sql_pass =
|
65
68
|
sql_user = root
|
66
|
-
sql_query_range = SELECT MIN(id) ,
|
67
|
-
sql_query = SELECT (sellers.id * 5 + 1) AS id, '' AS address_name, sellers.capitalization AS capitalization, 'Seller' AS class, 1 AS class_id, '' AS company, sellers.company_name AS company_name, CAST(CRC32(sellers.company_name) AS unsigned) AS company_name_facet, '' AS company_two, '' AS content, UNIX_TIMESTAMP(sellers.created_at) AS created_at, 0 AS deleted, '' AS email, '' AS login, sellers.mission_statement AS mission_statement, '' AS name, '' AS state, sellers.user_id AS user_id FROM sellers WHERE sellers.id >= $start AND sellers.id <= $end GROUP BY sellers.id
|
69
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM sellers
|
70
|
+
sql_query = SELECT (sellers.id * 5 + 1) AS id, '' AS address_name, sellers.capitalization AS capitalization, 'Seller' AS class, 1 AS class_id, '' AS company, 0 AS company_facet, sellers.company_name AS company_name, CAST(CRC32(sellers.company_name) AS unsigned) AS company_name_facet, '' AS company_two, 0 AS company_two_facet, '' AS content, UNIX_TIMESTAMP(sellers.created_at) AS created_at, 0 AS deleted, '' AS email, '' AS login, sellers.mission_statement AS mission_statement, '' AS name, '' AS state, sellers.user_id AS user_id FROM sellers WHERE sellers.id >= $start AND sellers.id <= $end GROUP BY sellers.id
|
68
71
|
|
69
72
|
sql_attr_float = capitalization
|
70
73
|
sql_attr_uint = class_id
|
74
|
+
sql_attr_uint = company_facet
|
71
75
|
sql_attr_uint = company_name_facet
|
76
|
+
sql_attr_uint = company_two_facet
|
72
77
|
sql_attr_timestamp = created_at
|
73
78
|
sql_attr_bool = deleted
|
74
79
|
sql_attr_str2ordinal = mission_statement
|
@@ -79,7 +84,7 @@ sql_query_info = SELECT * FROM sellers WHERE sellers.id = (($id - 1) / 5)
|
|
79
84
|
|
80
85
|
# Source configuration
|
81
86
|
|
82
|
-
source
|
87
|
+
source geo__addresses_main
|
83
88
|
{
|
84
89
|
sql_range_step = 5000
|
85
90
|
sql_query_post =
|
@@ -93,12 +98,14 @@ sql_db = ultrasphinx_development
|
|
93
98
|
sql_host = localhost
|
94
99
|
sql_pass =
|
95
100
|
sql_user = root
|
96
|
-
sql_query_range = SELECT MIN(id) ,
|
97
|
-
sql_query = SELECT (addresses.id * 5 + 2) AS id, '' AS address_name, 0 AS capitalization, 'Geo::Address' AS class, 2 AS class_id, '' AS company, '' AS company_name, 0 AS company_name_facet, '' AS company_two, CONCAT_WS(' ', addresses.line_1, addresses.line_2, addresses.city, addresses.province_region, addresses.zip_postal_code) AS content, 18000 AS created_at, 0 AS deleted, '' AS email, '' AS login, '' AS mission_statement, addresses.name AS name, state.name AS state, 0 AS user_id FROM addresses LEFT OUTER JOIN states AS state ON state.id = addresses.state_id WHERE addresses.id >= $start AND addresses.id <= $end GROUP BY addresses.id
|
101
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM addresses
|
102
|
+
sql_query = SELECT (addresses.id * 5 + 2) AS id, '' AS address_name, 0 AS capitalization, 'Geo::Address' AS class, 2 AS class_id, '' AS company, 0 AS company_facet, '' AS company_name, 0 AS company_name_facet, '' AS company_two, 0 AS company_two_facet, CONCAT_WS(' ', addresses.line_1, addresses.line_2, addresses.city, addresses.province_region, addresses.zip_postal_code) AS content, 18000 AS created_at, 0 AS deleted, '' AS email, '' AS login, '' AS mission_statement, addresses.name AS name, state.name AS state, 0 AS user_id FROM addresses LEFT OUTER JOIN states AS state ON state.id = addresses.state_id WHERE addresses.id >= $start AND addresses.id <= $end GROUP BY addresses.id
|
98
103
|
|
99
104
|
sql_attr_float = capitalization
|
100
105
|
sql_attr_uint = class_id
|
106
|
+
sql_attr_uint = company_facet
|
101
107
|
sql_attr_uint = company_name_facet
|
108
|
+
sql_attr_uint = company_two_facet
|
102
109
|
sql_attr_timestamp = created_at
|
103
110
|
sql_attr_bool = deleted
|
104
111
|
sql_attr_str2ordinal = mission_statement
|
@@ -109,7 +116,7 @@ sql_query_info = SELECT * FROM addresses WHERE addresses.id = (($id - 2) / 5)
|
|
109
116
|
|
110
117
|
# Source configuration
|
111
118
|
|
112
|
-
source
|
119
|
+
source users_main
|
113
120
|
{
|
114
121
|
sql_range_step = 5000
|
115
122
|
sql_query_post =
|
@@ -123,12 +130,14 @@ sql_db = ultrasphinx_development
|
|
123
130
|
sql_host = localhost
|
124
131
|
sql_pass =
|
125
132
|
sql_user = root
|
126
|
-
sql_query_range = SELECT MIN(id) ,
|
127
|
-
sql_query = SELECT (users.id * 5 + 3) AS id, '' AS address_name, 0 AS capitalization, 'User' AS class, 3 AS class_id, specific_seller.company_name AS company, '' AS company_name, 0 AS company_name_facet, REPLACE(sellers_two.company_name, '6', ' replacement ') AS company_two, '' AS content, 18000 AS created_at, users.deleted AS deleted, users.email AS email, users.login AS login, '' AS mission_statement, '' AS name, '' AS state, 0 AS user_id FROM users LEFT OUTER JOIN sellers AS specific_seller ON users.id = specific_seller.user_id LEFT OUTER JOIN sellers AS sellers_two ON users.id = sellers_two.user_id WHERE users.id >= $start AND users.id <= $end AND (deleted = '0') GROUP BY users.id
|
133
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM users
|
134
|
+
sql_query = SELECT (users.id * 5 + 3) AS id, '' AS address_name, 0 AS capitalization, 'User' AS class, 3 AS class_id, specific_seller.company_name AS company, CAST(CRC32(specific_seller.company_name) AS unsigned) AS company_facet, '' AS company_name, 0 AS company_name_facet, REPLACE(sellers_two.company_name, '6', ' replacement ') AS company_two, CAST(CRC32(REPLACE(sellers_two.company_name, '6', ' replacement ')) AS unsigned) AS company_two_facet, '' AS content, 18000 AS created_at, users.deleted AS deleted, users.email AS email, users.login AS login, '' AS mission_statement, '' AS name, '' AS state, 0 AS user_id FROM users LEFT OUTER JOIN sellers AS specific_seller ON users.id = specific_seller.user_id LEFT OUTER JOIN sellers AS sellers_two ON users.id = sellers_two.user_id WHERE users.id >= $start AND users.id <= $end AND (deleted = '0') GROUP BY users.id
|
128
135
|
|
129
136
|
sql_attr_float = capitalization
|
130
137
|
sql_attr_uint = class_id
|
138
|
+
sql_attr_uint = company_facet
|
131
139
|
sql_attr_uint = company_name_facet
|
140
|
+
sql_attr_uint = company_two_facet
|
132
141
|
sql_attr_timestamp = created_at
|
133
142
|
sql_attr_bool = deleted
|
134
143
|
sql_attr_str2ordinal = mission_statement
|
@@ -139,7 +148,7 @@ sql_query_info = SELECT * FROM users WHERE users.id = (($id - 3) / 5)
|
|
139
148
|
|
140
149
|
# Source configuration
|
141
150
|
|
142
|
-
source
|
151
|
+
source geo__countries_main
|
143
152
|
{
|
144
153
|
sql_range_step = 5000
|
145
154
|
sql_query_post =
|
@@ -153,12 +162,14 @@ sql_db = ultrasphinx_development
|
|
153
162
|
sql_host = localhost
|
154
163
|
sql_pass =
|
155
164
|
sql_user = root
|
156
|
-
sql_query_range = SELECT MIN(id) ,
|
157
|
-
sql_query = SELECT (countries.id * 5 + 4) AS id, '' AS address_name, 0 AS capitalization, 'Geo::Country' AS class, 4 AS class_id, '' AS company, '' AS company_name, 0 AS company_name_facet, '' AS company_two, '' AS content, 18000 AS created_at, 0 AS deleted, '' AS email, '' AS login, '' AS mission_statement, countries.name AS name, '' AS state, 0 AS user_id FROM countries WHERE countries.id >= $start AND countries.id <= $end GROUP BY countries.id
|
165
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM countries
|
166
|
+
sql_query = SELECT (countries.id * 5 + 4) AS id, '' AS address_name, 0 AS capitalization, 'Geo::Country' AS class, 4 AS class_id, '' AS company, 0 AS company_facet, '' AS company_name, 0 AS company_name_facet, '' AS company_two, 0 AS company_two_facet, '' AS content, 18000 AS created_at, 0 AS deleted, '' AS email, '' AS login, '' AS mission_statement, countries.name AS name, '' AS state, 0 AS user_id FROM countries WHERE countries.id >= $start AND countries.id <= $end GROUP BY countries.id
|
158
167
|
|
159
168
|
sql_attr_float = capitalization
|
160
169
|
sql_attr_uint = class_id
|
170
|
+
sql_attr_uint = company_facet
|
161
171
|
sql_attr_uint = company_name_facet
|
172
|
+
sql_attr_uint = company_two_facet
|
162
173
|
sql_attr_timestamp = created_at
|
163
174
|
sql_attr_bool = deleted
|
164
175
|
sql_attr_str2ordinal = mission_statement
|
@@ -169,13 +180,130 @@ sql_query_info = SELECT * FROM countries WHERE countries.id = (($id - 4) / 5)
|
|
169
180
|
|
170
181
|
# Index configuration
|
171
182
|
|
172
|
-
index
|
183
|
+
index main
|
184
|
+
{
|
185
|
+
source = geo__addresses_main
|
186
|
+
source = geo__countries_main
|
187
|
+
source = geo__states_main
|
188
|
+
source = sellers_main
|
189
|
+
source = users_main
|
190
|
+
charset_type = utf-8
|
191
|
+
html_index_attrs =
|
192
|
+
charset_table = 0..9, A..Z->a..z, -, _, ., &, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F,U+C5->U+E5, U+E5, U+C4->U+E4, U+E4, U+D6->U+F6, U+F6, U+16B, U+0c1->a, U+0c4->a, U+0c9->e, U+0cd->i, U+0d3->o, U+0d4->o, U+0da->u, U+0dd->y, U+0e1->a, U+0e4->a, U+0e9->e, U+0ed->i, U+0f3->o, U+0f4->o, U+0fa->u, U+0fd->y, U+104->U+105, U+105, U+106->U+107, U+10c->c, U+10d->c, U+10e->d, U+10f->d, U+116->U+117, U+117, U+118->U+119, U+11a->e, U+11b->e, U+12E->U+12F, U+12F, U+139->l, U+13a->l, U+13d->l, U+13e->l, U+141->U+142, U+142, U+143->U+144, U+144,U+147->n, U+148->n, U+154->r, U+155->r, U+158->r, U+159->r, U+15A->U+15B, U+15B, U+160->s, U+160->U+161, U+161->s, U+164->t, U+165->t, U+16A->U+16B, U+16B, U+16e->u, U+16f->u, U+172->U+173, U+173, U+179->U+17A, U+17A, U+17B->U+17C, U+17C, U+17d->z, U+17e->z,
|
193
|
+
min_word_len = 1
|
194
|
+
# enable_star = 1
|
195
|
+
stopwords =
|
196
|
+
html_strip = 0
|
197
|
+
path = /tmp/sphinx//sphinx_index_main
|
198
|
+
docinfo = extern
|
199
|
+
morphology = stem_en
|
200
|
+
# min_infix_len = 1
|
201
|
+
}
|
202
|
+
|
203
|
+
|
204
|
+
# Source configuration
|
205
|
+
|
206
|
+
source sellers_delta
|
207
|
+
{
|
208
|
+
sql_range_step = 5000
|
209
|
+
sql_query_post =
|
210
|
+
sql_ranged_throttle = 0
|
211
|
+
|
212
|
+
type = mysql
|
213
|
+
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
214
|
+
sql_query_pre = SET NAMES utf8
|
215
|
+
|
216
|
+
sql_db = ultrasphinx_development
|
217
|
+
sql_host = localhost
|
218
|
+
sql_pass =
|
219
|
+
sql_user = root
|
220
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM sellers WHERE sellers.updated_at > DATE_SUB(NOW(), INTERVAL 88200 SECOND)
|
221
|
+
sql_query = SELECT (sellers.id * 5 + 1) AS id, '' AS address_name, sellers.capitalization AS capitalization, 'Seller' AS class, 1 AS class_id, '' AS company, 0 AS company_facet, sellers.company_name AS company_name, CAST(CRC32(sellers.company_name) AS unsigned) AS company_name_facet, '' AS company_two, 0 AS company_two_facet, '' AS content, UNIX_TIMESTAMP(sellers.created_at) AS created_at, 0 AS deleted, '' AS email, '' AS login, sellers.mission_statement AS mission_statement, '' AS name, '' AS state, sellers.user_id AS user_id FROM sellers WHERE sellers.id >= $start AND sellers.id <= $end AND sellers.updated_at > DATE_SUB(NOW(), INTERVAL 88200 SECOND) GROUP BY sellers.id
|
222
|
+
|
223
|
+
sql_attr_float = capitalization
|
224
|
+
sql_attr_uint = class_id
|
225
|
+
sql_attr_uint = company_facet
|
226
|
+
sql_attr_uint = company_name_facet
|
227
|
+
sql_attr_uint = company_two_facet
|
228
|
+
sql_attr_timestamp = created_at
|
229
|
+
sql_attr_bool = deleted
|
230
|
+
sql_attr_str2ordinal = mission_statement
|
231
|
+
sql_attr_uint = user_id
|
232
|
+
sql_query_info = SELECT * FROM sellers WHERE sellers.id = (($id - 1) / 5)
|
233
|
+
}
|
234
|
+
|
235
|
+
|
236
|
+
# Source configuration
|
237
|
+
|
238
|
+
source geo__addresses_delta
|
239
|
+
{
|
240
|
+
sql_range_step = 5000
|
241
|
+
sql_query_post =
|
242
|
+
sql_ranged_throttle = 0
|
243
|
+
|
244
|
+
type = mysql
|
245
|
+
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
246
|
+
sql_query_pre = SET NAMES utf8
|
247
|
+
|
248
|
+
sql_db = ultrasphinx_development
|
249
|
+
sql_host = localhost
|
250
|
+
sql_pass =
|
251
|
+
sql_user = root
|
252
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM addresses
|
253
|
+
sql_query = SELECT (addresses.id * 5 + 2) AS id, '' AS address_name, 0 AS capitalization, 'Geo::Address' AS class, 2 AS class_id, '' AS company, 0 AS company_facet, '' AS company_name, 0 AS company_name_facet, '' AS company_two, 0 AS company_two_facet, CONCAT_WS(' ', addresses.line_1, addresses.line_2, addresses.city, addresses.province_region, addresses.zip_postal_code) AS content, 18000 AS created_at, 0 AS deleted, '' AS email, '' AS login, '' AS mission_statement, addresses.name AS name, state.name AS state, 0 AS user_id FROM addresses LEFT OUTER JOIN states AS state ON state.id = addresses.state_id WHERE addresses.id >= $start AND addresses.id <= $end GROUP BY addresses.id
|
254
|
+
|
255
|
+
sql_attr_float = capitalization
|
256
|
+
sql_attr_uint = class_id
|
257
|
+
sql_attr_uint = company_facet
|
258
|
+
sql_attr_uint = company_name_facet
|
259
|
+
sql_attr_uint = company_two_facet
|
260
|
+
sql_attr_timestamp = created_at
|
261
|
+
sql_attr_bool = deleted
|
262
|
+
sql_attr_str2ordinal = mission_statement
|
263
|
+
sql_attr_uint = user_id
|
264
|
+
sql_query_info = SELECT * FROM addresses WHERE addresses.id = (($id - 2) / 5)
|
265
|
+
}
|
266
|
+
|
267
|
+
|
268
|
+
# Source configuration
|
269
|
+
|
270
|
+
source users_delta
|
271
|
+
{
|
272
|
+
sql_range_step = 5000
|
273
|
+
sql_query_post =
|
274
|
+
sql_ranged_throttle = 0
|
275
|
+
|
276
|
+
type = mysql
|
277
|
+
sql_query_pre = SET SESSION group_concat_max_len = 65535
|
278
|
+
sql_query_pre = SET NAMES utf8
|
279
|
+
|
280
|
+
sql_db = ultrasphinx_development
|
281
|
+
sql_host = localhost
|
282
|
+
sql_pass =
|
283
|
+
sql_user = root
|
284
|
+
sql_query_range = SELECT MIN(id) , MAX(id) FROM users WHERE users.created_at > DATE_SUB(NOW(), INTERVAL 88200 SECOND)
|
285
|
+
sql_query = SELECT (users.id * 5 + 3) AS id, '' AS address_name, 0 AS capitalization, 'User' AS class, 3 AS class_id, specific_seller.company_name AS company, CAST(CRC32(specific_seller.company_name) AS unsigned) AS company_facet, '' AS company_name, 0 AS company_name_facet, REPLACE(sellers_two.company_name, '6', ' replacement ') AS company_two, CAST(CRC32(REPLACE(sellers_two.company_name, '6', ' replacement ')) AS unsigned) AS company_two_facet, '' AS content, 18000 AS created_at, users.deleted AS deleted, users.email AS email, users.login AS login, '' AS mission_statement, '' AS name, '' AS state, 0 AS user_id FROM users LEFT OUTER JOIN sellers AS specific_seller ON users.id = specific_seller.user_id LEFT OUTER JOIN sellers AS sellers_two ON users.id = sellers_two.user_id WHERE users.id >= $start AND users.id <= $end AND (deleted = '0') AND users.created_at > DATE_SUB(NOW(), INTERVAL 88200 SECOND) GROUP BY users.id
|
286
|
+
|
287
|
+
sql_attr_float = capitalization
|
288
|
+
sql_attr_uint = class_id
|
289
|
+
sql_attr_uint = company_facet
|
290
|
+
sql_attr_uint = company_name_facet
|
291
|
+
sql_attr_uint = company_two_facet
|
292
|
+
sql_attr_timestamp = created_at
|
293
|
+
sql_attr_bool = deleted
|
294
|
+
sql_attr_str2ordinal = mission_statement
|
295
|
+
sql_attr_uint = user_id
|
296
|
+
sql_query_info = SELECT * FROM users WHERE users.id = (($id - 3) / 5)
|
297
|
+
}
|
298
|
+
|
299
|
+
|
300
|
+
# Index configuration
|
301
|
+
|
302
|
+
index delta
|
173
303
|
{
|
174
|
-
source =
|
175
|
-
source =
|
176
|
-
source =
|
177
|
-
source = sellers
|
178
|
-
source = users
|
304
|
+
source = geo__addresses_delta
|
305
|
+
source = sellers_delta
|
306
|
+
source = users_delta
|
179
307
|
charset_type = utf-8
|
180
308
|
html_index_attrs =
|
181
309
|
charset_table = 0..9, A..Z->a..z, -, _, ., &, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F,U+C5->U+E5, U+E5, U+C4->U+E4, U+E4, U+D6->U+F6, U+F6, U+16B, U+0c1->a, U+0c4->a, U+0c9->e, U+0cd->i, U+0d3->o, U+0d4->o, U+0da->u, U+0dd->y, U+0e1->a, U+0e4->a, U+0e9->e, U+0ed->i, U+0f3->o, U+0f4->o, U+0fa->u, U+0fd->y, U+104->U+105, U+105, U+106->U+107, U+10c->c, U+10d->c, U+10e->d, U+10f->d, U+116->U+117, U+117, U+118->U+119, U+11a->e, U+11b->e, U+12E->U+12F, U+12F, U+139->l, U+13a->l, U+13d->l, U+13e->l, U+141->U+142, U+142, U+143->U+144, U+144,U+147->n, U+148->n, U+154->r, U+155->r, U+158->r, U+159->r, U+15A->U+15B, U+15B, U+160->s, U+160->U+161, U+161->s, U+164->t, U+165->t, U+16A->U+16B, U+16B, U+16e->u, U+16f->u, U+172->U+173, U+173, U+179->U+17A, U+17A, U+17B->U+17C, U+17C, U+17d->z, U+17e->z,
|
@@ -183,7 +311,7 @@ index complete
|
|
183
311
|
# enable_star = 1
|
184
312
|
stopwords =
|
185
313
|
html_strip = 0
|
186
|
-
path = /tmp/sphinx//
|
314
|
+
path = /tmp/sphinx//sphinx_index_delta
|
187
315
|
docinfo = extern
|
188
316
|
morphology = stem_en
|
189
317
|
# min_infix_len = 1
|