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 (179 lines) | stat: -rw-r--r-- 4,600 bytes parent folder | download | duplicates (5)
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
<?xml version="1.0" encoding="utf-8"?>
<Test>
  <Name>attributes over network</Name>
  <Config>
    <Static>indexer
{
	mem_limit			= 16M
}

searchd
{
</Static><Searchd_Settings/>
<Static>
}

source src1
{
	type			= mysql
</Static>
<Sql_Settings/>
<Static>
	sql_query = SELECT id, adtext, heading, postcode, lng, lat, section, make_id, transmission_id FROM test_table

	sql_attr_float	= lng
	sql_attr_float	= lat
	sql_attr_uint	= section
	sql_attr_uint	= make_id
	sql_attr_uint	= transmission_id
}

source src2
{
	type			= mysql
</Static>
<Sql_Settings/>
<Static>
	sql_query = SELECT id, adtext, heading, postcode, lng, lat, section, make_id, transmission_id FROM test_table

	sql_attr_float	= lng
	sql_attr_float	= lat
	sql_attr_uint	= section
	sql_attr_uint	= make_id
	sql_attr_uint	= transmission_id
}


source src3
{
	type			= mysql
</Static>
<Sql_Settings/>
<Static>
	sql_query = SELECT id, adtext, heading, postcode, lng, lat, section, make_id, transmission_id FROM test_table

	sql_attr_float	= lng
	sql_attr_float	= lat
	sql_attr_uint	= section
	sql_attr_uint	= make_id
	sql_attr_uint	= transmission_id
}

source src4
{
	type			= mysql
</Static>
<Sql_Settings/>
<Static>
	sql_query = SELECT id, adtext, heading, postcode, lng, lat, section, make_id, transmission_id FROM test_table

	sql_attr_float	= lng
	sql_attr_float	= lat
	sql_attr_uint	= section
	sql_attr_uint	= make_id
	sql_attr_uint	= transmission_id
}

index block1
{
	source			= src1
	path			= </Static><Data_Path/><Static>/block1
	docinfo			= extern
	min_word_len	= 1
}

index block2
{
	source			= src2
	path			= </Static><Data_Path/><Static>/block2
	docinfo			= extern
	min_word_len	= 1
}

index block3
{
	source			= src3
	path			= </Static><Data_Path/><Static>/block3
	docinfo			= extern
	min_word_len	= 1
}

index block4
{
	source			= src4
	path			= </Static><Data_Path/><Static>/block4
	docinfo			= extern
	min_word_len	= 1
}

index dist
{
	type					= distributed
	local					= block1
	agent					= </Static><Agent_Address/><Static>:block2
	agent_connect_timeout	= 1000
	agent_query_timeout		= 3000
}
</Static>
  </Config>

  <Num_Agents>2</Num_Agents>

  <Query_Attributes>
	<Attr_1>lng</Attr_1>
	<Attr_2>lat</Attr_2>
	<Attr_3>@geodist</Attr_3>
  </Query_Attributes>

  <Query_Settings>
	$client->SetGeoAnchor ('lng','lat',-0.0798578,0.937717 );
	$client->SetSortMode ( SPH_SORT_EXTENDED, '@geodist DESC' );
	$results = $client->Query ( $query, 'dist' );
  </Query_Settings>

  <Query>
    <Query_0></Query_0>
  </Query>
  <DB_Create>
CREATE TABLE `test_table` (
  `id` int(11) NOT NULL auto_increment,
  `section` int(11) NOT NULL,
  `system_id` tinyint(4) NOT NULL,
  `adtext` varchar(255) NOT NULL,
  `heading` varchar(500) NOT NULL,
  `price` int(11) NOT NULL default '0',
  `postcode` varchar(10) NOT NULL,
  `gre` int(11) NOT NULL,
  `grn` int(11) NOT NULL,
  `str_at1` varchar(255) NOT NULL,
  `str_at2` varchar(255) NOT NULL,
  `str_at3` varchar(255) NOT NULL,
  `str_at4` varchar(255) NOT NULL,
  `str_at5` varchar(255) NOT NULL,
  `int_at1` int(11) default NULL,
  `int_at2` int(11) default NULL,
  `int_at3` int(11) default NULL,
  `int_at4` int(11) default NULL,
  `int_at5` int(11) default NULL,
  `float_at1` float default NULL,
  `float_at2` float default NULL,
  `float_at3` float default NULL,
  `lng` float NOT NULL default '0',
  `lat` float NOT NULL default '0',
  `make_id` int(11) NOT NULL,
  `transmission_id` tinyint(4) NOT NULL,
  PRIMARY KEY  (`id`)
)
  </DB_Create>

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

  <DB_Insert>
INSERT INTO `test_table` (`id`, `section`, `system_id`, `adtext`, `heading`, `price`, `postcode`, `gre`, `grn`, `str_at1`, `str_at2`, `str_at3`, `str_at4`, `str_at5`, `int_at1`, `int_at2`, `int_at3`, `int_at4`, `int_at5`, `float_at1`, `float_at2`, `float_at3`, `lng`, `lat`, `make_id`, `transmission_id`) VALUES 
(1, 1, 2, 'FORD', 'Ford KA', 2790, 'EN3 5BT', 535000, 197400,  'Ford', 'KA', 'Grey', 'Diesel', '', 18662, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -0.0798578, 0.937717, 8, 1),
(2, 1, 0, 'until', 'Vauxhall Corsa', 5800, 'BN42 4RN', 524000, 106100, 'Vauxhall', 'Corsa', 'Red', 'Petrol', '', 19296, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -0.0799989, 0.891975, 5, 0),
(211250, 0, 1, 'Quattro Roadster', 'Audi TT', 13995, 'E9 7DG', 535600, 184200, '', '', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -0.0721455, 0.926761, 29, 1);
  </DB_Insert>
</Test>