From 685d8166d00e72e98844a1b106cf2af284acd2e2 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 29 Aug 2005 12:58:19 +0000 Subject: [PATCH] Disable attribute indexing for regular set:use xelm indexing. Ensure sequence number is increased for xpath-indexing. If not, it may produce bad duplicates. --- recctrl/recgrs.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/recctrl/recgrs.c b/recctrl/recgrs.c index 7c886e8..4dd4e43 100644 --- a/recctrl/recgrs.c +++ b/recctrl/recgrs.c @@ -1,4 +1,4 @@ -/* $Id: recgrs.c,v 1.86.2.3 2005-06-29 16:52:50 adam Exp $ +/* $Id: recgrs.c,v 1.86.2.4 2005-08-29 12:58:19 adam Exp $ Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003 Index Data Aps @@ -552,6 +552,7 @@ static void index_xpath (data1_node *n, struct recExtractCtrl *p, } else (*p->tokenAdd)(&wrd_tl); + xpdone = 1; } else { /* this is just the old fashioned attribute based index */ @@ -588,6 +589,8 @@ static void index_xpath (data1_node *n, struct recExtractCtrl *p, wrd->reg_type = 'w'; (*p->tokenAdd)(wrd); } + else + wrd->seqno++; break; case DATA1N_tag: flen = 0; @@ -633,7 +636,11 @@ static void index_xpath (data1_node *n, struct recExtractCtrl *p, directive, or default xpath indexing is enabled */ if (!(do_xpindex = 1 - termlist_only)) { if ((tl = xpath_termlist_by_tagpath(tag_path_full, n))) { - for (; tl; tl = tl->next) { if (!tl->att) {do_xpindex = 1;} } + for (; tl; tl = tl->next) + { + if (!tl->att) + do_xpindex = 1; + } } } if (do_xpindex) { @@ -729,7 +736,10 @@ static void index_xpath (data1_node *n, struct recExtractCtrl *p, xp->value, tl->structure, p, wrd); xpdone = 1; - } else { + } +#if 0 + else + { /* add attribute based index for the attribute */ if (xp->value) { wrd->attrSet = (int) @@ -741,6 +751,7 @@ static void index_xpath (data1_node *n, struct recExtractCtrl *p, (*p->tokenAdd)(wrd); } } +#endif } } /* if there was no termlist for the given path, -- 1.7.10.4