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

<test>
<name>snippets vs boundaries, utf-8</name>

<config>
searchd
{
	<searchd_settings/>
}

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

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

	morphology		= stem_enru	
    min_word_len	= 3
    min_prefix_len	= 0
    min_infix_len	= 0
	
	phrase_boundary = .
	phrase_boundary_step = 100

}
</config>

<db_insert>select 1;</db_insert>

<custom_test><![CDATA[

$results = array();

////// utf-8 //////

// 1

$docs = array();
$docs[0] = 'С другом в саду я сидел. Мокрый склонился бамбук. Я шел по склону Фудзи. Старую женщину я.';
$docs[1] = 'Я шел по склону Фудзи. Старую женщину я.';

$opts = array();
$opts['use_boundaries']    = true;
$opts['single_passage']    = false;
$opts['chunk_separator']   = '###';
$opts['weight_order']      = false;
$opts['exact_phrase']      = false;         
$opts['limit']             = 25;

$results[] = $client->BuildExcerpts($docs, 'index_utf8', 'шел', $opts);

// 2

$docs = array();
$docs[0] = 'С другом в саду я сидел. Мокрый склонился бамбук. Я шел по склону Фудзи. Старую женщину я.  Шел не зная куда. ';

$opts = array();
$opts['use_boundaries']    = true;
$opts['single_passage']    = false;
$opts['chunk_separator']   = '###';
$opts['weight_order']      = false;
$opts['exact_phrase']      = true;         
$opts['limit']             = 25;

$results[] = $client->BuildExcerpts($docs, 'index_utf8', 'шел по склону', $opts);

// 3

$opts = array();
$opts['use_boundaries']    = true;
$opts['single_passage']    = false;
$opts['chunk_separator']   = '###';
$opts['weight_order']      = true;
$opts['exact_phrase']      = true;         
$opts['limit']             = 25;

$results[] = $client->BuildExcerpts($docs, 'index_utf8', 'шел по склону', $opts);

// 4

$opts = array();
$opts['use_boundaries']    = true;
$opts['single_passage']    = false;
$opts['chunk_separator']   = '###';
$opts['weight_order']      = true;
$opts['exact_phrase']      = false;         
$opts['limit']             = 75;

$results[] = $client->BuildExcerpts($docs, 'index_utf8', 'шел по склону', $opts);

]]></custom_test>

</test>