X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=rset%2Frsisamd.c;h=b0e06cab54dc6f05dcc1ec1425c364e018aae0c5;hp=a66c5b11af0b3b5f1ce4d038aae87720620800ef;hb=b8e1425a7f78791afbf45dc11acd82808e455c65;hpb=6feeb67bdd353384cc16289c7db4fcb2e62cb74f diff --git a/rset/rsisamd.c b/rset/rsisamd.c index a66c5b1..b0e06ca 100644 --- a/rset/rsisamd.c +++ b/rset/rsisamd.c @@ -4,7 +4,11 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: rsisamd.c,v $ - * Revision 1.2 2002-04-05 08:46:26 adam + * Revision 1.3 2002-07-12 18:12:22 heikki + * Isam-D now stores small entries directly in the dictionary. + * Needs more tuning and cleaning... + * + * Revision 1.2 2002/04/05 08:46:26 adam * Zebra with full functionality * * Revision 1.1 2001/01/16 19:17:18 heikki @@ -50,8 +54,10 @@ struct rset_pp_info { }; struct rset_isamd_info { - ISAMD is; - ISAMD_P pos; + ISAMD is; + /* ISAMD_P pos; */ + char dictentry[ISAMD_MAX_DICT_LEN]; + int dictlen; struct rset_pp_info *ispt_list; }; @@ -63,7 +69,9 @@ static void *r_create(RSET ct, const struct rset_control *sel, void *parms) ct->flags |= RSET_FLAG_VOLATILE; info = (struct rset_isamd_info *) xmalloc (sizeof(*info)); info->is = pt->is; - info->pos = pt->pos; + /*info->pos = pt->pos;*/ + info->dictlen = pt->dictlen; + memcpy(info->dictentry, pt->dictentry, pt->dictlen); info->ispt_list = NULL; ct->no_rset_terms = 1; ct->rset_terms = (RSET_TERM *) xmalloc (sizeof(*ct->rset_terms)); @@ -85,7 +93,7 @@ RSFD r_open (RSET ct, int flag) ptinfo = (struct rset_pp_info *) xmalloc (sizeof(*ptinfo)); ptinfo->next = info->ispt_list; info->ispt_list = ptinfo; - ptinfo->pt = isamd_pp_open (info->is, info->pos); + ptinfo->pt = isamd_pp_open (info->is, info->dictentry, info->dictlen); ptinfo->info = info; if (ct->rset_terms[0]->nn < 0) ct->rset_terms[0]->nn = isamd_pp_num (ptinfo->pt);