File: test.xml

package info (click to toggle)
sphinxsearch 2.2.11-8
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 25,720 kB
  • sloc: cpp: 102,259; xml: 85,608; sh: 9,259; php: 3,790; ansic: 3,158; yacc: 1,969; java: 1,336; ruby: 1,289; python: 1,062; pascal: 912; perl: 381; lex: 275; makefile: 150; sql: 77; cs: 35
file content (273 lines) | stat: -rw-r--r-- 8,900 bytes parent folder | download | duplicates (3)
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<?xml version="1.0" encoding="utf-8"?>

<test>
<name>snippets vs multiwordforms</name>
<requires><sphinxql_keep_null/></requires>

<config>
searchd
{
	<searchd_settings/>
	workers = threads
	dist_threads = 2
}

source test
{
	type = mysql
	<sql_settings/>
	sql_query = SELECT 1, 'text';
}

index test
{
	source			= test
	path			= <data_path/>/test

	wordforms = <this_test/>/wordforms.txt
	blend_chars = +
}

source src_snip
{
	type			= mysql
	<sql_settings/>

	sql_query		= SELECT 1 as id , 1 as idd, 2 as idd2, 'viva las mundos' as body
	sql_attr_uint = idd
	sql_attr_uint = idd2
	sql_field_string = body
}

index snip2
{
	source			= src_snip
	path			= <data_path/>/snip2
}

source src_snip22
{
	type			= mysql
	<sql_settings/>

	sql_query		= SELECT 100 as id , 1 as idd, 20 as idd2, 'viva las mundos' as body
	sql_attr_uint = idd
	sql_attr_uint = idd2
	sql_field_string = body
}

index snip22
{
	source			= src_snip22
	path			= <data_path/>/snip22
}

source src_snip3
{
	type			= mysql
	<sql_settings/>

	sql_query		= SELECT 10 as id , 1 as idd, 20 as pup, 'viva las mundos' as body
	sql_attr_uint = pup
	sql_attr_uint = idd
	sql_field_string = body
}

index snip3
{
	source			= src_snip3
	path			= <data_path/>/snip3
}

index dist1
{
	type = distributed
	local = snip2
	local = snip3
}

index dist2
{
	type = distributed
	local = snip2
	agent = <my_address/>:snip3
}

index dist3
{
	type = distributed
	agent = <my_address/>:snip2
	agent = <my_address/>:snip3
}

index dist11
{
	type = distributed
	local = snip2
	local = snip22
}

index dist12
{
	type = distributed
	local = snip2
	agent = <my_address/>:snip22
}

index dist13
{
	type = distributed
	agent = <my_address/>:snip2
	agent = <my_address/>:snip22
}

index test_milti
{
	type		= template
	wordforms	= <this_test/>/wordforms_multi_dest.txt
	charset_table = english, 0..9
}

index dist_all1
{
	type = distributed
	local = snip2
	local = snip22
	local = snip3
}

source src_snip301
{
	type			= mysql
	<sql_settings/>
	sql_query		= SELECT document_id+0 as id, idd+0 as idd, body FROM test_table
	sql_attr_uint = idd
	sql_field_string = body
}
source src_snip302 : src_snip301
{
	sql_query		= SELECT document_id+10 as id, idd+10 as idd, body FROM test_table
}
source src_snip303 : src_snip301
{
	sql_query		= SELECT document_id+20 as id, idd+20 as idd, 1 as idd1, body FROM test_table
	sql_attr_uint = idd1
}
index snip301
{
	source			= src_snip301
	path			= <data_path/>/snip301
}
index snip302 : snip301
{
	source			= src_snip302
	path			= <data_path/>/snip302
}
index snip303 : snip301
{
	source			= src_snip303
	path			= <data_path/>/snip303
}

index dist_all2
{
	type = distributed
	local = snip301
	local = snip302
	local = snip303
}

</config>

<db_create>
CREATE TABLE `test_table` (
  `document_id` int(5) NOT NULL default '0',
  `idd` int(5) NOT NULL default '0',
  `body` varchar(255) NOT NULL default ''
)
</db_create>

<db_drop>DROP TABLE IF EXISTS `test_table`</db_drop>
<db_insert>
INSERT INTO `test_table` VALUES
(1,1,'viva las mundos'),
(2,2,'viva las mundos'),
(3,3,'viva las mundos'),
(4,4,'viva las mundos'),
(5,5,'viva las mundos'),
(6,6,'viva las mundos'),
(7,7,'viva las mundos'),
(8,8,'viva las mundos'),
(9,9,'viva las mundos'),
(10,10,'viva las mundos')
</db_insert>

<sphqueries>
<sphinxql>CALL SNIPPETS('Kph on Europe road 1110', 'test', 'kph', 1 AS query_mode )</sphinxql>
<sphinxql>CALL SNIPPETS('when you on+time do it', 'test', 'you on', 1 AS query_mode )</sphinxql>
<sphinxql>CALL SNIPPETS('when you on+time do it', 'test', 'you time', 1 AS query_mode )</sphinxql>
<sphinxql>CALL SNIPPETS('you on+time 0 es you 0 at', 'test', 'none', 1 AS query_mode )</sphinxql>
<sphinxql>CALL SNIPPETS('you on+time 0 es you 0 at', 'test', '0', 1 AS query_mode )</sphinxql>

<!-- regression SNIPPET crash -->
<sphinxql>select id, SNIPPET('', '') as s from snip2 where match ('silver')</sphinxql>
<sphinxql>select id, SNIPPET('body as las void', 'las') as s from snip2 where match ('las')</sphinxql>
<sphinxql>select id, SNIPPET(body, 'las') as s from snip2 where match ('las')</sphinxql>
<sphinxql>select id, SNIPPET('something', snip2) from snip2</sphinxql>

