2 * Copyright (C) 1994-2000, Index Data
4 * Sebastian Hammer, Adam Dickmeiss
7 * Revision 1.10 2001-10-15 19:53:43 adam
8 * POSIX thread updates. First work on term sets.
10 * Revision 1.9 2000/12/05 10:01:44 adam
11 * Fixed bug regarding user-defined attribute sets.
13 * Revision 1.8 2000/04/05 09:49:35 adam
14 * On Unix, zebra/z'mbol uses automake.
16 * Revision 1.7 1999/07/06 12:28:04 adam
17 * Updated record index structure. Format includes version ID. Compression
18 * algorithm ID is stored for each record block.
20 * Revision 1.6 1999/05/26 07:49:13 adam
23 * Revision 1.5 1999/02/02 14:51:05 adam
24 * Updated WIN32 code specific sections. Changed header.
26 * Revision 1.4 1998/03/05 08:45:12 adam
27 * New result set model and modular ranking system. Moved towards
28 * descent server API. System information stored as "SGML" records.
30 * Revision 1.3 1995/12/11 11:45:55 adam
31 * Removed commented code.
33 * Revision 1.2 1995/12/11 09:12:51 adam
34 * The rec_get function returns NULL if record doesn't exist - will
35 * happen in the server if the result set records have been deleted since
36 * the creation of the set (i.e. the search).
37 * The server saves a result temporarily if it is 'volatile', i.e. the
38 * set is register dependent.
40 * Revision 1.1 1995/12/06 12:41:25 adam
41 * New command 'stat' for the index program.
42 * Filenames can be read from stdin by specifying '-'.
43 * Bug fix/enhancement of the transformation from terms to regular
44 * expressons in the search engine.
54 #define REC_BLOCK_TYPES 2
55 #define REC_HEAD_MAGIC "recindex"
60 int compression_method;
65 char *data_fname[REC_BLOCK_TYPES];
66 BFile data_BFile[REC_BLOCK_TYPES];
71 struct record_cache_entry *record_cache;
81 int block_size[REC_BLOCK_TYPES];
82 int block_free[REC_BLOCK_TYPES];
83 int block_last[REC_BLOCK_TYPES];
84 int block_used[REC_BLOCK_TYPES];
85 int block_move[REC_BLOCK_TYPES];
95 enum recordCacheFlag { recordFlagNop, recordFlagWrite, recordFlagNew,
98 struct record_cache_entry {
100 enum recordCacheFlag flag;
103 struct record_index_entry {
104 int next; /* first block of record info / next free entry */
105 int size; /* size of record or 0 if free entry */