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
|
<?xml version="1.0" encoding="utf-8"?>
<test>
<name>Using dummy token in expressions instead of just wiped by min_word_len or stopwords</name>
<config>
indexer
{
mem_limit = 16M
}
searchd
{
<searchd_settings/>
}
source test
{
type = mysql
<sql_settings/>
sql_query = select * from test_table
}
index test
{
source = test
path = <data_path/>/test
}
index test1 : test
{
path = <data_path/>/test1
stopwords = stopwords.txt
min_word_len = 2
}
</config>
<db_create>
CREATE TABLE test_table
(
id INTEGER PRIMARY KEY NOT NULL,
subject VARCHAR(50) NOT NULL
);
</db_create>
<db_drop>DROP TABLE IF EXISTS test_table;</db_drop>
<db_insert>INSERT INTO test_table VALUES ( 1, 'hello world' );</db_insert>
<db_insert>INSERT INTO test_table VALUES ( 2, 'hello hallo world' );</db_insert>
<db_insert>INSERT INTO test_table VALUES ( 3, 'a b world' );</db_insert>
<db_insert>INSERT INTO test_table VALUES ( 4, 'a b c world' );</db_insert>
<db_insert>INSERT INTO test_table VALUES ( 5, 'hello war' );</db_insert>
<db_insert>INSERT INTO test_table VALUES ( 6, 'hello hallo war' );</db_insert>
<db_insert>INSERT INTO test_table VALUES ( 7, 'a b war' );</db_insert>
<db_insert>INSERT INTO test_table VALUES ( 8, 'a b c war' );</db_insert>
<metaindex name='META:all'>
<index>test</index>
<index>test1</index>
</metaindex>
<sphqueries>
<sphinxql>select * from META:all where match ('a b c !war')</sphinxql>
<sphinxql>select * from META:all where match ('hello !war')</sphinxql>
<sphinxql>select * from META:all where match ('the !war')</sphinxql>
<sphinxql>select * from META:all where match ('!the !war')</sphinxql>
<sphinxql>select * from META:all where match ('!hello !war')</sphinxql>
<sphinxql>select * from META:all where match ('hello | (!war)')</sphinxql>
<sphinxql>select * from META:all where match ('hello | (!w)')</sphinxql>
<sphinxql>select * from META:all where match ('hallo | (war ( a -world))')</sphinxql>
<sphinxql>select * from META:all where match ('war ( a -world)')</sphinxql>
<sphinxql>select * from META:all where match ('war | ( a -world)')</sphinxql>
<!-- check for crash on expressions like 'a<<(*!b)'-->
<sphinxql><![CDATA[select * from META:all where match ( 'war << ( * -world )' ) ]]></sphinxql>
</sphqueries>
</test>
|