New hard settings. Functions to handle settings value on services, not targets.
[pazpar2-moved-to-github.git] / src / session.c
index 76b43fe..207f47c 100644 (file)
@@ -1587,6 +1587,7 @@ int ingest_record(struct client *cl, const char *rec,
     return ret;
 }
 
+// Skip record on non-zero
 static int check_limit_local(struct client *cl,
                              struct record *record,
                              int record_no)
@@ -1605,9 +1606,7 @@ static int check_limit_local(struct client *cl,
         char **values = 0;
         int i, num_v = 0;
         
-        const char *name =
-            client_get_facet_limit_local(cl, sdb, &l, nmem_tmp, &num_v,
-                                         &values);
+        const char *name = client_get_facet_limit_local(cl, sdb, &l, nmem_tmp, &num_v, &values);
         if (!name)
             break;
         
@@ -1634,10 +1633,10 @@ static int check_limit_local(struct client *cl,
                 }
                 else
                 {
-                    yaz_log(YLOG_LOG, "cmp: '%s' '%s'",
-                            rec_md->data.text.disp, values[i]);
+                    yaz_log(YLOG_LOG, "cmp: '%s' '%s'", rec_md->data.text.disp, values[i]);
                     if (!strcmp(rec_md->data.text.disp, values[i]))
                     {
+                        // Value equals, should not be filtered.
                         break;
                     }
                 }
@@ -1649,6 +1648,7 @@ static int check_limit_local(struct client *cl,
                 i++;
             }
         }
+        // At end , not match
         if (i == num_v)
         {
             skip_record = 1;