Fixed bug 2021: non-merged , brief meta data not included.
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 13 Oct 2008 11:45:52 +0000 (13:45 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 13 Oct 2008 11:45:52 +0000 (13:45 +0200)
Fixed bug 2021/2272. For non-merged meta data is also included in
cluster when merge is set to 'no'.

src/logic.c

index 8b15df5..92a0ecf 100644 (file)
@@ -1228,7 +1228,6 @@ struct record *ingest_record(struct client *cl, Z_External *rec,
              wheretoput = &record->metadata[md_field_id];
              while (*wheretoput)
                  wheretoput = &(*wheretoput)->next;
-             rec_md->next = 0;
              *wheretoput = rec_md;
 
              // merged metadata
@@ -1238,6 +1237,12 @@ struct record *ingest_record(struct client *cl, Z_External *rec,
 
              // and polulate with data:
              // assign cluster or record based on merge action
+             if (ser_md->merge == Metadata_merge_no)
+             {
+                 while (*wheretoput)
+                     wheretoput = &(*wheretoput)->next;
+                 *wheretoput = rec_md;
+             }
              if (ser_md->merge == Metadata_merge_unique)
              {
                  struct record_metadata *mnode;