X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=index%2Fzebraapi.c;h=c0395fbcdd81e6a3e0a4fd0a85e21e4e510bc24d;hp=4ed0a5492e2870d3d2b1f151ac6100791f162c9b;hb=00d6544408e2de88277e091fb7f8f4dfe3949558;hpb=aeea139423b8eaf28a4de53b3d7b2ad1f22284e7 diff --git a/index/zebraapi.c b/index/zebraapi.c index 4ed0a54..c0395fb 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1994-2011 Index Data + Copyright (C) Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -215,6 +215,8 @@ ZebraService zebra_start_res(const char *configName, Res def_res, Res over_res) if (configName) yaz_log(YLOG_LOG, "config %s", configName); + yaz_log_xml_errors(0, YLOG_LOG); + if ((res = res_open(def_res, over_res))) { const char *passwd_plain = 0; @@ -2265,7 +2267,7 @@ static ZEBRA_RES zebra_record_check(ZebraHandle zh, Record rec, } memcpy(ord_buf + ord_len, str, slen); ord_buf[ord_len + slen] = '\0'; - if (ord_len + slen >= IT_MAX_WORD) + if (slen > IT_MAX_WORD || ord_len > 4) { res = ZEBRA_FAIL; (*no_long_dict_entries)++; @@ -2411,7 +2413,6 @@ ZEBRA_RES zebra_register_check(ZebraHandle zh, const char *spec) { ZEBRA_RES res = ZEBRA_FAIL; unsigned flags = 0; - int message_limit = 10; if (!spec || *spec == '\0' || !strcmp(spec, "dict") || !strcmp(spec, "default")) @@ -2421,15 +2422,18 @@ ZEBRA_RES zebra_register_check(ZebraHandle zh, const char *spec) else if (!strcmp(spec, "quick")) flags = 0; else + { + yaz_log(YLOG_WARN, "Unknown check spec: %s", spec); return ZEBRA_FAIL; + } - yaz_log(YLOG_LOG, "zebra_register_check begin flags=%u message_limit=%d", - flags, message_limit); + yaz_log(YLOG_LOG, "zebra_register_check begin flags=%u", flags); if (zebra_begin_read(zh) == ZEBRA_OK) { zint no_records_total = 0; zint no_records_fail = 0; zint total_keys = 0; + int message_limit = zh->m_file_verbose_limit; if (zh->reg) {