projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Dont index attributes. Bug #460
[idzebra-moved-to-github.git]
/
recctrl
/
recgrs.c
diff --git
a/recctrl/recgrs.c
b/recctrl/recgrs.c
index
eb80884
..
274c130
100644
(file)
--- a/
recctrl/recgrs.c
+++ b/
recctrl/recgrs.c
@@
-1,4
+1,4
@@
-/* $Id: recgrs.c,v 1.103 2005-06-29 16:52:27 adam Exp $
+/* $Id: recgrs.c,v 1.106 2006-02-06 13:34:13 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
Copyright (C) 1995-2005
Index Data ApS
@@
-220,16
+220,20
@@
static int sp_expr(struct source_parser *sp, data1_node *n, RecWord *wrd)
}
else if (sp->len > 0 && isdigit(*(unsigned char *)sp->tok))
{
}
else if (sp->len > 0 && isdigit(*(unsigned char *)sp->tok))
{
- wrd->term_buf = nmem_malloc(sp->nmem, sp->len);
- memcpy(wrd->term_buf, sp->tok, sp->len);
+ char *b;
wrd->term_len = sp->len;
wrd->term_len = sp->len;
+ b = nmem_malloc(sp->nmem, sp->len);
+ memcpy(b, sp->tok, sp->len);
+ wrd->term_buf = b;
sp_lex(sp);
}
else if (sp->len > 2 && sp->tok[0] == '\'' && sp->tok[sp->len-1] == '\'')
{
sp_lex(sp);
}
else if (sp->len > 2 && sp->tok[0] == '\'' && sp->tok[sp->len-1] == '\'')
{
+ char *b;
wrd->term_len = sp->len - 2;
wrd->term_len = sp->len - 2;
- wrd->term_buf = nmem_malloc(sp->nmem, wrd->term_len);
- memcpy(wrd->term_buf, sp->tok+1, wrd->term_len);
+ b = nmem_malloc(sp->nmem, wrd->term_len);
+ memcpy(b, sp->tok+1, wrd->term_len);
+ wrd->term_buf = b;
sp_lex(sp);
}
else
sp_lex(sp);
}
else
@@
-393,15
+397,10
@@
data1_termlist *xpath_termlist_by_tagpath(char *tagpath, data1_node *n)
int ok = 0;
sprintf (pexpr, "/%s\n", tagpath);
int ok = 0;
sprintf (pexpr, "/%s\n", tagpath);
- yaz_log(YLOG_LOG, "Checking tagpath %s", pexpr);
for (; xpe; xpe = xpe->next)
{
int i;
ok = dfa_match_first(xpe->dfa->states, pexpr);
for (; xpe; xpe = xpe->next)
{
int i;
ok = dfa_match_first(xpe->dfa->states, pexpr);
- if (ok)
- yaz_log(YLOG_LOG, " xpath got match %s",xpe->xpath_expr);
- else
- yaz_log(YLOG_LOG, " xpath no match %s",xpe->xpath_expr);
if (ok) {
#ifdef ENHANCED_XELM
if (ok) {
#ifdef ENHANCED_XELM
@@
-524,7
+523,6
@@
static void mk_tag_path_full(char *tag_path_full, size_t max, data1_node *n)
break;
}
tag_path_full[flen] = 0;
break;
}
tag_path_full[flen] = 0;
- yaz_log(YLOG_LOG, "mk_tag_path_full=%s", tag_path_full);
}
}
@@
-815,8
+813,9
@@
static void index_xpath(struct source_parser *sp, data1_node *n,
p, wrd);
xpdone = 1;
} else {
p, wrd);
xpdone = 1;
} else {
- /* add attribute based index for the attribute */
- if (xp->value)
+ /* if this fragment is enabled, we index
+ attribute values as well. See bug #460 */
+ if (0 && xp->value)
{
#if NATTR
wrd->index_name = tl->index_name;
{
#if NATTR
wrd->index_name = tl->index_name;