client_update_show_stat(rec->client, 1);
}
}
- if (*num > 0)
- recs =
- nmem_malloc(se->nmem, *num * sizeof(struct record_cluster *));
+ recs = nmem_malloc(se->nmem, (*num > 0 ? *num : 1) * sizeof(*recs));
for (i = 0; i < *num; i++)
{
struct record_cluster *r = reclist_read_record(se->reclist);
return -1;
}
session_enter(se, "ingest_record");
- if (client_get_session(cl) == se)
+ if (client_get_session(cl) == se && se->relevance)
ret = ingest_to_cluster(cl, xdoc, root, record_no, mergekey_norm);
session_leave(se, "ingest_record");