"Fossies" - the Fresh Open Source Software Archive

Member "sphinx-2.2.11-release/test/test_194/test.xml" (19 Jul 2016, 2573 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>regexps using RE2</name>
    5 
    6 <requires>
    7 <re2/>
    8 </requires>
    9 
   10 <config>
   11 indexer
   12 {
   13     mem_limit           = 16M
   14 }
   15 
   16 searchd
   17 {
   18     <searchd_settings/>
   19     workers = threads
   20 }
   21 
   22 source test
   23 {
   24     type                = mysql
   25     <sql_settings/>
   26     sql_query_pre       = set names utf8
   27     sql_query           = select * from test_table
   28     sql_file_field      = file_field
   29 }
   30 
   31 index test
   32 {
   33     source          = test
   34     path            = <data_path/>/test
   35     
   36     regexp_filter = (\pL\pL)-(\d+) => \1\2
   37     regexp_filter = \b(\d+)\" => \1inch
   38     regexp_filter = (blue|red) => color
   39 }
   40 
   41 source src_large
   42 {
   43     type                = mysql
   44     <sql_settings/>
   45     sql_query_pre       = set names utf8
   46     sql_query           = select 1 id, 'test_194/file3.txt' file_field, 11 as idd
   47     sql_file_field      = file_field
   48     sql_attr_uint       = idd
   49 }
   50 
   51 index test_large
   52 {
   53     source          = src_large
   54     path            = <data_path/>/test_large
   55     
   56     regexp_filter = (blue|red) => color
   57 }
   58 
   59 </config>
   60 
   61 <db_create>
   62 CREATE TABLE test_table
   63 (
   64     id INTEGER PRIMARY KEY NOT NULL,
   65     content VARCHAR(255) NOT NULL,
   66     file_field VARCHAR(255) NOT NULL
   67 ) CHARACTER SET utf8;
   68 </db_create>
   69 <db_drop>DROP TABLE IF EXISTS test_table</db_drop>
   70 <db_insert>SET NAMES utf8</db_insert>
   71 <db_insert>
   72 INSERT INTO test_table VALUES
   73 ( 100, '21" monitor', 'test_194/file1.txt' ),
   74 ( 101, '21inch tires','test_194/file2.txt' ),
   75 ( 102, 'самолёт як-42 - среднемагистральный трёхдвигательный пассажирский', '' ),
   76 ( 103, 'Первый самолёт як42 поступил в авиакомпанию', '' ),
   77 ( 104, 'blue socks and red shoes', '' )
   78 </db_insert>
   79 
   80 <sphqueries>
   81 <sphinxql>select * from test where match('як-42')</sphinxql>
   82 <sphinxql>select * from test where match('як42')</sphinxql>
   83 <sphinxql>select * from test where match('21"')</sphinxql>
   84 <sphinxql>select * from test where match('21inch')</sphinxql>
   85 <sphinxql>select * from test where match('inch')</sphinxql>
   86 <sphinxql>select * from test where match('color')</sphinxql>
   87 <sphinxql>select * from test where match('blue')</sphinxql>
   88 <sphinxql>select * from test where match('file1')</sphinxql>
   89 <sphinxql>select * from test where match('file2')</sphinxql>
   90 <sphinxql>select * from test where match('fx-35')</sphinxql>
   91 <sphinxql>select * from test where match('fx35')</sphinxql>
   92 <sphinxql>select * from test where match('car')</sphinxql>
   93 
   94 <!-- regression crash of indexer on indexing large data passed regexp_filter -->
   95 <sphinxql>select * from test_large where match('color')</sphinxql>
   96 </sphqueries>
   97 
   98 </test>