X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fsortidx.c;h=8fe9672b9284d0a4ea8651a98a478551d766c0b4;hb=a741f3ed46c75118dd042c30b375c9cea923b33e;hp=ac087833feb2984b70d2916383101237d69e7cd6;hpb=a4d1fff3d8575f7f3db84630cc408fdd8d051f8f;p=idzebra-moved-to-github.git diff --git a/index/sortidx.c b/index/sortidx.c index ac08783..8fe9672 100644 --- a/index/sortidx.c +++ b/index/sortidx.c @@ -1,8 +1,5 @@ -/* $Id: sortidx.c,v 1.21 2006-12-19 00:25:41 adam Exp $ - Copyright (C) 1995-2006 - Index Data ApS - -This file is part of the Zebra server. +/* This file is part of the Zebra server. + Copyright (C) 1995-2008 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 @@ -253,10 +250,10 @@ int zebra_sort_type(zebra_sort_index_t si, int id) else { sf->isam_p = isamb_get_root_ptr(sf->u.isamb); - sf->isam_pp = 0; } break; } + sf->isam_pp = 0; sf->no_inserted = 0; sf->no_deleted = 0; sf->next = si->files; @@ -273,7 +270,7 @@ void zebra_sort_sysno(zebra_sort_index_t si, zint sysno) { sf->no_inserted = 0; sf->no_deleted = 0; - if (new_sysno < si->sysno && sf->isam_pp) + if (sf->isam_pp && new_sysno < si->sysno && sf->isam_pp) { isamb_pp_close(sf->isam_pp); sf->isam_pp = 0; @@ -382,12 +379,8 @@ void zebra_sort_read(zebra_sort_index_t si, char *buf) { struct sort_term st, st_untilbuf; - st.sysno = 99999; if (!sf->isam_pp) - { - yaz_log(YLOG_LOG, "isamb_pp_open " ZINT_FORMAT, sf->isam_p); sf->isam_pp = isamb_pp_open(sf->u.isamb, sf->isam_p, 1); - } if (!sf->isam_pp) return;