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 180 181 182 183
|
<?xml version="1.0" encoding="utf-8"?>
<test>
<name>specials vs charset_table vs match_mode</name>
<config>
indexer
{
mem_limit = 16M
}
searchd
{
<searchd_settings/>
workers = threads
}
source src
{
type = mysql
<sql_settings/>
sql_query = SELECT * FROM test_table WHERE document_id IN (1,2,3,4)
}
index main
{
source = src
path = <data_path/>/main
charset_table = 0..9, A..Z->a..z, _, a..z, (, ), $
}
source src_wf
{
type = mysql
<sql_settings/>
sql_query = SELECT * FROM test_table WHERE document_id>4
}
index wf1
{
source = src_wf
path = <data_path/>/wf1
morphology = stem_en
charset_table = 0..9, A..Z->a..z, a..z,
wordforms = <this_test/>/wordforms.txt
}
index wf2
{
source = src_wf
path = <data_path/>/wf2
morphology = stem_en
charset_table = 0..9, A..Z->a..z, a..z, -
wordforms = <this_test/>/wordforms.txt
}
source src_wf3
{
type = mysql
<sql_settings/>
sql_query = SELECT * FROM test_wf3
}
index wf3
{
source = src_wf3
path = <data_path/>/wf3
morphology = stem_en
charset_table = -, 0..9, A..Z->a..z, _, a..z
wordforms = <this_test/>/wf3.txt
}
index rt
{
type = rt
path = <data_path/>/rt0
rt_mem_limit = 32M
rt_field = title
rt_attr_uint=gid
dict = keywords
min_prefix_len = 1
morphology = stem_en
index_exact_words = 1
}
index exact_wf
{
source = src_wf3
path = <data_path/>/exact_wf
dict = crc
min_prefix_len = 1
morphology = stem_en
index_exact_words = 1
}
source src_cht
{
type = mysql
<sql_settings/>
sql_query = SELECT 1, 'Й Ц У К Е Н Г Ш Щ З Х139Ъ' UNION SELECT 2, 'Ф Ы В А П Р О Л Д Ж Э' UNION SELECT 3, 'Я Ч С М И Т Ь Б Ю Ё' UNION SELECT 11, 'й ц у к е н г ш щ з х ъ' UNION SELECT 12, 'ф ы в а п р о л д ж э' UNION SELECT 13, 'я086ч с м и т ь б ю ё' UNION SELECT 101, 'Q W E R T Y U I O P' UNION SELECT 102, 'A S D F G H J K L' UNION SELECT 103, 'Z X C V B N_M' UNION SELECT 111, 'q w e r t y u i o p' UNION SELECT 112, 'a_s d f g h j k l' UNION SELECT 113, 'z x c v b n m'
}
index cht
{
source = src_cht
path = <data_path/>/cht
charset_table = english, _, 0..9, russian
}
</config>
<queries>
<query index='main'>google$com</query>
<query index='main' mode="any">foo(bar)</query>
<query index='main' mode="any">foo\(bar\)</query>
<query index='main' mode="extended2">google$com</query>
<query index='main' mode="extended2">foo(bar)</query>
<query index='main' mode="extended2">foo\(bar\)</query>
<query index='main' mode="extended2">"foo(bar)"</query>
<query index='main' mode="extended2">(bars all$)</query>
<query index='wf1' mode="extended2">without trouble$</query>
<query index='wf1' mode="extended2">trouble without$</query>
<query index='wf1' mode="extended2">(trouble without$)</query>
<!-- here is going regression (query 8-) when second index shares wordform from 1st index -->
<query index='wf1' mode="extended2">run</query>
<query index='wf2' mode="extended2">run</query>
<query index='wf1' mode="extended2">run\-time</query>
<query index='wf2' mode="extended2">run\-time</query>
<query index='wf1' mode="extended2">run time</query>
<query index='wf2' mode="extended2">run time</query>
<!-- charset alias -->
<query index='cht' mode="extended2">Й Ц У К Е Н Г Ш Щ З Х139Ъ</query>
<query index='cht' mode="extended2">й ц у к е н г ш щ з х ъ</query>
<query index='cht' mode="extended2">Ф Ы В А П Р О Л Д Ж Э</query>
<query index='cht' mode="extended2">Я Ч С М И Т Ь Б Ю Ё</query>
<query index='cht' mode="extended2">я086ч с м и т ь б ю ё</query>
<query index='cht' mode="extended2">Q W E R T Y U I O P</query>
<query index='cht' mode="extended2">A S D F G H J K L</query>
<query index='cht' mode="extended2">a_s d f g h j k l</query>
<query index='cht' mode="extended2">Z X C V B N_M</query>
<query index='cht' mode="extended2">z x c v b n m</query>
</queries>
<sphqueries>
<sphinxql>CALL KEYWORDS ('run-time (run time) issue', 'wf1')</sphinxql>
<sphinxql>CALL KEYWORDS ('run-time (run time) issue', 'wf2')</sphinxql>
<!-- here is going regression crash on indexing wordforms vs multi-wordforms -->
<sphinxql>SELECT * from wf3 where match ('word2word2')</sphinxql>
<!-- here is going regression crash on CALL KEYWORDS to RT index with dict keywords -->
<sphinxql>INSERT INTO rt VALUES ( 1, 'dummy', 100 )</sphinxql>
<sphinxql>CALL KEYWORDS ('runs runs* =runs', 'rt', 1)</sphinxql>
<sphinxql>CALL KEYWORDS ('runs runs* =runs', 'exact_wf', 1)</sphinxql>
</sphqueries>
<db_create>
CREATE TABLE test_table (
document_id INTEGER NOT NULL PRIMARY KEY,
title VARCHAR(255) NOT NULL )
</db_create>
<db_create>
CREATE TABLE test_wf3 (
document_id INTEGER NOT NULL PRIMARY KEY,
title VARCHAR(255) NOT NULL )
</db_create>
<db_drop>
DROP TABLE IF EXISTS test_table
</db_drop>
<db_drop>
DROP TABLE IF EXISTS test_wf3
</db_drop>
<db_insert>
INSERT INTO test_table VALUES
( 1, 'google dot com' ),
( 2, 'foo beyond all bars' ),
( 3, 'mangled google$com link' ),
( 4, 'no idea why search for foo(bar), but they do' ),
( 5, 'run-time error' ),
( 6, 'running without trouble' )
</db_insert>
<db_insert>
INSERT INTO test_wf3 VALUES
( 1, 'word2word2 word4word4' )
</db_insert>
</test>
|