IDZEBRA 2.2.11
benchindex1.c File Reference
#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 <idzebra/version.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)

Function Documentation

◆ cmp_ar()

int cmp_ar ( const void * p1,
const void * p2 )
static

Definition at line 77 of file benchindex1.c.

References index_term::docid, index_term::seqno, and index_term::term.

Referenced by index_block_flush().

◆ code_read()

◆ exit_usage()

void exit_usage ( void )

Definition at line 499 of file benchindex1.c.

Referenced by main().

◆ index_block_add()

void index_block_add ( struct index_block * b,
const char * term,
zint docid,
zint seqno )

◆ index_block_check_flush()

void index_block_check_flush ( struct index_block * b,
ISAMB isb,
Dict dict,
int no_docs )

◆ index_block_destroy()

void index_block_destroy ( struct index_block ** bp)

Definition at line 67 of file benchindex1.c.

Referenced by index_marc_from_file(), and index_marc_line_records().

◆ index_block_flush()

◆ index_block_new()

struct index_block * index_block_new ( int memory)

◆ index_marc_from_file()

void index_marc_from_file ( ISAMB isb,
Dict dict,
zint * docid_seq,
FILE * inf,
int memory,
int verbose,
int print_offset )

◆ index_marc_line_records()

void index_marc_line_records ( ISAMB isb,
Dict dict,
zint * docid_seq,
FILE * inf,
int memory )

◆ index_term()

void index_term ( struct index_block * b,
const char * term,
zint docid,
zint * seqno )

Definition at line 279 of file benchindex1.c.

References index_term::docid, index_block_add(), index_term::seqno, index_term::term, and ZINT_FORMAT.

Referenced by index_wrbuf().

◆ index_wrbuf()

void index_wrbuf ( struct index_block * b,
WRBUF wrbuf,
zint docid,
int subfield_char )

◆ main()