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:52:20 +0000 (13:52 +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 70b3879..4ac92f0 100644 (file)
@@ -1086,7 +1086,6 @@ struct record *ingest_record(struct client *cl, const char *rec,
              wheretoput = &record->metadata[md_field_id];
              while (*wheretoput)
                  wheretoput = &(*wheretoput)->next;
-             rec_md->next = 0;
              *wheretoput = rec_md;
 
              // merged metadata
@@ -1096,6 +1095,12 @@ struct record *ingest_record(struct client *cl, const char *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;