Including earliest pubdate in facet when more than one is found.
authorSebastian Hammer <quinn@indexdata.com>
Wed, 17 Jan 2007 15:32:39 +0000 (15:32 +0000)
committerSebastian Hammer <quinn@indexdata.com>
Wed, 17 Jan 2007 15:32:39 +0000 (15:32 +0000)
src/pazpar2.c

index affac3f..184bd71 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: pazpar2.c,v 1.40 2007-01-17 14:01:19 quinn Exp $ */
+/* $Id: pazpar2.c,v 1.41 2007-01-17 15:32:39 quinn Exp $ */
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -673,6 +673,11 @@ static struct record *ingest_record(struct client *cl, Z_External *rec)
                     char year[64];
                     sprintf(year, "%d", last);
                     add_facet(se, type, year);
+                    if (first != last)
+                    {
+                        sprintf(year, "%d", first);
+                        add_facet(se, type, year);
+                    }
                 }
                 else
                     add_facet(se, type, value);