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

<name>distributed snippets with load_files, load_files_scattered</name>

<num_agents>3</num_agents>

<config>
indexer
{
	mem_limit		= 32M
}

searchd
{
	<agent0>
		snippets_file_prefix	= <this_test/>/refdata/master/
	</agent0>
	<agent1>
		snippets_file_prefix	= <this_test/>/refdata/agent1/
	</agent1>
	<agent2>
		snippets_file_prefix	= <this_test/>/refdata/agent2/
	</agent2>

	<searchd_settings/>
	<dynamic>
		<variant>dist_threads = 2</variant>
		<variant></variant>
	</dynamic>
}

source src
{
	type					= mysql
	<sql_settings/>
	sql_query		= SELECT 1, 'dummy', 1 as idd
	sql_attr_uint	= idd
}
<agent0>
index idx
{
	source				= src
	docinfo			= extern
	path					= <data_path/>/idx
}

index dist
{
	type = distributed
	agent = <agent1_address/>:idx1
	agent = <agent2_address/>:idx2
	local = idx
}

index distl0
{
	type = distributed
	local = idx
}
</agent0>
<agent1>
index idx1
{
	source				= src
	docinfo			= extern
	path					= <data_path/>/idx1
}

index distl1
{
	type = distributed
	local = idx1
}
</agent1>
<agent2>
index idx2
{
	source				= src
	docinfo			= extern
	path					= <data_path/>/idx2
}

index distl2
{
	type = distributed
	local = idx2
}
</agent2>
</config>


<custom_test><![CDATA[

$index = "dist";
$words = '"Sphinxsearch dot com"';
$docs = array ( "text1.txt", "text2.txt", "text3.txt", "text4.txt", "text5.txt", "text6.txt");
$opts_all = array ( "load_files" => 1 );
$opts_scattered = array ( "load_files" => 1, "load_files_scattered" => 1);
$alldocs = array();
$scatdocs = array();
for ( $i=0; $i<count($docs); $i++)
{
	$alldocs[] = "allfiles/$docs[$i]";
	$scatdocs[] = "scatteredfiles/$docs[$i]";
}
$tests = array( array($alldocs, $opts_all), array( $scatdocs, $opts_scattered) );
$results = array();

foreach ( $tests as $test )
{
	$res = $client->BuildExcerpts ( $test[0], $index, $words, $test[1] );
	$results[] = $res;
}
]]> </custom_test>

<sphqueries>
<sphinxql>CALL SNIPPETS (('allfiles/text1.txt','allfiles/text2.txt','allfiles/text3.txt','allfiles/text4.txt','allfiles/text5.txt','allfiles/text6.txt'),'dist','"Sphinxsearch dot com"',1 AS load_files)</sphinxql>
<sphinxql>CALL SNIPPETS (('scatteredfiles/text1.txt','scatteredfiles/text2.txt','scatteredfiles/text3.txt','scatteredfiles/text4.txt','scatteredfiles/text5.txt','scatteredfiles/text6.txt'),'dist','"Sphinxsearch dot com"',1 AS load_files,1 AS load_files_scattered)</sphinxql>

</sphqueries>

<db_create>
CREATE TABLE test_table
(
	id INTEGER AUTO_INCREMENT PRIMARY KEY NOT NULL,
	title VARCHAR(10) NOT NULL
);
</db_create>
<db_insert>
INSERT INTO `test_table` VALUES
( 1, 'dummy' )
</db_insert>
<db_drop>DROP TABLE IF EXISTS test_table</db_drop>

</test>