+Implemented "position"-flag for register type (as defined in
+default.idx). When set to zero no position (or seqence number) is
+saved in register for each word occurrence, thus saving some register
+space.
+
Implemented database mapping. Using mapdb one can specify a database
to be mapped to one or more physical databases. Usage:
mapdb <fromdb> <todb> ..
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zebramap.h,v $
- * Revision 1.7 1999-02-02 14:50:46 adam
+ * Revision 1.8 1999-02-12 13:29:21 adam
+ * Implemented position-flag for registers.
+ *
+ * Revision 1.7 1999/02/02 14:50:46 adam
* Updated WIN32 code specific sections. Changed header.
*
* Revision 1.6 1998/06/23 15:33:33 adam
int zebra_maps_is_complete (ZebraMaps zms, unsigned reg_id);
int zebra_maps_is_sort (ZebraMaps zms, unsigned reg_id);
+int zebra_maps_is_positioned (ZebraMaps zms, unsigned reg_id);
#ifdef __cplusplus
}
#endif
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: extract.c,v $
- * Revision 1.90 1999-02-02 14:50:52 adam
+ * Revision 1.91 1999-02-12 13:29:22 adam
+ * Implemented position-flag for registers.
+ *
+ * Revision 1.90 1999/02/02 14:50:52 adam
* Updated WIN32 code specific sections. Changed header.
*
* Revision 1.89 1998/10/28 10:54:38 adam
struct encode_info {
int sysno;
int seqno;
+ int cmd;
char buf[768];
};
{
i->sysno = 0;
i->seqno = 0;
+ i->cmd = -1;
}
char *encode_key_int (int d, char *bp)
i->sysno = key.sysno;
i->seqno = 0;
}
+ else if (!i->seqno && !key.seqno && i->cmd == *k)
+ return;
bp = encode_key_int (key.seqno - i->seqno, bp);
i->seqno = key.seqno;
+ i->cmd = *k;
if (fwrite (i->buf, bp - i->buf, 1, outf) != 1)
{
logf (LOG_FATAL|LOG_ERRNO, "fwrite");
dst += sizeof(*pseqno);
}
reckeys.buf_used = dst - reckeys.buf;
- (*pseqno)++;
+ if (*pseqno)
+ (*pseqno)++;
}
static void addSortString (RecWord *p, const char *string, int length)
extractCtrl.addSchema = addSchema;
extractCtrl.dh = rGroup->dh;
for (i = 0; i<256; i++)
- extractCtrl.seqno[i] = 0;
+ {
+ if (zebra_maps_is_positioned(rGroup->zebra_maps, i))
+ extractCtrl.seqno[i] = 1;
+ else
+ extractCtrl.seqno[i] = 0;
+ }
extractCtrl.zebra_maps = rGroup->zebra_maps;
extractCtrl.flagShowRecords = !rGroup->flagRw;
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: invstat.c,v $
- * Revision 1.8 1999-02-02 14:50:53 adam
+ * Revision 1.9 1999-02-12 13:29:23 adam
+ * Implemented position-flag for registers.
+ *
+ * Revision 1.8 1999/02/02 14:50:53 adam
* Updated WIN32 code specific sections. Changed header.
*
* Revision 1.7 1998/03/13 15:30:50 adam
assert (*info == sizeof(ISAM_P));
memcpy (&isam_p, info+1, sizeof(ISAM_P));
+ printf ("---\n");
if (stat_info->isam)
{
ISPT ispt;
{
ISAMC_PP pp;
int occurx = 0;
- char buf[128];
+ struct it_key key;
pp = isc_pp_open (stat_info->isamc, isam_p);
occur = isc_pp_num (pp);
- while (isc_pp_read(pp, buf))
+ while (isc_pp_read(pp, &key))
+ {
+ printf ("sysno=%d seqno=%d\n", key.sysno, key.seqno);
occurx++;
+ }
assert (occurx == occur);
stat_info->no_isam_entries[isc_type(isam_p)] += occur;
isc_pp_close (pp);
# Zebra indexes as referred to from the *.abs-files.
-# $Id: default.idx,v 1.5 1998-09-22 10:03:47 adam Exp $
+# $Id: default.idx,v 1.6 1999-02-12 13:29:24 adam Exp $
#
# Traditional word index
index w
completeness 0
+position 0
charmap string.chr
# Phrase index
/*
- * Copyright (C) 1994-1998, Index Data
+ * Copyright (C) 1994-1999, Index Data
* All rights reserved.
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: zebramap.c,v $
- * Revision 1.11 1998-10-13 20:09:19 adam
+ * Revision 1.12 1999-02-12 13:29:25 adam
+ * Implemented position-flag for registers.
+ *
+ * Revision 1.11 1998/10/13 20:09:19 adam
* Changed call to readconf_line.
*
* Revision 1.10 1998/06/23 15:33:37 adam
struct zebra_map {
unsigned reg_id;
int completeness;
+ int positioned;
int type;
union {
struct {
(*zm)->maptab = NULL;
(*zm)->type = ZEBRA_MAP_TYPE_INDEX;
(*zm)->completeness = 0;
+ (*zm)->positioned = 1;
}
else if (!yaz_matchstr (argv[0], "sort") && argc == 2)
{
(*zm)->u.sort.entry_size = 80;
(*zm)->maptab = NULL;
(*zm)->completeness = 0;
+ (*zm)->positioned = 0;
}
else if (zm && !yaz_matchstr (argv[0], "charmap") && argc == 2)
{
{
(*zm)->completeness = atoi (argv[1]);
}
+ else if (zm && !yaz_matchstr (argv[0], "position") && argc == 2)
+ {
+ (*zm)->positioned = atoi (argv[1]);
+ }
else if (zm && !yaz_matchstr (argv[0], "entrysize") && argc == 2)
{
if ((*zm)->type == ZEBRA_MAP_TYPE_SORT)
return 0;
}
+int zebra_maps_is_positioned (ZebraMaps zms, unsigned reg_id)
+{
+ struct zebra_map *zm = zebra_map_get (zms, reg_id);
+ if (zm)
+ return zm->positioned;
+ return 0;
+}
+
int zebra_maps_is_sort (ZebraMaps zms, unsigned reg_id)
{
struct zebra_map *zm = zebra_map_get (zms, reg_id);