X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Frpnscan.c;h=a66d83097d4ae35181b24f096895d8478b2ea8f1;hb=5e7ca59d5cff2e9ee4710bb9a10cdb9434b9ad5a;hp=fa12bbd353643d6a47bcde4388e40cc64c367416;hpb=7336356a8d037e2782e201bcdc48ff4ae2850ae4;p=idzebra-moved-to-github.git diff --git a/index/rpnscan.c b/index/rpnscan.c index fa12bbd..a66d830 100644 --- a/index/rpnscan.c +++ b/index/rpnscan.c @@ -1,8 +1,5 @@ -/* $Id: rpnscan.c,v 1.24 2007-12-13 11:09:20 adam Exp $ - Copyright (C) 1995-2007 - Index Data ApS - -This file is part of the Zebra server. +/* This file is part of the Zebra server. + Copyright (C) 1994-2010 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -250,6 +247,10 @@ static int scan_save_set(ZebraHandle zh, ODR stream, NMEM nmem, { glist[pos].display_term = odr_strdup(stream, w->term); } + else + { + yaz_log(YLOG_WARN, "zebra_snippets_lookup failed for pos=%d", pos); + } } zebra_snippets_destroy(rec_snippets); } @@ -260,6 +261,12 @@ static int scan_save_set(ZebraHandle zh, ODR stream, NMEM nmem, glist[pos].term = glist[pos].display_term; } + if (!glist[pos].term) + { + yaz_log(YLOG_WARN, "Could not generate scan term for pos=%d", + pos); + glist[pos].term = "None"; + } glist[pos].occurrences = count; zebra_snippets_destroy(hit_snippets); } @@ -575,6 +582,7 @@ ZEBRA_RES rpn_scan(ZebraHandle zh, ODR stream, Z_AttributesPlusTerm *zapt, /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab