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>hitless indexes</name>
<requires><lemmatizer_base/></requires>
<config>
common
{
lemmatizer_base = <local>lemmatizer_base</local>
}
indexer
{
mem_limit = 16M
}
searchd
{
<searchd_settings/>
}
source test
{
type = mysql
<sql_settings/>
sql_query = select * from sph_test;
}
index none
{
source = test
path = <data_path/>/none
}
index some
{
source = test
path = <data_path/>/some
hitless_words = <this_test/>/words1.txt <this_test/>/words2.txt
}
index all
{
source = test
path = <data_path/>/all
hitless_words = all
}
index some1
{
source = test
path = <data_path/>/some1
hitless_words = <this_test/>/words1.txt <this_test/>/words2.txt
html_strip = 1
index_sp = 1
index_zones = zone*
}
source hit_test
{
type = mysql
<sql_settings/>
sql_query = SELECT 1 id, "protest, to teach, to feed, and" body, 11 idd UNION SELECT 2 id, "to and windows text" body, 12 idd
sql_attr_uint = idd
}
index hit_0
{
source = hit_test
path = <data_path/>/hit_0
morphology = lemmatize_en_all
}
index hit_1
{
source = hit_test
path = <data_path/>/hit_1
morphology = lemmatize_en_all
hitless_words = <this_test/>/words3.txt
}
</config>
<db_create>
create table sph_test
(
id int not null,
text varchar(255) not null
);
</db_create>
<db_drop>
drop table if exists sph_test;
</db_drop>
<db_insert>
insert into sph_test values
( 1, 'The Tin Woodman gave a sigh of satisfaction and lowered his axe, which he leaned against the tree.' ),
( 2, 'The Tin Woodman appeared to think deeply for a moment.' ),
( 3, 'The Tin Woodman had asked Dorothy to put the oil-can in her basket.' );
</db_insert>
<queries>
<!-- these should work, weights will differ due to lcs ranking -->
<query mode="extended2" index="none">tin woodman</query>
<query mode="extended2" index="some">tin woodman</query>
<query mode="extended2" index="all ">tin woodman</query>
<!-- these should give identical results -->
<query ranker="wordcount" mode="extended2" index="none">tin woodman</query>
<query ranker="wordcount" mode="extended2" index="some">tin woodman</query>
<query ranker="wordcount" mode="extended2" index="all ">tin woodman</query>
<query mode="extended2" index="none">lowered</query>
<query mode="extended2" index="some">lowered</query>
<query mode="extended2" index="all ">lowered</query>
<!-- some will fail -->
<query mode="extended2" index="none">"tin woodman"</query>
<query mode="extended2" index="some">"tin woodman"</query>
<query mode="extended2" index="all ">"tin woodman"</query>
<query mode="extended2" index="none">"and lowered"</query>
<query mode="extended2" index="some">"and lowered"</query>
<query mode="extended2" index="all ">"and lowered"</query>
<query mode="extended2" index="none">"tin woodman"~2</query>
<query mode="extended2" index="some">"tin woodman"~2</query>
<query mode="extended2" index="all ">"tin woodman"~2</query>
<!-- these will work on 'some', but not 'all' (conversion to AND) -->
<query mode="extended2" index="none">"lowered his axe"</query>
<query mode="extended2" index="some">"lowered his axe"</query>
<query mode="extended2" index="all ">"lowered his axe"</query>
<query mode="extended2" index="none">"and lowered his axe"</query>
<query mode="extended2" index="some">"and lowered his axe"</query>
<query mode="extended2" index="all ">"and lowered his axe"</query>
<!-- doesn't matter to quorum, weight will differ though -->
<query mode="extended2" index="none">"tin woodman"/1</query>
<query mode="extended2" index="some">"tin woodman"/1</query>
<query mode="extended2" index="all ">"tin woodman"/1</query>
<!-- these will work, but should give a warning sometimes. weights should match -->
<query mode="extended2" index="none">^the</query>
<query mode="extended2" index="some">^the</query>
<query mode="extended2" index="all ">^the</query>
<query mode="extended2" index="none">^tin</query>
<query mode="extended2" index="some">^tin</query>
<query mode="extended2" index="all ">^tin</query>
<query mode="extended2" index="none">basket</query>
<query mode="extended2" index="some">basket</query>
<query mode="extended2" index="all ">basket</query>
<query mode="extended2" index="none">basket$</query>
<query mode="extended2" index="some">basket$</query>
<query mode="extended2" index="all ">basket$</query>
<!-- regressions hitless vs extended query operators -->
<query mode="extended2" index="some1">"and the tree" << Woodman </query>
<query mode="extended2" index="some1">Tin Woodman "and the tree"</query>
<query mode="extended2" index="some1">ZONESPAN:(zoneC,zoneB) Tin Woodman "and the tree"</query>
<query mode="extended2" index="some1">Woodman NEAR/10 "and the tree"</query>
</queries>
<sphqueries>
<!-- regressions hitless vs multiple terms from lemmatizer -->
<sphinxql>SELECT * FROM hit_0 WHERE MATCH(' "teach to feed" ')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>SELECT * FROM hit_1 WHERE MATCH(' "teach to feed" ')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>SELECT * FROM hit_0 WHERE MATCH(' "to feed and" ')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>SELECT * FROM hit_1 WHERE MATCH(' "to feed and" ')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>SELECT * FROM hit_0 WHERE MATCH(' "to feed" ')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>SELECT * FROM hit_1 WHERE MATCH(' "to feed" ')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>SELECT * FROM hit_0 WHERE MATCH(' "to windows text" ')</sphinxql>
<sphinxql>SHOW META</sphinxql>
<sphinxql>SELECT * FROM hit_1 WHERE MATCH(' "to windows text" ')</sphinxql>
<sphinxql>SHOW META</sphinxql>
</sphqueries>
</test>
|