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 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179
|
<?xml version="1.0" encoding="utf-8"?>
<test>
<name>exceptions vs ext2 query grouping</name>
<config>
indexer
{
mem_limit = 16M
}
searchd
{
<searchd_settings/>
}
source srctest
{
type = mysql
<sql_settings/>
sql_query = SELECT *, 1 as idd FROM test_table
}
index test
{
source = srctest
path = <data_path/>/test
exceptions = <this_test/>/synonyms.txt
}
source srcstar
{
type = mysql
<sql_settings/>
sql_query = SELECT *, 1 as idd FROM star_table
}
index star
{
source = srcstar
path = <data_path/>/star
charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F, *, %, ?
exceptions = <this_test/>/synonyms2.txt
min_prefix_len = 1
}
index snip
{
source = srctest
path = <data_path/>/snip
exceptions = <this_test/>/synonyms3.txt
}
source src_wild1
{
type = mysql
<sql_settings/>
sql_query = SELECT 1 as id, 11 as idd, '50% of 20% not 30* found' as text
sql_attr_uint = idd
}
index wild1
{
source = src_wild1
path = <data_path/>/wild1
charset_table = a..z, _, A..Z->a..z
}
source src_e
{
type = mysql
<sql_settings/>
sql_query = SELECT 1, 'life:) on mars'
}
index e
{
source = src_e
path = <data_path/>/e
exceptions = test_165/synonyms4.txt
}
</config>
<db_create>
CREATE TABLE `test_table`
(
`document_id` int(11) NOT NULL default '0',
`body` varchar(255) NOT NULL default ''
)
</db_create>
<db_create>
CREATE TABLE `star_table`
(
`document_id` int(11) NOT NULL default '0',
`body` varchar(255) NOT NULL default ''
)
</db_create>
<db_drop>
DROP TABLE IF EXISTS `test_table`
</db_drop>
<db_drop>
DROP TABLE IF EXISTS `star_table`
</db_drop>
<db_insert>
INSERT INTO `test_table` VALUES
( 1, 'the X files is not X rated movie' ),
( 2, 'the X files is silver sitcom' ),
( 3, 'the x files is good on silver screen' )
</db_insert>
<db_insert>
INSERT INTO `star_table` VALUES
( 1, 'action*packed movies are not for family' ),
( 2, 'action movies are mostly blockbasters' ),
( 3, 'action packed movies published recently' ),
( 4, 'recent DVD pack as collection' ),
( 5, 'a?c x%z' )
</db_insert>
<sphqueries>
<sphinxql>select * from test where match ('X files')</sphinxql>
<sphinxql>select * from test where match ('(X files)')</sphinxql>
<sphinxql>select * from test where match (' ( X files ) ')</sphinxql>
<sphinxql>select * from test where match ('(x files) silver screen')</sphinxql>
<sphinxql>select * from test where match (' X files silver screen')</sphinxql>
<sphinxql>select * from test where match ('(x file) (silver screen)')</sphinxql>
<sphinxql>select * from test where match ('(x file) | silver screen')</sphinxql>
<sphinxql>select * from test where match ('(X files) | silver screen')</sphinxql>
<sphinxql>select * from test where match ('(x files) | silver | screen')</sphinxql>
<sphinxql>select * from test where match ('x file')</sphinxql>
<sphinxql>select * from test where match ('the X file')</sphinxql>
<sphinxql>select * from star where match ('action*packed')</sphinxql>
<sphinxql>select * from star where match ('mov*')</sphinxql>
<sphinxql>select * from star where match ('pack*')</sphinxql>
<sphinxql>select * from star where match ('action')</sphinxql>
<!-- regression tokenizer produces wrong token prt with exception -->
<sphinxql>CALL SNIPPETS('; the test', 'snip', ';doggy the', 1 as force_all_words )</sphinxql>
<sphinxql>CALL SNIPPETS('; the test', 'snip', 'doggy the', 1 as force_all_words )</sphinxql>
<sphinxql>CALL SNIPPETS('; the test', 'snip', 'doggy the', 0 as force_all_words )</sphinxql>
<sphinxql>select * from star where match ('a?c')</sphinxql>
<sphinxql>select * from star where match ('x%z')</sphinxql>
<!-- regression tokenizer produces wild chracters -->
<sphinxql>select * from wild1 where match ('50? of 20% not 30* found')</sphinxql>
<sphinxql>show meta</sphinxql>
<!-- regression special vs synonym -->
<sphinxql>select * from e where match ('life:\\)')</sphinxql>
<sphinxql>show meta</sphinxql>
<!-- regression escaped vs exception -->
<sphinxql>select * from test where match ('so\\/dome')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>select * from test where match ('si\\/dome')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>select * from test where match ('X\\/dome')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<!-- regression on exceptions ended with specials -->
<sphinxql>select * from test where match('one')</sphinxql>
<sphinxql>show meta</sphinxql>
<sphinxql>select * from test where match('"one"')</sphinxql>
<sphinxql>show meta</sphinxql>
</sphqueries>
</test>
|