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 (122 lines) | stat: -rw-r--r-- 2,232 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
<?xml version="1.0" encoding="utf-8"?>
<test>

<name>SQL-compliant result set vs max_matches</name>

<config>
indexer
{
	mem_limit		= 16M
}

searchd
{
	<searchd_settings/>
}

source test1
{
	type			= mysql
	<sql_settings/>
	sql_query		= select id, gid, gid as a, title from test_table
	sql_attr_uint	= gid
	sql_attr_uint	= a
}

source test2 : test1
{
	sql_query		= select id+10, gid, gid as b, title from test_table
	sql_attr_uint	= gid
	sql_attr_uint	= b
}


source test3 : test1
{
	sql_query		= select id+20, gid, gid+1 as c, gid+2 as b, title from test_table
	sql_attr_uint	= gid
	sql_attr_uint	= c
	sql_attr_uint	= b
}

source test4 : test1
{
	sql_query		= select id+30, gid, gid+3 as d, gid+5 as b, title from test_table
	sql_attr_uint	= gid
	sql_attr_uint	= d
	sql_attr_uint	= b
}

index test1
{
	source			= test1
	path			= <data_path/>/test1
}

index test2
{
	source			= test2
	path			= <data_path/>/test2
}

index test3
{
	source			= test3
	path			= <data_path/>/test3
}

index test4
{
	source			= test4
	path			= <data_path/>/test4
}

index dist1
{
	type			= distributed
	local			= test1
	local			= test2
}

index dist2
{
	type			= distributed
	local			= test2
	local			= test3
}

index dist3
{
	type			= distributed
	local			= test2
	agent			= <my_address/>:idx52
	local			= test4
	agent_connect_timeout	= 1000
	agent_query_timeout	= 3000
}
</config>

<db_create>
create table test_table
(
	id int not null,
	gid int not null,
	title varchar(255) not null
);
</db_create>
<db_drop>drop table if exists test_table;</db_drop>
<db_insert>insert into test_table values ( 1, 123, 'hello world' );</db_insert>
<db_insert>insert into test_table values ( 2, 123, 'hello world' );</db_insert>
<db_insert>insert into test_table values ( 3, 123, 'hello world' );</db_insert>

<sphqueries>
<sphinxql>select gid from dist1 where match('hello') option max_matches=2</sphinxql>
<sphinxql>select b from dist2 where match('hello') option max_matches=2</sphinxql>
<sphinxql>select b from dist3 where match('hello') option max_matches=2</sphinxql>

<!-- regression crash at option named list -->
<sphinxql>select id, gid from dist1 where match('hello') option field_weights=(none1=1000, title=1);show meta</sphinxql>

</sphqueries>

</test>