<!-- regression SNIPPET expression from distributed index -->
<sphinxql>select *, SNIPPET('body as las void', 'las') from dist3</sphinxql>
<sphinxql>select *, SNIPPET(body, 'las') from dist3</sphinxql>
<sphinxql>select *, SNIPPET('body as las void', 'las') from dist2</sphinxql>
<sphinxql>select *, SNIPPET(body, 'las') from dist2</sphinxql>
<sphinxql>select *, SNIPPET('body as las void', 'las') from dist1</sphinxql>
<sphinxql>select *, SNIPPET(body, 'las') from dist1</sphinxql>
<sphinxql>select *, SNIPPET(body, 'cas') from dist2</sphinxql>
<sphinxql>select *, SNIPPET(body, 'cas') from dist1</sphinxql>
<sphinxql>select *, SNIPPET(body, 'las') from dist11</sphinxql>
<sphinxql>select *, SNIPPET(body, 'las') from dist12</sphinxql>
<sphinxql>select *, SNIPPET(body, 'las') from dist13</sphinxql>
<sphinxql>select id, body, SNIPPET(body, '','allow_empty=1', 'query_mode=1') from snip2</sphinxql>
<sphinxql>select id, body, SNIPPET(body, '','allow_empty=0', 'query_mode=1') from snip2</sphinxql>

<!-- start\whole doc on query\plain -->
<sphinxql>CALL SNIPPETS('tried and true 1 12 11 11 11 11', 'test_milti', 'notfound', 1 AS query_mode, 25 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('tried and true 1 12 11 11 11 11', 'test_milti', 'notfound', 1 AS query_mode, 0 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('tried and true 1 12 11 11 11 11', 'test_milti', 'notfound', 0 AS query_mode, 25 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('tried and true 1 12 11 11 11 11', 'test_milti', 'notfound', 0 AS query_mode, 0 as limit )</sphinxql>
<!-- higlight start\whole doc on query\plain -->
<sphinxql>CALL SNIPPETS('tried and true 1 12 11 11 11 11', 'test_milti', 'time1', 1 AS query_mode, 25 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('tried and true 1 12 11 11 11 11', 'test_milti', 'test1', 1 AS query_mode, 0 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('tried and true 1 12 11 11 11 11', 'test_milti', 'time1', 0 AS query_mode, 25 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('tried and true 1 12 11 11 11 11', 'test_milti', 'test1', 0 AS query_mode, 0 as limit )</sphinxql>

<sphinxql>CALL SNIPPETS('17 64 15 tripple and true 1 12 11 11 11 11', 'test_milti', 'time2', 1 AS query_mode, 25 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('17 64 15 tripple and true 1 12 11 11 11 11', 'test_milti', 'test2', 1 AS query_mode, 0 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('17 64 15 tripple and true 1 12 11 11 11 11', 'test_milti', 'time2', 0 AS query_mode, 25 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('17 64 15 tripple and true 1 12 11 11 11 11', 'test_milti', 'test2', 0 AS query_mode, 0 as limit )</sphinxql>

<sphinxql>CALL SNIPPETS('17 64 15 dou true 1 12 11 11 11 11', 'test_milti', 'time3', 1 AS query_mode, 25 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('17 64 15 dou true 1 12 11 11 11 11', 'test_milti', 'test3', 1 AS query_mode, 0 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('17 64 15 dou true 1 12 11 11 11 11', 'test_milti', 'time3', 0 AS query_mode, 25 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('17 64 15 dou true 1 12 11 11 11 11', 'test_milti', 'test3', 0 AS query_mode, 0 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('17 64 15 dou true 1 12 11 11 11 11', 'test_milti', 'time3 for', 1 AS query_mode, 25 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('17 64 15 dou true 1 12 11 11 11 11', 'test_milti', 'for test3', 1 AS query_mode, 0 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('17 64 15 dou true 1 12 11 11 11 11', 'test_milti', 'time3 for', 0 AS query_mode, 25 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('17 64 15 dou true 1 12 11 11 11 11', 'test_milti', 'for test3', 0 AS query_mode, 0 as limit )</sphinxql>

<sphinxql>CALL SNIPPETS('17 64 15 tripple and true 1 12 11 11 11 11', 'test_milti', '"for test2"', 1 AS query_mode, 25 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('17 64 15 tripple and true 1 12 11 11 11 11', 'test_milti', '"for test2"', 1 AS query_mode, 0 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('17 64 15 dou true 1 12 11 11 11 11', 'test_milti', '"time3 for"', 1 AS query_mode, 25 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS('17 64 15 dou true 1 12 11 11 11 11', 'test_milti', '"time3 for"', 1 AS query_mode, 0 as limit )</sphinxql>

<sphinxql>select *, SNIPPET(body, 'las') from dist_all1</sphinxql>
<sphinxql>select *, SNIPPET(body, 'las') from dist_all1 limit 1,2</sphinxql>
<sphinxql>select *, SNIPPET(body, 'las') from dist_all1 limit 0,2</sphinxql>
<sphinxql>select *, SNIPPET(body, 'las') from dist_all2 limit 0,20</sphinxql>
<sphinxql>select *, SNIPPET(body, 'las') from dist_all2 limit 10,20</sphinxql>
<sphinxql>select *, SNIPPET(body, 'las') from dist_all2 limit 20,20</sphinxql>
<sphinxql>select *, SNIPPET(body, 'las') from dist_all2 limit 20,2</sphinxql>

</sphqueries>

</test>