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 (177 lines) | stat: -rw-r--r-- 4,092 bytes parent folder | download | duplicates (4)
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
<?xml version="1.0" encoding="utf-8"?>
<test>

<name>Bigint and float attribute updates via sphinxql</name>

<requires></requires>

<config>
indexer
{
	mem_limit		= 16M
}

searchd
{
	<searchd_settings/>
	workers = threads
	binlog_path = #
}

source src
{
	type			= mysql
	<sql_settings/>
	sql_query = SELECT * FROM test_table WHERE id&lt;4
	sql_attr_uint	= section
	sql_attr_bigint = bint
	sql_attr_float = bfloat
}

source src1 : src
{
	sql_query = SELECT * FROM test_table WHERE id&lt;3
}

source src2 : src
{
	sql_query = SELECT *  FROM test_table WHERE id=3
}

index dist_no
{
	source			= src
	path			= <data_path/>/idx
	docinfo			= extern
	min_word_len	= 1
}

index idx1 : dist_no
{
	source			= src1
	path			= <data_path/>/idx1
}

index idx2 : dist_no
{
	source			= src2
	path			= <data_path/>/idx2
}

index dist0
{
	type					= distributed
	local					= dist_no
	agent_connect_timeout	= 1000
	agent_query_timeout		= 3000
}

index dist1
{
	type					= distributed
	local					= idx1
	local					= idx2
	agent_connect_timeout	= 1000
	agent_query_timeout		= 3000
}

index dist2
{
	type					= distributed
	agent					= <my_address/>:idx1
	local					= idx2
	agent_connect_timeout	= 1000
	agent_query_timeout		= 3000
}

index dist3
{
	type					= distributed
	local					= idx1
	agent					= <my_address/>:idx2
	agent_connect_timeout	= 1000
	agent_query_timeout		= 3000
}

index dist4
{
	type					= distributed
	agent					= <my_address/>:idx1
	agent					= <my_address/>:idx2
	agent_connect_timeout	= 1000
	agent_query_timeout		= 3000
}

index dist5
{
	type					= distributed
	agent					= <my_address/>:dist_no
	agent_connect_timeout	= 1000
	agent_query_timeout		= 3000
}

index rt
{
	type = rt
	path			= <data_path/>/rt
	docinfo			= extern

	rt_field			= body
	rt_attr_uint	= gid
	rt_attr_bigint	= bint
	rt_attr_float	= bfloat
}

</config>

<sphqueries>
<sphinxql>insert into rt (id, gid, bint, bfloat, body) values (1, 1, 1, 1.0, 'dummy'), (3, 33, 44, 55.0, 'dummy1')</sphinxql>
<sphinxql>select * from rt</sphinxql>
<sphinxql>select * from dist_no</sphinxql>
<sphinxql>update dist_no set bint=-4560000000000, bfloat=55.5, section=111 where match ('test1')</sphinxql>
<sphinxql>select * from dist_no</sphinxql>
<sphinxql>update dist0 set bint=40000000000, bfloat=55.5, section=111 where match ('test1')</sphinxql>
<sphinxql>select * from dist0</sphinxql>
<sphinxql>update dist1 set bint=410000000000, bfloat=56.6, section=112 where match ('test1')</sphinxql>
<sphinxql>select * from dist1</sphinxql>
<sphinxql>update dist2 set bint=420000000000, bfloat=57.7, section=113 where match ('test1')</sphinxql>
<sphinxql>select * from dist2</sphinxql>
<sphinxql>update dist3 set bint=-430000000000, bfloat=58.8, section=114 where match ('test1')</sphinxql>
<sphinxql>select * from dist3</sphinxql>
<sphinxql>update dist4 set bint=440000000000, bfloat=59.9, section=115 where match ('test1')</sphinxql>
<sphinxql>select * from dist4</sphinxql>
<sphinxql>update dist5 set bint=-450000000000, bfloat=60.4, section=116 where match ('test1')</sphinxql>
<sphinxql>select * from dist5</sphinxql>
<sphinxql>update rt set gid=3212, bfloat=55.5, bint=2340000000000 where id=1</sphinxql>
<sphinxql>select * from rt</sphinxql>
<sphinxql>select 100500some from rt</sphinxql>
<sphinxql>select `id` from rt</sphinxql>
<sphinxql>update idx1 set bfloat=123 where id=1</sphinxql>
<sphinxql>select bfloat from idx1 where id=1</sphinxql>
<sphinxql>update rt set bfloat=123 where id=1</sphinxql>
<sphinxql>select bfloat from rt where id=1</sphinxql>
</sphqueries>

  <DB_Create>
CREATE TABLE `test_table` (
  `id` int(11) DEFAULT NULL,
  `text` varchar (255) NOT NULL,
  `section` int(11) DEFAULT NULL,
  `bint` BIGINT NOT NULL,
  `bfloat` float DEFAULT NULL
)
  </DB_Create>

  <DB_Drop>
DROP TABLE IF EXISTS `test_table`
  </DB_Drop>

  <DB_Insert>
INSERT INTO `test_table` (`id`, `text`, `section`, `bint`, `bfloat`) VALUES 
(1, 'test test1', 101, 7000000000, 3.14),
(2, 'testt test2', 102, 8000000000, 1.44),
(3, 'test test3', 103, -7000000000, 3.42),
(4, 'testt test4', 104, -10000000000, 246.2);
  </DB_Insert>
  
</test>