pazpar2  1.13.0
Data Structures | Functions
reclists.c File Reference
#include <assert.h>
#include <yaz/yaz-util.h>
#include "ppmutex.h"
#include "session.h"
#include "reclists.h"
#include "jenkins_hash.h"

Go to the source code of this file.

Data Structures

struct  reclist
 
struct  reclist_bucket
 

Functions

static void append_merge_keys (struct record_metadata_attr **p, const struct record_metadata_attr *a, NMEM nmem)
 
struct reclist_sortparmsreclist_parse_sortparms (NMEM nmem, const char *parms, struct conf_service *service)
 
static int reclist_cmp (const void *p1, const void *p2)
 
void reclist_limit (struct reclist *l, struct session *se, int lazy)
 
void reclist_sort (struct reclist *l, struct reclist_sortparms *parms)
 
struct record_clusterreclist_read_record (struct reclist *l)
 
void reclist_enter (struct reclist *l)
 
void reclist_leave (struct reclist *l)
 
void reclist_rewind (struct reclist *l)
 
struct reclistreclist_create (NMEM nmem)
 
void reclist_destroy (struct reclist *l)
 
int reclist_get_num_records (struct reclist *l)
 
static void merge_cluster (struct reclist *l, struct relevance *r, struct record_cluster *dst, struct record_cluster *src)
 
static struct record_clusternew_cluster (struct reclist *l, struct relevance *r, struct conf_service *service, struct record *record, struct record_metadata_attr *merge_keys)
 
struct record_clusterreclist_insert (struct reclist *l, struct relevance *r, struct conf_service *service, struct record *record, struct record_metadata_attr *merge_keys, int *total)
 
int reclist_sortparms_cmp (struct reclist_sortparms *sort1, struct reclist_sortparms *sort2)
 

Function Documentation

static void append_merge_keys ( struct record_metadata_attr **  p,
const struct record_metadata_attr a,
NMEM  nmem 
)
static
static void merge_cluster ( struct reclist l,
struct relevance r,
struct record_cluster dst,
struct record_cluster src 
)
static
static struct record_cluster* new_cluster ( struct reclist l,
struct relevance r,
struct conf_service service,
struct record record,
struct record_metadata_attr merge_keys 
)
static
static int reclist_cmp ( const void *  p1,
const void *  p2 
)
static
struct reclist* reclist_create ( NMEM  nmem)
void reclist_destroy ( struct reclist l)
void reclist_enter ( struct reclist l)
int reclist_get_num_records ( struct reclist l)

Definition at line 400 of file reclists.c.

References reclist::num_records.

Referenced by client_got_records(), cmd_show(), and show_range_start().

struct record_cluster* reclist_insert ( struct reclist l,
struct relevance r,
struct conf_service service,
struct record record,
struct record_metadata_attr merge_keys,
int *  total 
)
void reclist_leave ( struct reclist l)
void reclist_limit ( struct reclist l,
struct session se,
int  lazy 
)
struct reclist_sortparms* reclist_parse_sortparms ( NMEM  nmem,
const char *  parms,
struct conf_service service 
)
struct record_cluster* reclist_read_record ( struct reclist l)
void reclist_rewind ( struct reclist l)

Definition at line 356 of file reclists.c.

References reclist::sorted_list, and reclist::sorted_ptr.

Referenced by relevance_prepare_read().

void reclist_sort ( struct reclist l,
struct reclist_sortparms parms 
)
int reclist_sortparms_cmp ( struct reclist_sortparms sort1,
struct reclist_sortparms sort2 
)

Definition at line 564 of file reclists.c.

References reclist_sortparms::increasing, reclist_sortparms::name, and reclist_sortparms::type.

Referenced by session_sort().