-/* $Id: reclists.c,v 1.10 2007-04-16 13:57:25 marc Exp $
+/* $Id: reclists.c,v 1.12 2007-04-17 12:15:32 marc Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
}
// Insert a record. Return record cluster (newly formed or pre-existing)
-struct record_cluster *reclist_insert( struct conf_service *service,
- struct reclist *l,
+struct record_cluster *reclist_insert( struct reclist *l,
+ struct conf_service *service,
struct record *record,
char *merge_key, int *total)
{
struct record_cluster *cluster = 0;
assert(service);
- assert(service->num_metadata);
- assert(service->num_sortkeys);
+ assert(l);
+ assert(record);
+ assert(merge_key);
+ assert(total);
bucket = hash((unsigned char*) merge_key) & l->hashmask;
+
for (p = &l->hashtable[bucket]; *p; p = &(*p)->next)
{
// We found a matching record. Merge them