+--- 1.2.0 2002/04/05
+
+Multiple registers. New setting in resource 'root' that holds base
+directory for register(s). A group a databases may be put in separate
+register in directory root/reg by using db name 'reg/db1' ... 'reg/dbN'.
+
--- 1.1.1 2002/03/21
Fixes for Digital Unix
-## $Id: Makefile.am,v 1.3 2000-10-11 12:31:27 adam Exp $
+## $Id: Makefile.am,v 1.4 2002-04-05 08:46:26 adam Exp $
AUTOMAKE_OPTIONS=foreign
EXTRA_DIST= README CHANGELOG
-if ISZMBOL
SUBDIRS=util bfile dfa dict isams isamb isamc isam rset recctrl tab index test
-else
-SUBDIRS=util bfile dfa dict isams rset recctrl tab index test
-endif
DIST_SUBDIRS=$(SUBDIRS) include doc
SPEC_FILE=$(PACKAGE).spec
Copyright (C) 1995-2002, Index Data ApS.
See the file LICENSE.zebra for details.
-README for Zebra
- $Id: README,v 1.12 2002-03-20 20:24:29 adam Exp $
+Zebra: $Id: README,v 1.13 2002-04-05 08:46:26 adam Exp $
Documentation about this software can be found in the subdirectory
'doc' and Zebra's home page: http://www.indexdata.dk/zebra/
#!/bin/sh
-# $Id: buildconf.sh,v 1.6 2002-04-04 14:14:13 adam Exp $
+# $Id: buildconf.sh,v 1.7 2002-04-05 08:46:26 adam Exp $
dir=`aclocal --print-ac-dir`
if [ -f $dir/yaz.m4 ]; then
aclocal
else
aclocal -I .
fi
-test -d isamc || mkdir isamc
-test -d isamb || mkdir isamb
-test -d isam || mkdir isam
automake -a >/dev/null 2>&1
autoconf
if [ -f config.cache ]; then
dnl Zebra, Index Data Aps, 1994-2002
-dnl $Id: configure.in,v 1.32 2002-03-15 20:11:36 adam Exp $
+dnl $Id: configure.in,v 1.33 2002-04-05 08:46:26 adam Exp $
dnl
AC_INIT(include/zebraver.h)
AC_MSG_CHECKING(for package)
AC_MSG_RESULT([Z'mbol])
PROGPREFIX=zmbol
AC_DEFINE(ZMBOL,1)
- AM_INIT_AUTOMAKE(zmbol,1.1.1)
+ AM_INIT_AUTOMAKE(zmbol,1.2.0)
else
AC_MSG_RESULT([Zebra])
PROGPREFIX=zebra
AC_DEFINE(ZMBOL,0)
- AM_INIT_AUTOMAKE(zebra,1.1.1)
- if test ! -r ${srcdir}/isam; then
- mkdir ${srcdir}/isam
- fi
- touch ${srcdir}/isam/Makefile.in
- if test ! -r ${srcdir}/isamc; then
- mkdir ${srcdir}/isamc
- fi
- touch ${srcdir}/isamc/Makefile.in
- if test ! -r ${srcdir}/isamb; then
- mkdir ${srcdir}/isamb
- fi
- touch ${srcdir}/isamb/Makefile.in
+ AM_INIT_AUTOMAKE(zebra,1.2.0)
fi
AM_CONDITIONAL(ISZMBOL,test $PACKAGE = zmbol)
dnl ------ Substitutions
* Copyright (C) 1994-2002, Index Data
* All rights reserved.
*
- * $Id: zebraver.h,v 1.19 2002-02-20 17:30:01 adam Exp $
+ * $Id: zebraver.h,v 1.20 2002-04-05 08:46:26 adam Exp $
*/
#ifndef ZEBRAVER
-#define ZEBRAVER "1.1.1"
+#define ZEBRAVER "1.2.0"
#endif
#ifndef ZEBRADATE
-#define ZEBRADATE "$Date: 2002-02-20 17:30:01 $"
+#define ZEBRADATE "$Date: 2002-04-05 08:46:26 $"
#endif
-## $Id: Makefile.am,v 1.10 2002-03-21 20:12:27 adam Exp $
+## $Id: Makefile.am,v 1.11 2002-04-05 08:46:26 adam Exp $
noinst_PROGRAMS = apitest kdump
zebraapi.c zinfo.c invstat.c sortidx.c compact.c zsets.c zrpn.c \
rank1.c trunc.c retrieve.c extract.c index.h recindex.h recindxp.h \
zebraapi.h zinfo.h zserver.h
-if ISZMBOL
-zmbol_libs = ../isam/libisam.a ../isamc/libisamc.a ../isamb/libisamb.a
-else
-zmbol_libs =
-endif
libzebra_a_LIBADD = \
../rset/librset.a ../dict/libdict.a ../isams/libisams.a \
- $(zmbol_libs) ../recctrl/librecctrl.a ../bfile/libbfile.a ../dfa/libdfa.a \
+ ../isam/libisam.a ../isamc/libisamc.a ../isamb/libisamb.a \
+ ../recctrl/librecctrl.a ../bfile/libbfile.a ../dfa/libdfa.a \
../util/libutil.a
if ISZMBOL
* Copyright (C) 1995-2002, Index Data
* All rights reserved.
* Sebastian Hammer, Adam Dickmeiss, Heikki Levanto
- * $Id: index.h,v 1.76 2002-04-04 20:50:37 adam Exp $
+ * $Id: index.h,v 1.77 2002-04-05 08:46:26 adam Exp $
*/
#ifndef INDEX_H
#include <dict.h>
#include <isams.h>
-#if ZMBOL
#include <isam.h>
#include <isamc.h>
#include <isamd.h>
#define ISAM_DEFAULT "c"
-#else
-#define ISAM_DEFAULT "s"
-#endif
#include <yaz/data1.h>
#include <recctrl.h>
#include "recindex.h"
void inv_compact (BFiles bfs);
void key_input (ZebraHandle zh, int nkeys, int cache, Res res);
ISAMS_M key_isams_m (Res res, ISAMS_M me);
-#if ZMBOL
ISAMC_M key_isamc_m (Res res, ISAMC_M me);
ISAMD_M key_isamd_m (Res res, ISAMD_M me);
-#endif
int merge_sort (char **buf, int from, int to);
int key_SU_code (int ch, char *out);
char *name;
ISAMS isams;
-#if ZMBOL
ISAM isam;
ISAMC isamc;
ISAMD isamd;
-#endif
Dict dict;
Dict matchDict;
SortIdx sortIdx;
#include <string.h>
#include "index.h"
-#if ZMBOL
#include "../isamc/isamd-p.h"
-#endif
struct inv_stat_info {
ISAMS isams;
-#if ZMBOL
ISAM isam;
ISAMC isamc;
ISAMD isamd;
-#endif
int no_isam_entries[9];
int no_dict_entries;
int no_dict_bytes;
stat_info->no_isam_entries[0] += occur;
isams_pp_close (pp);
}
-#if ZMBOL
if (stat_info->isam)
{
ISPT ispt;
stat_info->no_isam_entries[isamd_type(isam_p)] += occur;
isamd_pp_close (pp);
}
-#endif
while (occur > stat_info->isam_bounds[i] && stat_info->isam_bounds[i])
i++;
++(stat_info->isam_occurrences[i]);
BFiles bfs;
Dict dict;
ISAMS isams = NULL;
-#if ZMBOL
ISAM isam = NULL;
ISAMC isamc = NULL;
ISAMD isamd = NULL;
int blocks;
int size;
int count;
-#endif
Records records;
int i, prev;
int before = 0;
exit (1);
}
}
-#if ZMBOL
else if (res_get_match (res, "isam", "i", ISAM_DEFAULT))
{
isam = is_open (bfs, FNAME_ISAM, key_compare, 0,
exit (1);
}
}
-#endif
records = rec_open (bfs, 0, 0);
for (i = 0; i<=SINGLETON_TYPE; i++)
stat_info.no_dict_entries = 0;
stat_info.no_dict_bytes = 0;
stat_info.isams = isams;
-#if ZMBOL
stat_info.isam = isam;
stat_info.isamc = isamc;
stat_info.isamd = isamd;
-#endif
stat_info.isam_bounds[0] = 1;
stat_info.isam_bounds[1] = 2;
stat_info.isam_bounds[2] = 3;
dict_scan (dict, term_dict, &before, &after, &stat_info, inv_stat_handle);
-#if ZMBOL
if (isamc)
{
fprintf (stderr, " Blocks Occur Size KB Bytes/Entry\n");
if ( (isamd) && (isamd->method->debug>0))
fprintf (stderr, "\n%d words using %d bytes\n",
stat_info.no_dict_entries, stat_info.no_dict_bytes);
-#endif
fprintf (stderr, " Occurrences Words\n");
prev = 1;
for (i = 0; stat_info.isam_bounds[i]; i++)
if (isams)
isams_close (isams);
-#if ZMBOL
if (isam)
is_close (isam);
if (isamc)
isc_close (isamc);
if (isamd)
isamd_close (isamd);
-#endif
-
xmalloc_trav("unfreed"); /*! while hunting memory leaks */
}
/*
*
* $Log: invstat.c,v $
- * Revision 1.23 2002-04-04 14:14:13 adam
+ * Revision 1.24 2002-04-05 08:46:26 adam
+ * Zebra with full functionality
+ *
+ * Revision 1.23 2002/04/04 14:14:13 adam
* Multiple registers (alpha early)
*
* Revision 1.22 2002/02/20 17:30:01 adam
return me;
}
-#if ZMBOL
-
ISAMC_M key_isamc_m (Res res, ISAMC_M me)
{
isc_getmethod (me);
return me;
}
-#endif
-
int key_SU_encode (int ch, char *out)
{
int i;
/*
* $Log: kcompare.c,v $
- * Revision 1.37 2001-11-19 23:08:30 adam
+ * Revision 1.38 2002-04-05 08:46:26 adam
+ * Zebra with full functionality
+ *
+ * Revision 1.37 2001/11/19 23:08:30 adam
* Added const qualifier for name parameter of key_SU_decode.
*
* Revision 1.36 2001/10/15 19:53:43 adam
* All rights reserved.
* Sebastian Hammer, Adam Dickmeiss, Heikki Levanto
*
- * $Id: kinput.c,v 1.47 2002-04-04 14:14:13 adam Exp $
+ * $Id: kinput.c,v 1.48 2002-04-05 08:46:26 adam Exp $
*
* Bugs
* - Allocates a lot of memory for the merge process, but never releases it.
int (*cmp)(const void *p1, const void *p2);
Dict dict;
ISAMS isams;
-#if ZMBOL
ISAM isam;
ISAMC isamc;
ISAMD isamd;
-#endif
};
struct heap_info *key_heap_init (int nkeys,
return 1;
}
-#if ZMBOL
int heap_inpc (struct heap_info *hi)
{
struct heap_cread_info hci;
return 0;
}
-#endif
-
int heap_inps (struct heap_info *hi)
{
struct heap_cread_info hci;
hi = key_heap_init (nkeys, key_qsort_compare);
hi->dict = zh->reg->dict;
hi->isams = zh->reg->isams;
-#if ZMBOL
hi->isam = zh->reg->isam;
hi->isamc = zh->reg->isamc;
hi->isamd = zh->reg->isamd;
-#endif
for (i = 1; i<=nkeys; i++)
if ((r = key_file_read (kf[i], rbuf)))
key_heap_insert (hi, rbuf, r, kf[i]);
if (zh->reg->isams)
heap_inps (hi);
-#if ZMBOL
else if (zh->reg->isamc)
heap_inpc (hi);
else if (zh->reg->isam)
heap_inp (hi);
else if (zh->reg->isamd)
heap_inpd (hi);
-#endif
for (i = 1; i<=nkeys; i++)
{
* Copyright (C) 1994-2002, Index Data
* All rights reserved.
*
- * $Id: main.c,v 1.84 2002-04-04 20:50:37 adam Exp $
+ * $Id: main.c,v 1.85 2002-04-05 08:46:26 adam Exp $
*/
#include <stdio.h>
#include <string.h>
if (!zs)
{
#if ZMBOL
- logf (LOG_LOG, "zmbol version %s %s",
+ logf (LOG_LOG, "Z'mbol version %s %s",
ZEBRAVER, ZEBRADATE);
#else
- logf (LOG_LOG, "zebra version %s %s",
+ logf (LOG_LOG, "Zebra version %s %s",
ZEBRAVER, ZEBRADATE);
#endif
zs = zebra_start (configName ? configName : "zebra.cfg");
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: recindex.c,v $
- * Revision 1.31 2001-02-26 22:14:59 adam
+ * Revision 1.32 2002-04-05 08:46:26 adam
+ * Zebra with full functionality
+ *
+ * Revision 1.31 2001/02/26 22:14:59 adam
* Updated for BZIP2 1.0.X. Configure script doesn't enable 64 bit LFS
* on broken glibc on Redhat 7.0.
*
sysno = p->head.index_free;
p->head.index_free = entry.next;
}
-#if ZMBOL
-#else
- if (sysno > 100000)
- {
- logf (LOG_FATAL, "100,000 record limit reached");
- exit (1);
- }
-#endif
(p->head.no_records)++;
rec->sysno = sysno;
for (i = 0; i < REC_NO_INFO; i++)
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: trunc.c,v $
- * Revision 1.21 2002-04-04 14:14:13 adam
+ * Revision 1.22 2002-04-05 08:46:26 adam
+ * Zebra with full functionality
+ *
+ * Revision 1.21 2002/04/04 14:14:13 adam
* Multiple registers (alpha early)
*
* Revision 1.20 2002/03/20 20:24:29 adam
#include <rstemp.h>
#include <rsnull.h>
#include <rsisams.h>
-#if ZMBOL
#include <rsisam.h>
#include <rsisamc.h>
#include <rsisamd.h>
#if NEW_TRUNC
#include <rsm_or.h>
#endif
-#endif
struct trunc_info {
int *ptr;
xfree (rsfd);
heap_close (ti);
}
-#if ZMBOL
else if (zi->reg->isam)
{
ISPT *ispt;
xfree (ispt);
}
-#endif
else if (zi->reg->isams)
{
ISAMS_PP *ispt;
return i1 - i2;
}
-#if ZMBOL
static int isam_trunc_cmp (const void *p1, const void *p2)
{
ISAM_P i1 = *(ISAM_P*) p1;
return d;
return isamd_block (i1) - isamd_block (i2);
}
-#endif
RSET rset_trunc (ZebraHandle zi, ISAMS_P *isam_p, int no,
const char *term, int length, const char *flags)
}
qsort (isam_p, no, sizeof(*isam_p), isams_trunc_cmp);
}
-#if ZMBOL
else if (zi->reg->isam)
{
if (no == 1)
#endif
qsort (isam_p, no, sizeof(*isam_p), isamd_trunc_cmp);
}
-#endif
else
{
logf (LOG_WARN, "Unknown isam set in rset_trunc");
* Copyright (C) 1995-2002, Index Data
* All rights reserved.
*
- * $Id: zebraapi.c,v 1.52 2002-04-04 20:50:37 adam Exp $
+ * $Id: zebraapi.c,v 1.53 2002-04-05 08:46:26 adam Exp $
*/
#include <assert.h>
reg->sortIdx = 0;
reg->isams = 0;
reg->matchDict = 0;
-#if ZMBOL
reg->isam = 0;
reg->isamc = 0;
reg->isamd = 0;
-#endif
reg->zei = 0;
reg->matchDict = 0;
return 0;
}
}
-#if ZMBOL
else if (res_get_match (res, "isam", "i", ISAM_DEFAULT))
{
if (!(reg->isam = is_open (reg->bfs, FNAME_ISAM, key_compare, rw,
return 0;
}
}
-#endif
reg->zei = zebraExplain_open (reg->records, reg->dh,
res, rw, reg,
explain_extract);
sortIdx_close (reg->sortIdx);
if (reg->isams)
isams_close (reg->isams);
-#if ZMBOL
if (reg->isam)
is_close (reg->isam);
if (reg->isamc)
isc_close (reg->isamc);
if (reg->isamd)
isamd_close (reg->isamd);
-#endif
rec_close (®->records);
}
/*
- * Copyright (C) 1995-2000, Index Data
+ * Copyright (C) 1995-2002, Index Data
* All rights reserved.
*
- * $Id: zserver.c,v 1.86 2002-04-04 20:50:37 adam Exp $
+ * $Id: zserver.c,v 1.87 2002-04-05 08:46:26 adam Exp $
*/
#include <stdio.h>
/*
- * Copyright (C) 1994-1999, Index Data
+ * Copyright (C) 1994-2002, Index Data
* All rights reserved.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: rsisam.c,v $
- * Revision 1.21 1999-11-30 13:48:04 adam
- * Improved installation. Updated for inclusion of YAZ header files.
- *
- * Revision 1.20 1999/05/26 07:49:14 adam
- * C++ compilation.
- *
- * Revision 1.19 1999/02/02 14:51:34 adam
- * Updated WIN32 code specific sections. Changed header.
- *
- * Revision 1.18 1998/03/05 08:36:28 adam
- * New result set model.
- *
- * Revision 1.17 1997/12/18 10:54:25 adam
- * New method result set method rs_hits that returns the number of
- * hits in result-set (if known). The ranked result set returns real
- * number of hits but only when not combined with other operands.
- *
- * Revision 1.16 1997/10/31 12:37:01 adam
- * Code calls xfree() instead of free().
- *
- * Revision 1.15 1996/10/29 13:55:22 adam
- * Include of zebrautl.h instead of alexutil.h.
- *
- * Revision 1.14 1995/12/11 09:15:24 adam
- * New set types: sand/sor/snot - ranked versions of and/or/not in
- * ranked/semi-ranked result sets.
- * Note: the snot not finished yet.
- * New rset member: flag.
- * Bug fix: r_delete in rsrel.c did free bad memory block.
- *
- * Revision 1.13 1995/10/12 12:41:56 adam
- * Private info (buf) moved from struct rset_control to struct rset.
- * Bug fixes in relevance.
- *
- * Revision 1.12 1995/10/10 14:00:04 adam
- * Function rset_open changed its wflag parameter to general flags.
- *
- * Revision 1.11 1995/10/06 14:38:05 adam
- * New result set method: r_score.
- * Local no (sysno) and score is transferred to retrieveCtrl.
- *
- * Revision 1.10 1995/09/08 14:52:42 adam
- * Work on relevance feedback.
- *
- * Revision 1.9 1995/09/07 13:58:43 adam
- * New parameter: result-set file descriptor (RSFD) to support multiple
- * positions within the same result-set.
- * Boolean operators: and, or, not implemented.
- *
- * Revision 1.8 1995/09/06 16:11:56 adam
- * More work on boolean sets.
- *
- * Revision 1.7 1995/09/06 10:35:44 adam
- * Null set implemented.
- *
- * Revision 1.6 1995/09/05 11:43:24 adam
- * Complete version of temporary sets. Not tested yet though.
- *
- * Revision 1.5 1995/09/04 12:33:56 adam
- * Various cleanup. YAZ util used instead.
- *
- * Revision 1.4 1995/09/04 09:10:55 adam
- * Minor changes.
- *
- * Revision 1.3 1994/11/22 13:15:37 quinn
- * Simple
- *
- * Revision 1.2 1994/11/04 14:53:12 quinn
- * Work
*
+ * $Id: rsisam.c,v 1.22 2002-04-05 08:46:26 adam Exp $
*/
#include <stdio.h>
#include <assert.h>
#include <zebrautl.h>
-#if ZMBOL
#include <rsisam.h>
static void *r_create(RSET ct, const struct rset_control *sel, void *parms);
logf (LOG_FATAL, "ISAM set type is read-only");
return -1;
}
-#endif
/*
- * Copyright (C) 1994-1999, Index Data
+ * Copyright (C) 1994-2002, Index Data
* All rights reserved.
- * Sebastian Hammer, Adam Dickmeiss
- *
- * $Log: rsisamc.c,v $
- * Revision 1.10 2002-04-04 14:14:13 adam
- * Multiple registers (alpha early)
- *
- * Revision 1.9 2002/03/20 20:24:30 adam
- * Hits per term. Returned in SearchResult-1
- *
- * Revision 1.8 1999/11/30 13:48:04 adam
- * Improved installation. Updated for inclusion of YAZ header files.
- *
- * Revision 1.7 1999/05/26 07:49:14 adam
- * C++ compilation.
- *
- * Revision 1.6 1999/02/02 14:51:35 adam
- * Updated WIN32 code specific sections. Changed header.
- *
- * Revision 1.5 1998/03/05 08:36:28 adam
- * New result set model.
- *
- * Revision 1.4 1997/12/18 10:54:25 adam
- * New method result set method rs_hits that returns the number of
- * hits in result-set (if known). The ranked result set returns real
- * number of hits but only when not combined with other operands.
- *
- * Revision 1.3 1997/10/31 12:37:01 adam
- * Code calls xfree() instead of free().
- *
- * Revision 1.2 1996/11/08 11:15:57 adam
- * Compressed isam fully supported.
- *
- * Revision 1.1 1996/10/29 13:41:48 adam
- * First use of isamc.
*
+ * $Id: rsisamc.c,v 1.11 2002-04-05 08:46:26 adam Exp $
*/
#include <stdio.h>
#include <assert.h>
#include <zebrautl.h>
-#if ZMBOL
#include <rsisamc.h>
static void *r_create(RSET ct, const struct rset_control *sel, void *parms);
logf (LOG_FATAL, "ISAMC set type is read-only");
return -1;
}
-#endif
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: rsisamd.c,v $
- * Revision 1.1 2001-01-16 19:17:18 heikki
+ * Revision 1.2 2002-04-05 08:46:26 adam
+ * Zebra with full functionality
+ *
+ * Revision 1.1 2001/01/16 19:17:18 heikki
* Added rsisamd.c
*
*
#include <stdio.h>
#include <assert.h>
#include <zebrautl.h>
-#if ZMBOL
#include <rsisamd.h>
static void *r_create(RSET ct, const struct rset_control *sel, void *parms);
logf (LOG_FATAL, "ISAMD set type is read-only");
return -1;
}
-#endif
* All rights reserved.
* Sebastian Hammer, Adam Dickmeiss
*
- * $Id: rsm_or.c,v 1.11 2002-03-20 20:24:30 adam Exp $
+ * $Id: rsm_or.c,v 1.12 2002-04-05 08:46:26 adam Exp $
*
*/
#include <string.h>
#include <zebrautl.h>
-#if ZMBOL
#include <isam.h>
#include <isamc.h>
#include <rsm_or.h>
logf (LOG_FATAL, "mor set type is read-only");
return -1;
}
-#endif
Name: zebra
-Version: 1.1.1
+Version: 1.2.0
Release: 1
Requires: yaz
Copyright: Distributable
+++ /dev/null
-Name: zmbol
-Version: 1.1.1
-Release: 1
-Requires: yaz
-Copyright: Commercial
-Group: Applications/Databases
-Vendor: Index Data ApS <info@indexdata.dk>
-Source: zmbol-%{version}.tar.gz
-BuildRoot: /var/tmp/%{name}-%{version}-root
-Packager: Adam Dickmeiss <adam@indexdata.dk>
-URL: http://www.indexdata.dk/zmbol/
-Summary: Z'mbol: a fielded free-text engine with a Z39.50 frontend.
-
-%description
-Zmbol is a fielded free-text indexing and retrieval engine with a Z39.50
-frontend. You can use any compatible, commercial or freeware Z39.50 client to
-access data stored in Zmbol.
-
-%prep
-%setup
-
-%build
-
-CFLAGS="$RPM_OPT_FLAGS" \
- ./configure --prefix=/usr --with-yazconfig=/usr/bin
-make CFLAGS="$RPM_OPT_FLAGS"
-
-%install
-rm -fr $RPM_BUILD_ROOT
-make prefix=$RPM_BUILD_ROOT/usr install
-cd doc; make prefix=$RPM_BUILD_ROOT/usr install
-
-%files
-%defattr(-,root,root)
-%doc README LICENSE.zmbol CHANGELOG
-%config /usr/share/zmbol/tab
-/usr/bin/zmbolsrv
-/usr/bin/zmbolidx
-/usr/share/zmbol/doc