pazpar2  1.14.1
Data Structures | Functions
termlists.c File Reference
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <yaz/yaz-util.h>
#include "termlists.h"
#include "jenkins_hash.h"

Go to the source code of this file.

Data Structures

struct  termlist_bucket
 
struct  termlist
 

Functions

struct termlisttermlist_create (NMEM nmem)
 
void termlist_insert (struct termlist *tl, const char *display_term, const char *norm_term, const char *id, size_t id_len, int freq)
 
static int compare (const void *s1, const void *s2)
 
struct termlist_score ** termlist_highscore (struct termlist *tl, int *len, NMEM nmem)
 

Function Documentation

◆ compare()

static int compare ( const void *  s1,
const void *  s2 
)
static

Definition at line 99 of file termlists.c.

References termlist_score::frequency.

◆ termlist_create()

struct termlist* termlist_create ( NMEM  nmem)

Definition at line 52 of file termlists.c.

References termlist::hash_size, termlist::hashtable, termlist::nmem, and termlist::no_entries.

Referenced by add_facet().

◆ termlist_highscore()

struct termlist_score** termlist_highscore ( struct termlist tl,
int *  len,
NMEM  nmem 
)

Definition at line 109 of file termlists.c.

Referenced by perform_termlist().

◆ termlist_insert()

void termlist_insert ( struct termlist tl,
const char *  display_term,
const char *  norm_term,
const char *  id,
size_t  id_len,
int  freq 
)