X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzrpn.c;h=ebf94b179f66eb3e7b8b548edc828ced87a7dada;hb=7415d28c149c1bab51fe93aeaccdd14085b69bd9;hp=a559a3d2c9b1a8956fd04f5a3c5891162a711bf7;hpb=cb1402d1cc3fdc321a04a891c04b13cf9747ae0d;p=idzebra-moved-to-github.git diff --git a/index/zrpn.c b/index/zrpn.c index a559a3d..ebf94b1 100644 --- a/index/zrpn.c +++ b/index/zrpn.c @@ -1,4 +1,4 @@ -/* $Id: zrpn.c,v 1.221 2006-06-23 11:21:38 adam Exp $ +/* $Id: zrpn.c,v 1.223 2006-07-03 10:52:48 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -46,6 +46,8 @@ struct rpn_char_map_info static int log_level_set = 0; static int log_level_rpn = 0; +#define TERMSET_DISABLE 1 + static const char **rpn_char_map_handler(void *vp, const char **from, int len) { struct rpn_char_map_info *p = (struct rpn_char_map_info *) vp; @@ -147,7 +149,6 @@ static void add_isam_p(const char *name, const char *info, assert(*info == sizeof(*p->isam_p_buf)); memcpy(p->isam_p_buf + p->isam_p_indx, info+1, sizeof(*p->isam_p_buf)); -#if 1 if (p->termset) { const char *db; @@ -156,7 +157,7 @@ static void add_isam_p(const char *name, const char *info, const char *index_name; int len = key_SU_decode (&ord, (const unsigned char *) name); - zebra_term_untrans (p->zh, p->reg_type, term_tmp, name+len+1); + zebra_term_untrans (p->zh, p->reg_type, term_tmp, name+len); yaz_log(log_level_rpn, "grep: %d %c %s", ord, name[len], term_tmp); zebraExplain_lookup_ord(p->zh->reg->zei, ord, 0 /* index_type */, &db, &index_name); @@ -165,7 +166,6 @@ static void add_isam_p(const char *name, const char *info, resultSetAddTerm(p->zh, p->termset, name[len], db, index_name, term_tmp); } -#endif (p->isam_p_indx)++; } @@ -1323,7 +1323,6 @@ static ZEBRA_RES grep_info_prepare(ZebraHandle zh, grep_info->zh = zh; grep_info->reg_type = reg_type; grep_info->termset = 0; - if (!zapt) return ZEBRA_OK; attr_init_APT(&termset, zapt, 8); @@ -1331,6 +1330,10 @@ static ZEBRA_RES grep_info_prepare(ZebraHandle zh, attr_find_ex(&termset, NULL, &termset_value_string); if (termset_value_numeric != -1) { +#if TERMSET_DISABLE + zebra_setError(zh, YAZ_BIB1_UNSUPP_SEARCH, "termset"); + return ZEBRA_FAIL; +#else char resname[32]; const char *termset_name = 0; if (termset_value_numeric != -2) @@ -1348,6 +1351,7 @@ static ZEBRA_RES grep_info_prepare(ZebraHandle zh, zebra_setError(zh, YAZ_BIB1_ILLEGAL_RESULT_SET_NAME, termset_name); return ZEBRA_FAIL; } +#endif } return ZEBRA_OK; }