From acafc85244b61fdc7dc1aaa8bd98bb26f559dc07 Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Wed, 17 Jan 2007 14:01:19 +0000 Subject: [PATCH] Added support for date-value termlists --- src/pazpar2.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/pazpar2.c b/src/pazpar2.c index 2c05b8c..affac3f 100644 --- a/src/pazpar2.c +++ b/src/pazpar2.c @@ -1,4 +1,4 @@ -/* $Id: pazpar2.c,v 1.39 2007-01-16 23:42:10 quinn Exp $ */ +/* $Id: pazpar2.c,v 1.40 2007-01-17 14:01:19 quinn Exp $ */ #include #include @@ -667,7 +667,16 @@ static struct record *ingest_record(struct client *cl, Z_External *rec) if (md->rank) relevance_countwords(se->relevance, cluster, value, md->rank); if (md->termlist) - add_facet(se, type, value); + { + if (md->type == Metadata_type_year) + { + char year[64]; + sprintf(year, "%d", last); + add_facet(se, type, year); + } + else + add_facet(se, type, value); + } xmlFree(type); xmlFree(value); type = value = 0; -- 1.7.10.4