X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Frpnsearch.c;h=ed114a3aa9a02e8e7f51f6a52d4c43c9123b8843;hb=b2084f54a96f78eede08dda6f98d5ee1f502e91b;hp=b9350c82c3ad1716956528dcbc20c21d25c03e0b;hpb=52a3c85ef0baad016f2b324644f34d9fd62f7d34;p=idzebra-moved-to-github.git diff --git a/index/rpnsearch.c b/index/rpnsearch.c index b9350c8..ed114a3 100644 --- a/index/rpnsearch.c +++ b/index/rpnsearch.c @@ -1,4 +1,4 @@ -/* $Id: rpnsearch.c,v 1.22 2007-11-13 13:41:51 adam Exp $ +/* $Id: rpnsearch.c,v 1.26 2007-12-03 14:33:22 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -1137,7 +1137,7 @@ static ZEBRA_RES string_term(ZebraHandle zh, Z_AttributesPlusTerm *zapt, { WRBUF pr_wr = wrbuf_alloc(); - wrbuf_verbose_str(pr_wr, wrbuf_buf(term_dict), wrbuf_len(term_dict)); + wrbuf_write_escaped(pr_wr, wrbuf_buf(term_dict), wrbuf_len(term_dict)); yaz_log(YLOG_LOG, "dict_lookup_grep: %s", wrbuf_cstr(pr_wr)); wrbuf_destroy(pr_wr); } @@ -1345,13 +1345,6 @@ static ZEBRA_RES rpn_search_APT_position(ZebraHandle zh, return ZEBRA_FAIL; } - if (!zh->reg->isamb && !zh->reg->isamc) - { - zebra_setError_zint(zh, YAZ_BIB1_UNSUPP_POSITION_ATTRIBUTE, - position_value); - return ZEBRA_FAIL; - } - if (zebra_apt_get_ord(zh, zapt, index_type, 0, attributeSet, &ord) != ZEBRA_OK) { @@ -1365,13 +1358,9 @@ static ZEBRA_RES rpn_search_APT_position(ZebraHandle zh, { assert(*val == sizeof(ISAM_P)); memcpy(&isam_p, val+1, sizeof(isam_p)); - - if (zh->reg->isamb) - *rset = rsisamb_create(rset_nmem, kc, kc->scope, - zh->reg->isamb, isam_p, 0); - else if (zh->reg->isamc) - *rset = rsisamc_create(rset_nmem, kc, kc->scope, - zh->reg->isamc, isam_p, 0); + + *rset = zebra_create_rset_isam(zh, rset_nmem, kc, kc->scope, + isam_p, 0); } return ZEBRA_OK; } @@ -1408,7 +1397,12 @@ static ZEBRA_RES rpn_search_APT_phrase(ZebraHandle zh, rset_nmem, &first_set, kc); if (res != ZEBRA_OK) + { + int i; + for (i = 0; i