"Fossies" - the Fresh Open Source Software Archive

Member "sphinx-2.2.11-release/test/test_166/test.xml" (19 Jul 2016, 2971 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.

    1 <?xml version="1.0" encoding="utf-8"?>
    2 <test>
    3 
    4 <name>string attibutes vs agent groupings</name>
    5 
    6 <num_agents>3</num_agents>
    7 
    8 <config>
    9 indexer
   10 {
   11     mem_limit       = 16M
   12 }
   13 
   14 searchd
   15 {
   16     <searchd_settings/>
   17     workers = threads
   18     
   19     collation_libc_locale = C
   20     <dynamic>
   21         <variant>collation_server = utf8_general_ci</variant>
   22         <variant>collation_server = libc_ci</variant>
   23         <variant>collation_server = libc_cs</variant>
   24     </dynamic>
   25 }
   26 
   27 <agent0>
   28 source src_master
   29 {
   30     type            = mysql
   31     <sql_settings/>
   32 
   33     sql_query       = SELECT id, idd1, str1, body FROM test_table where id in ( 1, 2, 3 )
   34     sql_attr_uint   = idd1
   35     sql_attr_string = str1
   36 }
   37 
   38 index master
   39 {
   40     source          = src_master
   41     docinfo         = extern
   42     path            = <data_path/>/master
   43 }
   44 
   45 index all
   46 {
   47     type = distributed
   48     local = master
   49     agent = <agent1_address/>:a1
   50     agent = <agent2_address/>:a2
   51 }
   52 </agent0>
   53 
   54 <agent1>
   55 source src_a1
   56 {
   57     type            = mysql
   58     <sql_settings/>
   59 
   60     sql_query       = SELECT id, idd1, str1, body FROM test_table where id in ( 4, 5, 6 )
   61     sql_attr_uint   = idd1
   62     sql_attr_string = str1
   63 }
   64 
   65 index a1
   66 {
   67     source          = src_a1
   68     docinfo         = extern
   69     path            = <data_path/>/a1
   70 }
   71 </agent1>
   72 
   73 <agent2>
   74 source src_a2
   75 {
   76     type            = mysql
   77     <sql_settings/>
   78 
   79     sql_query       = SELECT id, idd1, str1, body FROM test_table where id in ( 7, 8, 9 )
   80     sql_attr_uint   = idd1
   81     sql_attr_string = str1
   82 }
   83 
   84 index  a2
   85 {
   86     source          = src_a2
   87     docinfo         = extern
   88     path            = <data_path/>/a2
   89 }
   90 </agent2>
   91 
   92 </config>
   93 
   94 <db_create>
   95 CREATE TABLE `test_table`
   96 (
   97     `id` int(11) NOT NULL default '0',
   98     `idd1` int(11) NOT NULL default '0',
   99     `str1` varchar(1024) NOT NULL default '',
  100     `body` varchar(1024) NOT NULL default ''
  101 )
  102 </db_create>
  103 
  104 <db_drop>
  105 DROP TABLE IF EXISTS `test_table`
  106 </db_drop>
  107 
  108 <db_insert>
  109 INSERT INTO `test_table` VALUES
  110 ( 1, 1,     'a aa',     'the dog' ),
  111 ( 2, 10,    'c cC',     'the cat' ),
  112 ( 3, 2, 'a aA',     'the bird' ), 
  113 ( 4, 11,    'c cC',     'cat eats bird' ),
  114 ( 5, 3,     'a Aa',     'dog eats cat' ), 
  115 ( 6, 12,        'c cc',     'bird' ), 
  116 ( 7, 4,     'a Aa',     'the cat' ),
  117 ( 8, 5,     'a aA',     'eats' ),
  118 ( 9, 13,    'c cc',     'the' )
  119 </db_insert>
  120 
  121 <sphqueries>
  122 <sphinxql>select * from all group by str1 order by id asc</sphinxql>
  123 <sphinxql>select *, weight() w from all where match ('the | cat | dog | bird') group by str1 within group order by idd1 desc order by w asc</sphinxql>
  124 <sphinxql>set collation_connection=libc_cs</sphinxql>
  125 <sphinxql>select * from all group by str1 order by idd1 desc</sphinxql>
  126 <sphinxql>select *, weight() w from all where match ('the | cat | dog | bird') group by str1 within group order by idd1 asc order by w asc</sphinxql>
  127 </sphqueries>
  128 
  129 <queries>
  130 <query mode="extended2" index="all" groupattr="str1" groupfunc="attr" groupsort="@id asc"></query>
  131 <query mode="extended2" index="all" groupattr="str1" groupfunc="attr" groupsort="@weight asc" sortmode="extended" sortby="idd1 desc">the | cat | dog | bird</query>
  132 </queries>
  133 
  134 </test>