"Fossies" - the Fresh Open Source Software Archive

Member "sphinx-2.2.11-release/test/test_041/test.xml" (19 Jul 2016, 13314 Bytes) of package /linux/www/sphinx-2.2.11-release.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "test.xml": 2.2.10-release_vs_2.2.11-release.

    1 <?xml version="1.0" encoding="utf-8"?>
    2 <test>
    3 
    4 <name>index_exact_words</name>
    5 
    6 <config>
    7 indexer
    8 {
    9     mem_limit       = 16M
   10 }
   11 
   12 searchd
   13 {
   14     <searchd_settings/>
   15     workers = threads
   16 }
   17 
   18 source srctest
   19 {
   20     type            = mysql
   21     <sql_settings/>
   22     sql_query       = SELECT document_id, body FROM test_table
   23 }
   24 
   25 index test
   26 {
   27     source          = srctest
   28     path            = <data_path/>/test
   29 
   30     <dynamic>
   31         <variant>index_exact_words = 0</variant>
   32         <variant>index_exact_words = 1</variant>
   33     </dynamic>
   34 
   35     <dynamic>
   36         <variant>morphology = none</variant>
   37         <variant>morphology = stem_en</variant>
   38     </dynamic>
   39 }
   40 
   41 index rt
   42 {
   43     type            = rt
   44     path            = <data_path/>/rt
   45     rt_field        = title 
   46     rt_attr_uint    = id1
   47     index_exact_words = 1
   48     morphology = stem_en
   49 }
   50 
   51 index rt_fix
   52 {
   53     type            = rt
   54     path            = <data_path/>/rt_fix
   55     rt_field        = title 
   56     rt_attr_uint    = id1
   57     min_infix_len = 1
   58     dict = keywords
   59     morphology = stem_en
   60 }
   61 
   62 index wf
   63 {
   64     source          = srctest
   65     path            = <data_path/>/wf
   66     dict = keywords
   67     index_exact_words = 1
   68     morphology = none
   69     wordforms       = <this_test/>/wordforms.txt
   70 }
   71 
   72 source src_stem : srctest
   73 {
   74     sql_query       = SELECT 1 id, 11 idd, 'busy' title UNION SELECT 2 id, 11 idd, 'busi' title UNION SELECT 3 id, 11 idd, 'feet' title UNION SELECT 4 id, 11 idd, 'foot' title UNION SELECT 5 id, 11 idd, 'fbusy' title UNION SELECT 6 id, 11 idd, 'fbusi' title
   75     sql_attr_uint       = idd
   76 }
   77 
   78 index kw_p
   79 {
   80     source          = src_stem
   81     path            = <data_path/>/kw_p
   82     charset_table = 0..9, a..z, A..Z->a..z
   83     dict = keywords
   84     min_prefix_len = 3
   85     morphology      = stem_en
   86     index_exact_words = 1
   87 }
   88 
   89 index kw_i
   90 {
   91     source          = src_stem
   92     path            = <data_path/>/kw_i
   93     charset_table = 0..9, a..z, A..Z->a..z
   94     dict = keywords
   95     min_infix_len = 3
   96     morphology      = stem_en
   97     index_exact_words = 1
   98 }
   99 
  100 index rt_p
  101 {
  102     type = rt
  103     path            = <data_path/>/rt_p
  104     rt_mem_limit = 128k
  105     rt_field                = title
  106     rt_attr_uint        = idd
  107     dict = keywords
  108     min_prefix_len = 3
  109     morphology      = stem_en
  110     index_exact_words = 1
  111 }
  112 
  113 index rt_i
  114 {
  115     type = rt
  116     path            = <data_path/>/rt_i
  117     rt_mem_limit = 128k
  118     rt_field                = title
  119     rt_attr_uint        = idd
  120     dict = keywords
  121     min_infix_len = 3
  122     morphology      = stem_en
  123     index_exact_words = 1
  124 }
  125 
  126 source src_phrase : srctest
  127 {
  128     sql_query       = SELECT 1 id, 11 idd, 'it running fast as you but can not' title UNION SELECT 2 id, 11 idd, 'as it runs me' title UNION SELECT 3 id, 11 idd, 'it run and has fun' title
  129     sql_attr_uint       = idd
  130 }
  131 
  132 index phrase_idx
  133 {
  134     source          = src_phrase
  135     path            = <data_path/>/phrase_idx
  136     charset_table = 0..9, a..z, A..Z->a..z
  137     dict = keywords
  138     morphology      = stem_en
  139     index_exact_words = 1   
  140 }
  141 
  142 source src_phrase_shift : srctest
  143 {
  144     sql_query       = SELECT 1 id, 11 idd, 'that orange box might be and not yellow' title UNION SELECT 2 id, 11 idd, 'however that is a green box always apears here as usual' title UNION SELECT 3 id, 11 idd, 'that orange box might be not yellow' title
  145     sql_attr_uint       = idd
  146 }
  147 
  148 index phrase_shift
  149 {
  150     source          = src_phrase_shift
  151     path            = <data_path/>/phrase_shift
  152     charset_table = 0..9, a..z, A..Z->a..z
  153     dict = keywords
  154 }
  155 
  156 index phrase_shift_star
  157 {
  158     source          = src_phrase_shift
  159     path            = <data_path/>/phrase_shift_star
  160     charset_table = 0..9, a..z, A..Z->a..z
  161     dict = keywords
  162     min_prefix_len = 1
  163 }
  164 
  165 index phrase_shift_min_wlen
  166 {
  167     source          = src_phrase_shift
  168     path            = <data_path/>/phrase_shift_min_wlen
  169     charset_table = 0..9, a..z, A..Z->a..z
  170     dict = keywords
  171     min_word_len = 2
  172 }
  173 
  174 index phrase_shift_stop
  175 {
  176     source          = src_phrase_shift
  177     path            = <data_path/>/phrase_shift_stop
  178     charset_table = 0..9, a..z, A..Z->a..z
  179     dict = keywords
  180     stopwords       = stopwords.txt
  181 }
  182 
  183 source src_4codepoint : srctest
  184 {
  185        sql_query               = SELECT 1 id, 5 idd, CONCAT ( 'the boxed state ', REPEAT( CHAR(0xf3be80bb), 7  ) ) as title
  186        sql_attr_uint           = idd
  187 }
  188 
  189 index codepoint
  190 {
  191        source                  = src_4codepoint
  192        path                    = <data_path/>/codepoint
  193        dict = keywords
  194        min_infix_len = 3
  195        morphology              = stem_en
  196        index_exact_words = 1
  197        enable_star = 1
  198        charset_type    = utf-8
  199 }
  200 
  201 source src_nostar1 : srctest
  202 {
  203     sql_query       = SELECT 1 id, 11 idd, 'cool test' title
  204     sql_attr_uint       = idd
  205 }
  206 
  207 index plain_nostar1
  208 {
  209     source          = src_nostar1
  210     path            = <data_path/>/plain_nostar1
  211     docinfo         = extern
  212     charset_table = 0..9, a..z, A..Z->a..z
  213     dict = keywords
  214     min_prefix_len = 0
  215     min_infix_len = 0
  216 }
  217 
  218 index rt_nostar1
  219 {
  220     type = rt
  221     path            = <data_path/>/rt_nostar1
  222     docinfo = extern
  223     rt_mem_limit = 32M
  224     rt_attr_uint    = idd
  225     rt_field        = title
  226     charset_table = 0..9, a..z, A..Z->a..z
  227     dict = keywords
  228     min_prefix_len = 0
  229     min_infix_len = 0
  230 }
  231 
  232 index dist
  233 {
  234     type = distributed
  235     local = plain_nostar1
  236     local = rt_nostar1
  237 }
  238 
  239 </config>
  240 
  241 <queries>
  242 <query mode="extended2" index="test">work</query>
  243 <query mode="extended2" index="test">worked</query>
  244 <query mode="extended2" index="test">worker</query>
  245 <query mode="extended2" index="test">=work</query>
  246 <query mode="extended2" index="test">=worked</query>
  247 <query mode="extended2" index="test">=worker</query>
  248 <query mode="extended2" index="test">run</query>
  249 <query mode="extended2" index="test">runs</query>
  250 <query mode="extended2" index="test">=run</query>
  251 <query mode="extended2" index="test">=runs</query>
  252 </queries>
  253 
  254 <sphqueries>
  255 <sphinxql>
  256 REPLACE INTO rt (id, id1, title) VALUES ( 1, 1, 'work worked working workings worker works workers' ),
  257 ( 2, 1, 'run' ),
  258 ( 3, 1, 'runs' ),
  259 ( 4, 1, 'running' )
  260 </sphinxql>
  261 <sphinxql>SELECT * FROM rt WHERE MATCH('work')</sphinxql>
  262 <sphinxql>show meta</sphinxql>
  263 <sphinxql>SELECT * FROM rt WHERE MATCH('worked')</sphinxql>
  264 <sphinxql>show meta</sphinxql>
  265 <sphinxql>SELECT * FROM rt WHERE MATCH('worker')</sphinxql>
  266 <sphinxql>show meta</sphinxql>
  267 <sphinxql>SELECT * FROM rt WHERE MATCH('=work')</sphinxql>
  268 <sphinxql>show meta</sphinxql>
  269 <sphinxql>SELECT * FROM rt WHERE MATCH('=worked')</sphinxql>
  270 <sphinxql>show meta</sphinxql>
  271 <sphinxql>SELECT * FROM rt WHERE MATCH('=worker')</sphinxql>
  272 <sphinxql>show meta</sphinxql>
  273 <sphinxql>SELECT * FROM rt WHERE MATCH('run')</sphinxql>
  274 <sphinxql>show meta</sphinxql>
  275 <sphinxql>SELECT * FROM rt WHERE MATCH('runs')</sphinxql>
  276 <sphinxql>show meta</sphinxql>
  277 <sphinxql>SELECT * FROM rt WHERE MATCH('=run')</sphinxql>
  278 <sphinxql>show meta</sphinxql>
  279 <sphinxql>SELECT * FROM rt WHERE MATCH('=runs')</sphinxql>
  280 <sphinxql>show meta</sphinxql>
  281 <sphinxql>REPLACE INTO rt_fix (id, id1, title) VALUES ( 1, 1, 'hi people how are you' )</sphinxql>
  282 <sphinxql>SELECT * FROM rt_fix WHERE MATCH('ho*')</sphinxql>
  283 <sphinxql>show meta</sphinxql>
  284 <sphinxql>SELECT * FROM wf WHERE MATCH('run')</sphinxql>
  285 <sphinxql>show meta</sphinxql>
  286 <sphinxql>SELECT * FROM wf WHERE MATCH('runs')</sphinxql>
  287 <sphinxql>show meta</sphinxql>
  288 <sphinxql>SELECT * FROM wf WHERE MATCH('=run')</sphinxql>
  289 <sphinxql>show meta</sphinxql>
  290 <sphinxql>SELECT * FROM wf WHERE MATCH('=runs')</sphinxql>
  291 <sphinxql>show meta</sphinxql>
  292 
  293 <!--regression substring search at RT index -->
  294 <sphinxql>REPLACE INTO rt_fix (id, id1, title) VALUES ( 2, 1, 'howdy all around' )</sphinxql>
  295 <sphinxql>SELECT * FROM rt_fix WHERE MATCH('*eop*')</sphinxql>
  296 <sphinxql>show meta</sphinxql>
  297 <sphinxql>SELECT * FROM rt_fix WHERE MATCH('*ar*')</sphinxql>
  298 <sphinxql>show meta</sphinxql>
  299 <sphinxql>SELECT * FROM rt_fix WHERE MATCH('ho*')</sphinxql>
  300 <sphinxql>show meta</sphinxql>
  301 
  302 <!--regression substring search vs stemmed terms -->
  303 <sphinxql>REPLACE INTO rt_p (id, idd, title) VALUES (1,11,'busy'), (2,11,'busi'), (3,11,'feet'), (4,11,'foot'), (5,11,'fbusy'), (6,11,'fbusi')</sphinxql>
  304 <sphinxql>REPLACE INTO rt_i (id, idd, title) VALUES (1,11,'busy'), (2,11,'busi'), (3,11,'feet'), (4,11,'foot'), (5,11,'fbusy'), (6,11,'fbusi')</sphinxql>
  305 <sphinxql>SELECT * FROM kw_p WHERE MATCH('busy*')</sphinxql>
  306 <sphinxql>show meta</sphinxql>
  307 <sphinxql>SELECT * FROM kw_i WHERE MATCH('busy*')</sphinxql>
  308 <sphinxql>show meta</sphinxql>
  309 <sphinxql>SELECT * FROM rt_p WHERE MATCH('busy*')</sphinxql>
  310 <sphinxql>show meta</sphinxql>
  311 <sphinxql>SELECT * FROM rt_i WHERE MATCH('busy*')</sphinxql>
  312 <sphinxql>show meta</sphinxql>
  313 <sphinxql>SELECT * FROM kw_p WHERE MATCH('busi*')</sphinxql>
  314 <sphinxql>show meta</sphinxql>
  315 <sphinxql>SELECT * FROM kw_i WHERE MATCH('busi*')</sphinxql>
  316 <sphinxql>show meta</sphinxql>
  317 <sphinxql>SELECT * FROM rt_p WHERE MATCH('busi*')</sphinxql>
  318 <sphinxql>show meta</sphinxql>
  319 <sphinxql>SELECT * FROM rt_i WHERE MATCH('busi*')</sphinxql>
  320 <sphinxql>show meta</sphinxql>
  321 <sphinxql>SELECT * FROM kw_i WHERE MATCH('*busy*')</sphinxql>
  322 <sphinxql>show meta</sphinxql>
  323 <sphinxql>SELECT * FROM rt_i WHERE MATCH('*busy*')</sphinxql>
  324 <sphinxql>show meta</sphinxql>
  325 <sphinxql>SELECT * FROM kw_i WHERE MATCH('*busi*')</sphinxql>
  326 <sphinxql>show meta</sphinxql>
  327 <sphinxql>SELECT * FROM rt_i WHERE MATCH('*busi*')</sphinxql>
  328 <sphinxql>show meta</sphinxql>
  329 <sphinxql>SELECT * FROM kw_p WHERE MATCH('foot*')</sphinxql>
  330 <sphinxql>show meta</sphinxql>
  331 <sphinxql>SELECT * FROM kw_i WHERE MATCH('foot*')</sphinxql>
  332 <sphinxql>show meta</sphinxql>
  333 <sphinxql>SELECT * FROM rt_p WHERE MATCH('foot*')</sphinxql>
  334 <sphinxql>show meta</sphinxql>
  335 <sphinxql>SELECT * FROM rt_i WHERE MATCH('foot*')</sphinxql>
  336 <sphinxql>show meta</sphinxql>
  337 <sphinxql>SELECT * FROM kw_p WHERE MATCH('feet*')</sphinxql>
  338 <sphinxql>show meta</sphinxql>
  339 <sphinxql>SELECT * FROM kw_i WHERE MATCH('feet*')</sphinxql>
  340 <sphinxql>show meta</sphinxql>
  341 <sphinxql>SELECT * FROM rt_p WHERE MATCH('feet*')</sphinxql>
  342 <sphinxql>show meta</sphinxql>
  343 <sphinxql>SELECT * FROM rt_i WHERE MATCH('feet*')</sphinxql>
  344 <sphinxql>show meta</sphinxql>
  345 <sphinxql>SELECT * FROM kw_i WHERE MATCH('*foot*')</sphinxql>
  346 <sphinxql>show meta</sphinxql>
  347 <sphinxql>SELECT * FROM rt_i WHERE MATCH('*foot*')</sphinxql>
  348 <sphinxql>show meta</sphinxql>
  349 <sphinxql>SELECT * FROM kw_i WHERE MATCH('*feet*')</sphinxql>
  350 <sphinxql>show meta</sphinxql>
  351 <sphinxql>SELECT * FROM rt_i WHERE MATCH('*feet*')</sphinxql>
  352 <sphinxql>show meta</sphinxql>
  353 
  354 <!-- new feature exact phrase - just shortcut for all words in phrase have exact modifier -->
  355 <sphinxql>SELECT * FROM phrase_idx WHERE MATCH(' "it run" ')</sphinxql>
  356 <sphinxql>show meta</sphinxql>
  357 <sphinxql>SELECT * FROM phrase_idx WHERE MATCH(' ="it running" ')</sphinxql>
  358 <sphinxql>show meta</sphinxql>
  359 <sphinxql>SELECT * FROM phrase_idx WHERE MATCH(' ="it runs" ')</sphinxql>
  360 <sphinxql>show meta</sphinxql>
  361 <sphinxql>SELECT * FROM phrase_idx WHERE MATCH(' ="it run" ')</sphinxql>
  362 <sphinxql>show meta</sphinxql>
  363 
  364 <!-- phrase shift -->
  365 <sphinxql>SELECT * FROM phrase_shift WHERE MATCH(' "that box" ')</sphinxql>
  366 <sphinxql>SELECT * FROM phrase_shift WHERE MATCH(' "that * box" ')</sphinxql>
  367 <sphinxql>SELECT * FROM phrase_shift WHERE MATCH(' "that * * * box" ')</sphinxql>
  368 <sphinxql>SELECT * FROM phrase_shift WHERE MATCH(' "that * box might * * not yellow" ')</sphinxql>
  369 <sphinxql>SELECT * FROM phrase_shift_star WHERE MATCH(' "that box" ')</sphinxql>
  370 <sphinxql>SELECT * FROM phrase_shift_star WHERE MATCH(' "that * box" ')</sphinxql>
  371 <sphinxql>SELECT * FROM phrase_shift_star WHERE MATCH(' "that * * * box" ')</sphinxql>
  372 <sphinxql>SELECT * FROM phrase_shift_star WHERE MATCH(' "that * box might * * not yellow" ')</sphinxql>
  373 <sphinxql>SELECT * FROM phrase_shift_min_wlen WHERE MATCH(' "that box" ')</sphinxql>
  374 <sphinxql>SELECT * FROM phrase_shift_min_wlen WHERE MATCH(' "that * box" ')</sphinxql>
  375 <sphinxql>SELECT * FROM phrase_shift_min_wlen WHERE MATCH(' "that * * * box" ')</sphinxql>
  376 <sphinxql>SELECT * FROM phrase_shift_min_wlen WHERE MATCH(' "that * box might * * not yellow" ')</sphinxql>
  377 <!-- regression crash on phrase shift with stopwords -->
  378 <sphinxql>SELECT * FROM phrase_shift_stop WHERE MATCH(' "a the end that * box of" ')</sphinxql>
  379 <sphinxql>SELECT * FROM phrase_shift WHERE MATCH(' "* * * box always" ')</sphinxql>
  380 <sphinxql>SELECT * FROM phrase_shift_star WHERE MATCH(' "* * * box always" ')</sphinxql>
  381 <sphinxql>SELECT * FROM phrase_shift_min_wlen WHERE MATCH(' "* * * box always" ')</sphinxql>
  382 
  383 <!-- regression word with exact modifier that breaks infix builder -->
  384 <sphinxql>REPLACE INTO rt_i (id, idd, title) VALUES (20,11,'long word ___________________________________________ that crashed')</sphinxql>
  385 <sphinxql>FLUSH RAMCHUNK rt_i</sphinxql>
  386 
  387 <!-- regression large codepoints vs infix builder -->
  388 <sphinxql>SELECT * FROM codepoint WHERE MATCH('*box*')</sphinxql>
  389 
  390 <!-- regression plain vs RT wildcard setup -->
  391 <sphinxql>SELECT * FROM dist WHERE MATCH('test*')</sphinxql>
  392 <sphinxql>SHOW META</sphinxql>
  393 <sphinxql>CALL KEYWORDS ( 'test*', 'plain_nostar1')</sphinxql>
  394 <sphinxql>CALL KEYWORDS ( 'test*', 'rt_nostar1')</sphinxql>
  395 
  396 </sphqueries>
  397 
  398 <db_create>
  399 CREATE TABLE `test_table`
  400 (
  401     `document_id` int(11) NOT NULL default '0',
  402     `body` varchar(255) NOT NULL default ''
  403 )
  404 </db_create>
  405 
  406 <db_drop>
  407 DROP TABLE IF EXISTS `test_table`
  408 </db_drop>
  409 
  410 <db_insert>
  411 INSERT INTO `test_table` VALUES
  412 ( 1, 'work worked working workings worker works workers' ),
  413 ( 2, 'run' ),
  414 ( 3, 'runs' ),
  415 ( 4, 'running' )
  416 </db_insert>
  417 
  418 </test>