From 52637f6d9498ad3b01737ef4faa889beff34214d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 26 Oct 2006 23:45:46 +0000 Subject: [PATCH] Fixed bug #710: Duplicate keys for CDATA in xelm/melm rules. For X-Path termlist indexing, the sequence number is updated to the maximum sequence number generated. --- index/recgrs.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index/recgrs.c b/index/recgrs.c index 4d621ef..4062b52 100644 --- a/index/recgrs.c +++ b/index/recgrs.c @@ -1,4 +1,4 @@ -/* $Id: recgrs.c,v 1.7 2006-09-29 10:02:47 adam Exp $ +/* $Id: recgrs.c,v 1.8 2006-10-26 23:45:46 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -564,6 +564,7 @@ static void index_xpath(struct source_parser *sp, data1_node *n, if (n->root->u.root.absyn && (tl = xpath_termlist_by_tagpath(tag_path_full, n))) { + zint max_seqno = 0; for (; tl; tl = tl->next) { /* need to copy recword because it may be changed */ @@ -611,7 +612,12 @@ static void index_xpath(struct source_parser *sp, data1_node *n, else (*p->tokenAdd)(&wrd_tl); } + if (wrd_tl.seqno > max_seqno) + max_seqno = wrd_tl.seqno; } + if (max_seqno) + wrd->seqno = max_seqno; + } /* xpath indexing is done, if there was no termlist given, or no ! in the termlist, and default indexing is enabled... */ -- 1.7.10.4