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
|
<?xml version="1.0" encoding="utf-8"?>
<test>
<name>Bound cases of the proximity node</name>
<config>
indexer
{
mem_limit = 16M
}
searchd
{
<searchd_settings/>
}
source src
{
type = mysql
<sql_settings/>
sql_query = SELECT * FROM test_table
}
index idx
{
source = src
path = <data_path/>/main
}
source src1
{
type = mysql
<sql_settings/>
sql_query = SELECT 1, 'M&M text in'
sql_attr_uint = idd
}
index idx1
{
source = src1
path = <data_path/>/idx1
blend_chars = &
}
</config>
<queries>
<!-- expect 3 matches -->
<query index="idx" mode="extended2" ranker="wordcount" >"a b"~3</query>
<!-- expect 513 matches, the first with the weithg=3 -->
<query index="idx" mode="extended2" ranker="wordcount" >"e f"~2</query>
<!-- expect 1 match, the first with the weithg=532 -->
<query index="idx" mode="extended2" ranker="wordcount" >"i j"~2</query>
<!-- regression for blended chars vs proximity -->
<query index="idx1">"M&M in"~2</query>
<query index="idx1">"in M&M"~2</query>
<query index="idx1">"M&M in"~3</query>
<query index="idx1">"in M&M"~3</query>
</queries>
<db_create>
CREATE TABLE test_table
(
id INTEGER AUTO_INCREMENT PRIMARY KEY NOT NULL,
title TEXT NOT NULL
) ENGINE=MYISAM
</db_create>
<custom_insert><![CDATA[
$line = "";
for ( $i=0; $i<10; ++$i )
{
mysql_query ( "INSERT INTO test_table VALUES ( 0, 'a $line b')" );
$line .="x ";
}
for ( $i=0; $i<510; ++$i )
mysql_query ( "INSERT INTO test_table VALUES ( 0, 'e x f')" );
mysql_query ( "INSERT INTO test_table VALUES ( 0, 'e x f x x x e x f x x e x f x x')" );
$line = "";
for ( $i=0; $i<532; ++$i )
$line .= " y y i x j";
mysql_query ( "INSERT INTO test_table VALUES ( 0, '$line')" );
]]></custom_insert>
<db_drop>DROP TABLE IF EXISTS test_table</db_drop>
</test>
|