X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fsortidx.c;h=962841a9bb8d465064471271f9bf9a393c049f87;hb=527dab66d9847bb7f8a931c558306a070064bf25;hp=464bfaa9373c8e5b4af45f79924e4a69ac645c3c;hpb=161aa7805930f6b91ccea027e4afa4ccce41c379;p=idzebra-moved-to-github.git diff --git a/index/sortidx.c b/index/sortidx.c index 464bfaa..962841a 100644 --- a/index/sortidx.c +++ b/index/sortidx.c @@ -1,5 +1,5 @@ -/* $Id: sortidx.c,v 1.20 2006-12-18 23:40:07 adam Exp $ - Copyright (C) 1995-2006 +/* $Id: sortidx.c,v 1.24 2007-01-15 15:10:17 adam Exp $ + Copyright (C) 1995-2007 Index Data ApS This file is part of the Zebra server. @@ -31,7 +31,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 +253,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 +273,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 +382,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;