From 12a519a0bc231a70b7c3211cc21e9fb1f98510f0 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 28 Nov 2006 08:44:10 +0000 Subject: [PATCH] Issue warning if staticrank is < 0. And set to 0 --- index/extract.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index/extract.c b/index/extract.c index b140531..7dcbbee 100644 --- a/index/extract.c +++ b/index/extract.c @@ -1,4 +1,4 @@ -/* $Id: extract.c,v 1.242 2006-11-25 09:15:19 adam Exp $ +/* $Id: extract.c,v 1.243 2006-11-28 08:44:10 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -651,6 +651,11 @@ ZEBRA_RES zebra_extract_record_stream(ZebraHandle zh, *sysno = rec->sysno; recordAttr = rec_init_attr (zh->reg->zei, rec); + if (extractCtrl.staticrank < 0) + { + yaz_log(YLOG_WARN, "Negative staticrank for record. Set to 0"); + extractCtrl.staticrank = 0; + } recordAttr->staticrank = extractCtrl.staticrank; if (matchStr) -- 1.7.10.4