IDZEBRA
2.2.7
|
#include <yaz/options.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <yaz/log.h>
#include <yaz/nmem.h>
#include <yaz/xmalloc.h>
#include <yaz/marcdisp.h>
#include <yaz/timing.h>
#include <it_key.h>
#include <idzebra/isamb.h>
#include <idzebra/dict.h>
#include <assert.h>
Go to the source code of this file.
Data Structures | |
struct | index_block |
struct | index_term |
Functions | |
struct index_block * | index_block_new (int memory) |
void | index_block_destroy (struct index_block **bp) |
static int | cmp_ar (const void *p1, const void *p2) |
int | code_read (void *vp, char **dst, int *insertMode) |
void | index_block_flush (struct index_block *b, ISAMB isb, Dict dict, int no_docs) |
void | index_block_check_flush (struct index_block *b, ISAMB isb, Dict dict, int no_docs) |
void | index_block_add (struct index_block *b, const char *term, zint docid, zint seqno) |
void | index_term (struct index_block *b, const char *term, zint docid, zint *seqno) |
void | index_wrbuf (struct index_block *b, WRBUF wrbuf, zint docid, int subfield_char) |
void | index_marc_line_records (ISAMB isb, Dict dict, zint *docid_seq, FILE *inf, int memory) |
void | index_marc_from_file (ISAMB isb, Dict dict, zint *docid_seq, FILE *inf, int memory, int verbose, int print_offset) |
void | exit_usage (void) |
int | main (int argc, char **argv) |
|
static |
Definition at line 76 of file benchindex1.c.
References index_term::docid, index_term::seqno, and index_term::term.
Referenced by index_block_flush().
int code_read | ( | void * | vp, |
char ** | dst, | ||
int * | insertMode | ||
) |
Definition at line 96 of file benchindex1.c.
References index_block::ar, index_block::current_entry, index_term::docid, it_key::len, it_key::mem, index_block::no_entries, index_term::seqno, index_term::word_id, and ZINT_FORMAT.
Referenced by index_block_flush().
void exit_usage | ( | void | ) |
Definition at line 498 of file benchindex1.c.
Referenced by main().
void index_block_add | ( | struct index_block * | b, |
const char * | term, | ||
zint | docid, | ||
zint | seqno | ||
) |
Definition at line 266 of file benchindex1.c.
References index_term::docid, index_term::next, index_block::nmem, index_block::no_entries, index_term::seqno, index_term::term, and index_block::terms.
Referenced by index_term().
void index_block_check_flush | ( | struct index_block * | b, |
ISAMB | isb, | ||
Dict | dict, | ||
int | no_docs | ||
) |
Definition at line 255 of file benchindex1.c.
References index_block::current_max, dict, index_block_flush(), and index_block::nmem.
Referenced by index_marc_from_file(), and index_marc_line_records().
void index_block_destroy | ( | struct index_block ** | bp | ) |
Definition at line 66 of file benchindex1.c.
Referenced by index_marc_from_file(), and index_marc_line_records().
void index_block_flush | ( | struct index_block * | b, |
ISAMB | isb, | ||
Dict | dict, | ||
int | no_docs | ||
) |
Definition at line 125 of file benchindex1.c.
References index_block::ar, ISAMC_I_s::clientData, cmp_ar(), code_read(), index_block::current_entry, dict, dict_get_no_split(), dict_insert(), dict_lookup(), index_term::docid, isamb_get_int_splits(), isamb_get_leaf_splits(), isamb_merge(), index_term::next, index_block::nmem, index_block::no_entries, ISAMC_I_s::read_item, index_block::round, index_term::seqno, index_term::term, index_block::terms, index_term::word_id, ZINT_FORMAT, and ZINT_FORMAT0.
Referenced by index_block_check_flush(), index_marc_from_file(), and index_marc_line_records().
struct index_block* index_block_new | ( | int | memory | ) |
Definition at line 55 of file benchindex1.c.
References index_block::current_max, index_block::nmem, index_block::no_entries, index_block::round, and index_block::terms.
Referenced by index_marc_from_file(), and index_marc_line_records().
void index_marc_from_file | ( | ISAMB | isb, |
Dict | dict, | ||
zint * | docid_seq, | ||
FILE * | inf, | ||
int | memory, | ||
int | verbose, | ||
int | print_offset | ||
) |
Definition at line 421 of file benchindex1.c.
References dict, index_block_check_flush(), index_block_destroy(), index_block_flush(), index_block_new(), index_wrbuf(), and inf.
Referenced by main().
Definition at line 359 of file benchindex1.c.
References dict, index_block_check_flush(), index_block_destroy(), index_block_flush(), index_block_new(), index_wrbuf(), and inf.
Referenced by main().
void index_term | ( | struct index_block * | b, |
const char * | term, | ||
zint | docid, | ||
zint * | seqno | ||
) |
Definition at line 278 of file benchindex1.c.
References index_term::docid, index_block_add(), index_term::seqno, index_term::term, and ZINT_FORMAT.
Referenced by index_wrbuf().
void index_wrbuf | ( | struct index_block * | b, |
WRBUF | wrbuf, | ||
zint | docid, | ||
int | subfield_char | ||
) |
Definition at line 289 of file benchindex1.c.
References index_term::docid, index_term(), index_term::seqno, and index_term::term.
Referenced by index_marc_from_file(), and index_marc_line_records().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 504 of file benchindex1.c.
References bf_reset(), bfs_create(), bfs_destroy(), ISAMC_M_s::codec, ISAMC_M_s::compare_item, ISAMC_M_s::debug, ISAM_CODEC::decode, dict, dict_close(), dict_insert(), dict_lookup(), dict_open(), ISAM_CODEC::encode, exit_usage(), index_marc_from_file(), index_marc_line_records(), inf, isamb_close(), isamb_open(), isamb_set_cache_size(), isamb_set_int_count(), iscz1_decode(), iscz1_encode(), iscz1_reset(), iscz1_start(), iscz1_stop(), key_compare(), key_logdump_txt(), ISAMC_M_s::log_item, ISAM_CODEC::reset, ISAM_CODEC::start, ISAM_CODEC::stop, and ZINT_FORMAT.