int termlist,
int rank,
int sortkey_offset,
- enum conf_metadata_mergekey mt)
+ enum conf_metadata_mergekey mt,
+ const char *icu_chain)
{
assert(nmem && metadata && name);
metadata->rank = rank;
metadata->sortkey_offset = sortkey_offset;
metadata->mergekey = mt;
+ metadata->icu_chain = nmem_strdup_null(nmem, icu_chain);
}
int termlist,
int rank,
int sortkey_offset,
- enum conf_metadata_mergekey mt)
+ enum conf_metadata_mergekey mt,
+ const char *icu_chain)
{
struct conf_metadata * md = 0;
md = service->metadata + field_id;
conf_metadata_assign(service->nmem, md, name, type, merge, setting,
brief, termlist, rank, sortkey_offset,
- mt);
+ mt, icu_chain);
return md;
}
xmlChar *xml_rank = 0;
xmlChar *xml_setting = 0;
xmlChar *xml_mergekey = 0;
+ xmlChar *xml_icu_chain = 0;
struct _xmlAttr *attr;
for (attr = n->properties; attr; attr = attr->next)
{
else if (!xmlStrcmp(attr->name, BAD_CAST "mergekey") &&
attr->children && attr->children->type == XML_TEXT_NODE)
xml_mergekey = attr->children->content;
+ else if (!xmlStrcmp(attr->name, BAD_CAST "icu_chain") &&
+ attr->children && attr->children->type == XML_TEXT_NODE)
+ xml_icu_chain = attr->children->content;
else
{
yaz_log(YLOG_FATAL, "Unknown metadata attribute '%s'", attr->name);
(const char *) xml_name,
type, merge, setting,
brief, termlist, rank, sortkey_offset,
- mergekey_type);
+ mergekey_type, (const char *) xml_icu_chain);
(*md_node)++;
return 0;
}
const char *facet_component;
WRBUF facet_wrbuf = wrbuf_alloc();
WRBUF display_wrbuf = wrbuf_alloc();
+ int i;
+ const char *icu_chain_id = 0;
+
+ for (i = 0; i < service->num_metadata; i++)
+ if (!strcmp((service->metadata + i)->name, type))
+ icu_chain_id = (service->metadata + i)->icu_chain;
+ yaz_log(YLOG_LOG, "icu_chain id=%s", icu_chain_id ? icu_chain_id : "null");
+
prt = pp2_relevance_tokenize(service->facet_pct);
pp2_relevance_first(prt, value, 0);