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 184 185 186 187 188 189 190 191 192 193 194
|
<?xml version="1.0" encoding="utf-8"?>
<test>
<name>blend_chars vs multiforms</name>
<config>
searchd
{
<searchd_settings/>
workers = threads
}
source test
{
type = mysql
<sql_settings/>
sql_query = \
SELECT 1, 'text' AS content UNION \
SELECT 2, '3+rd text' AS content UNION \
SELECT 3, '3-rd text' AS content UNION \
SELECT 4, '3@rd text' AS content
}
index test
{
source = test
path = <data_path/>/test
wordforms = <this_test/>/wordforms.txt
blend_chars = +, U+2D, @
min_word_len = 2
}
source test1
{
type = mysql
<sql_settings/>
sql_query = SELECT 1, 'test 3+3+3+3+real text' AS content
}
index test10
{
source = test1
path = <data_path/>/test10
charset_table = 0..9, A..Z->a..z, _, a..z
blend_chars = +
min_word_len = 2
}
index test11
{
source = test1
path = <data_path/>/test11
charset_table = 0..9, A..Z->a..z, _, a..z
blend_chars = +
min_word_len = 2
min_prefix_len = 2
}
source wb
{
type = mysql
<sql_settings/>
sql_query = \
SELECT 1, 'ru-tor' AS content UNION \
SELECT 2, 'pu-tor' AS content UNION \
SELECT 10, 'rd the box' AS content UNION \
SELECT 11, 'test+the box' AS content UNION \
SELECT 12, 'the-box-of-my goes-here' as content
}
index wb
{
source = wb
path = <data_path/>/wb
wordforms = <this_test/>/wordforms-wb.txt
blend_chars = U+2D
}
source test12
{
type = mysql
<sql_settings/>
sql_query_pre = SET NAMES utf8
sql_query = \
SELECT 1, 'путин-то' AS content UNION \
SELECT 2, 'путиными' AS content UNION \
SELECT 3, 'путена' AS content UNION \
SELECT 4, 'Военно-промышленная комиссия превратилась в авторитетную площадку диалога' AS content
}
index test12
{
source = test12
path = <data_path/>/test12
wordforms = <this_test/>/wordforms-12.txt
morphology = stem_enru
min_prefix_len = 3
html_strip = 1
index_exact_words = 1
blend_mode = trim_head, trim_tail, trim_both
blend_chars = +, %, -, $
}
index test12_rt
{
type = rt
path = <data_path/>/test12_rt
rt_field = content
rt_attr_uint = dummy
dict = keywords
wordforms = <this_test/>/wordforms-12.txt
morphology = stem_enru
min_prefix_len = 3
html_strip = 1
index_exact_words = 1
blend_mode = trim_head, trim_tail, trim_both
blend_chars = +, %, -, $
}
</config>
<db_insert>select 1;</db_insert>
<sphqueries>
<sphinxql>SELECT * FROM test WHERE MATCH('3+rd text')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>SELECT * FROM test WHERE MATCH('3-rd text')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>SELECT * FROM test WHERE MATCH('3\\@rd text')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>CALL KEYWORDS ( 'man', 'test' )</sphinxql>
<!-- regression - incomplete multi-form vs blended part with wrong hit position -->
<sphinxql>SELECT * FROM test WHERE MATCH('"a rd text"')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<!-- regression - blended part vs overshort -->
<sphinxql>SELECT * FROM test10 WHERE MATCH('"test a text"')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>SELECT * FROM test11 WHERE MATCH('"test a text"')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>CALL SNIPPETS ( 'test 3+3+3+3+real text' , 'test10', ' "test a text" ', 1 as query_mode )</sphinxql>
<sphinxql>CALL SNIPPETS ( 'test 3+3+3+3+real text' , 'test10', ' "test a text" ', 0 as query_mode )</sphinxql>
<sphinxql>CALL SNIPPETS ( 'test 3+3+3+3+real text' , 'test10', ' "test a text" ', 1 as query_mode, 0 as limit )</sphinxql>
<sphinxql>CALL SNIPPETS ( 'test 3+3+3+3+real text' , 'test10', ' "test a text" ', 0 as query_mode, 0 as limit )</sphinxql>
<sphinxql>SELECT * FROM test WHERE MATCH(' " 3 rd text " ')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<!-- regression - incomplete multi-form vs blended part -->
<sphinxql>CALL SNIPPETS ( 'the+ rd box+ must ' , 'test', ' not found ', 1 as query_mode, 0 as limit )</sphinxql>
<sphinxql>SELECT * FROM test WHERE MATCH('other+none text')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>CALL SNIPPETS ('черно-белый, черно-белая, черно-белым черно-белыми', 'wb', 'черно-белый')</sphinxql>
<sphinxql>SELECT * FROM wb WHERE MATCH ( ' ru-tor ' )</sphinxql>
<sphinxql>SELECT * FROM wb WHERE MATCH ( ' ru tor ' )</sphinxql>
<sphinxql>SELECT * FROM wb WHERE MATCH ( ' pu-tor ' )</sphinxql>
<sphinxql>SELECT * FROM wb WHERE MATCH ( ' pu tor ' )</sphinxql>
<sphinxql>SELECT * FROM wb WHERE MATCH ( ' "ru tor" ' )</sphinxql>
<sphinxql>SELECT * FROM wb WHERE MATCH ( ' "pu tor" ' )</sphinxql>
<sphinxql>CALL KEYWORDS ( 'ru-tor', 'wb' )</sphinxql>
<sphinxql>CALL KEYWORDS ( 'ru tor', 'wb' )</sphinxql>
<sphinxql>CALL KEYWORDS ( 'pu-tor', 'wb' )</sphinxql>
<sphinxql>CALL KEYWORDS ( 'pu tor', 'wb' )</sphinxql>
<sphinxql>SELECT * FROM wb WHERE MATCH(' "the box" ')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>SELECT * FROM wb WHERE MATCH(' the box ')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>SELECT * FROM wb WHERE MATCH(' rd text ')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>CALL SNIPPETS( 'the-box-of-my goes-here', 'wb', 'the-box-of-my goes-here', 1 as query_mode)</sphinxql>
<sphinxql>CALL SNIPPETS( 'the-box-of-my goes-here', 'wb', 'the-box-of goes-here', 1 as query_mode)</sphinxql>
<sphinxql>CALL SNIPPETS( 'the-box-of-my goes-here', 'wb', 'box-of-my goes-here', 1 as query_mode)</sphinxql>
<sphinxql>SELECT * FROM wb WHERE MATCH('the-box-of-my goes-here')</sphinxql>
<sphinxql>SELECT * FROM wb WHERE MATCH('the-box-of goes-here')</sphinxql>
<sphinxql>SELECT * FROM wb WHERE MATCH('box-of-my goes-here')</sphinxql>
<sphinxql>SELECT * FROM test12 WHERE MATCH('путин')</sphinxql>
<sphinxql>SELECT id, weight() FROM test12 WHERE MATCH('путин-то')</sphinxql>
<sphinxql>SELECT * FROM test12 WHERE MATCH('"Военно-промышленная комиссия"')</sphinxql>
<sphinxql>INSERT INTO test12_rt (id, content) VALUES (1, 'путин-то'), (2, 'путиными'), (3, 'путена'), (4, 'Военно-промышленная комиссия превратилась в авторитетную площадку диалога')</sphinxql>
<sphinxql>SELECT id, weight() FROM test12_rt WHERE MATCH('путин-то')</sphinxql>
<sphinxql>CALL KEYWORDS('intel e8500 cpu', 'test', 1)</sphinxql>
</sphqueries>
</test>
|