Add test of commmnd=record with esn specified
[pazpar2-moved-to-github.git] / src / session.c
index 0817d8e..16f7794 100644 (file)
@@ -653,7 +653,7 @@ static void session_sort_unlocked(struct session *se, struct reclist_sortparms *
     int type  = sp->type;
     int clients_research = 0;
 
-    yaz_log(YLOG_LOG, "session_sort field=%s increasing=%d type=%d", field, increasing, type);
+    yaz_log(YLOG_DEBUG, "session_sort field=%s increasing=%d type=%d", field, increasing, type);
     /* see if we already have sorted for this criteria */
     for (sr = se->sorted_results; sr; sr = sr->next)
     {
@@ -1843,7 +1843,7 @@ static int ingest_to_cluster(struct client *cl,
     cluster = reclist_insert(se->reclist, service, record,
                              mergekey_norm, &se->total_merged);
     if (!cluster)
-        return -1;
+        return 0; // complete match with existing record
 
     {
         const char *use_term_factor_str =