X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fsortidx.c;h=8fe9672b9284d0a4ea8651a98a478551d766c0b4;hb=a741f3ed46c75118dd042c30b375c9cea923b33e;hp=464bfaa9373c8e5b4af45f79924e4a69ac645c3c;hpb=161aa7805930f6b91ccea027e4afa4ccce41c379;p=idzebra-moved-to-github.git diff --git a/index/sortidx.c b/index/sortidx.c index 464bfaa..8fe9672 100644 --- a/index/sortidx.c +++ b/index/sortidx.c @@ -1,8 +1,5 @@ -/* $Id: sortidx.c,v 1.20 2006-12-18 23:40:07 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 @@ -31,7 +28,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include "recindex.h" -#define SORT_MAX_TERM 127 +#define SORT_MAX_TERM 110 #define SORT_IDX_BLOCKSIZE 64 @@ -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;