/* This file is part of Pazpar2.
- Copyright (C) 2006-2013 Index Data
+ Copyright (C) Index Data
Pazpar2 is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
}
void termlist_insert(struct termlist *tl, const char *display_term,
- const char *norm_term, int freq)
+ const char *norm_term, const char *id, size_t id_len,
+ int freq)
{
unsigned int bucket;
struct termlist_bucket **p;
new->term.norm_term = nmem_strdup(tl->nmem, buf);
new->term.display_term = *display_term ?
nmem_strdup(tl->nmem, display_term) : new->term.norm_term;
+ new->term.id = id ? nmem_strdupn(tl->nmem, id, id_len) : 0;
new->term.frequency = freq;
new->next = 0;
*p = new;