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
|
<test>
<name>uint attrs</name>
<requires> <variant_match /> </requires>
<config>
indexer
{
mem_limit = 16M
}
searchd
{
<searchd_settings/>
}
source test
{
type = mysql
<sql_settings/>
sql_query = SELECT id, n, 'text' FROM test_table;
sql_attr_uint = n
<Dynamic>
<Variant>sql_attr_multi = uint mva from query; select id, n mva from test_table</Variant>
<Variant>sql_attr_multi = bigint mva from query; select id, n mva from test_table</Variant>
</Dynamic>
}
index test
{
source = test
path = <data_path/>/test
}
</config>
<db_create>
CREATE TABLE test_table
(
id INT NOT NULL,
n INT UNSIGNED NOT NULL
);
</db_create>
<db_drop>
DROP TABLE IF EXISTS test_table;
</db_drop>
<db_insert>
INSERT INTO test_table (id, n) VALUES
( 1, 2582995467 ),
( 2, 3650268775 ),
( 3, 1452351953 ),
( 4, 1022026391 ),
( 5, 3802901620 ),
( 6, 1329722356 );
</db_insert>
<query_attributes>
<attr>n</attr>
<attr>mva</attr>
</query_attributes>
<queries>
<query />
<query sortmode="expr" sortby="n"/>
<query sortmode="expr" sortby="-n"/>
</queries>
</test>
|