X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ft10.c;h=56b68a2dfa1a161ca8fa6af0261b9fc6b1733712;hb=47eeb5384a8fae8bcac8afb8a84782ca094683f9;hp=aae64dd42033ff4fbd2fa175af9e5ac598d13fb7;hpb=6c9fcd3b5d3108702fa1ffc92dab4ab6060f9a19;p=idzebra-moved-to-github.git diff --git a/test/api/t10.c b/test/api/t10.c index aae64dd..56b68a2 100644 --- a/test/api/t10.c +++ b/test/api/t10.c @@ -1,4 +1,4 @@ -/* $Id: t10.c,v 1.6 2005-01-15 19:38:35 adam Exp $ +/* $Id: t10.c,v 1.8 2005-05-24 11:35:43 adam Exp $ Copyright (C) 1995-2005 Index Data ApS @@ -41,34 +41,32 @@ struct tst { struct tst tests[] = { - {"ntc-atn", "first title", 1000, "first title", 1000, "second title",862 }, - {"ntc-ntn", "first title", 1000, "first title", 1000, "second title",862 }, - {"ntc-btn", "first title", 1000, "first title", 1000, "second title",862 }, - {"ntc-apn", "first title", 1000, "first title", 1000, "second title",862 }, - {"ntc-npn", "first title", 1000, "first title", 1000, "second title",862 }, - {"ntc-bpn", "first title", 1000, "first title", 1000, "second title",862 }, - - {"atc-atn", "first title", 1000, "first title", 1000, "second title", 989 }, - {"atc-ntn", "first title", 1000, "first title", 1000, "second title", 989 }, - {"atc-btn", "first title", 1000, "first title", 1000, "second title", 989 }, - {"atc-apn", "first title", 1000, "first title", 1000, "second title", 989 }, - {"atc-npn", "first title", 1000, "first title", 1000, "second title", 989 }, - {"atc-bpn", "first title", 1000, "first title", 1000, "second title", 989 }, - - {"npc-atn", "first title", 1000, "first title", 1000, "second title", 862 }, - {"npc-ntn", "first title", 1000, "first title", 1000, "second title", 862 }, - {"npc-btn", "first title", 1000, "first title", 1000, "second title", 862 }, - {"npc-apn", "first title", 1000, "first title", 1000, "second title", 862 }, - {"npc-npn", "first title", 1000, "first title", 1000, "second title", 862 }, - {"npc-bpn", "first title", 1000, "first title", 1000, "second title", 862 }, - - {"apc-atn", "first title", 1000, "first title", 1000, "second title", 989 }, - {"apc-ntn", "first title", 1000, "first title", 1000, "second title", 989 }, - {"apc-btn", "first title", 1000, "first title", 1000, "second title", 989 }, - {"apc-apn", "first title", 1000, "first title", 1000, "second title", 989 }, - {"apc-npn", "first title", 1000, "first title", 1000, "second title", 989 }, - {"apc-bpn", "first title", 1000, "first title", 1000, "second title", 989 }, - + {"ntc-atn", "first title", 0, "first title", 1000, "first title",1000 }, + {"ntc-ntn", "first title", 0, "first title", 1000, "first title",1000 }, + {"ntc-btn", "first title", 0, "first title", 1000, "first title",1000 }, + {"ntc-apn", "first title", 0, "first title", 1000, "first title",1000 }, + {"ntc-npn", "first title", 0, "first title", 1000, "first title",1000 }, + {"ntc-bpn", "first title", 0, "first title", 1000, "first title",1000 }, + {"atc-atn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"atc-ntn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"atc-btn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"atc-apn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"atc-npn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"atc-bpn", "first title", 0, "first title", 1000, "first title", 1000 }, + + {"npc-atn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"npc-ntn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"npc-btn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"npc-apn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"npc-npn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"npc-bpn", "first title", 0, "first title", 1000, "first title", 1000 }, + + {"apc-atn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"apc-ntn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"apc-btn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"apc-apn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"apc-npn", "first title", 0, "first title", 1000, "first title", 1000 }, + {"apc-bpn", "first title", 0, "first title", 1000, "first title", 1000 }, {0,0,0,0,0,0,0}, }; @@ -78,16 +76,14 @@ int main(int argc, char **argv) ZebraService zs = start_up("zebrazv.cfg", argc, argv); ZebraHandle zh = zebra_open (zs); - int loglevel=yaz_log_mask_str("zvrank,rank1,t10"); init_data(zh, recs); zebra_close(zh); - yaz_log_init_level(loglevel); - for (i=0; tests[i].schema; i++) + for (i = 0; tests[i].schema; i++) { zh = zebra_open (zs); zebra_select_database(zh, "Default"); zebra_set_resource(zh, "zvrank.weighting-scheme", tests[i].schema); - yaz_log(log_level,"============%d: %s ============", i,tests[i].schema); + yaz_log(YLOG_LOG,"============%d: %s ===========", i, tests[i].schema); ranking_query( __LINE__, zh, "@attr 1=1016 @attr 2=102 the", 3, tests[i].hit1, tests[i].score1);