const char *id = session_lookup_id_facet(cl->session,
cl, name,
values[i]);
- if (id) {
- values[i] = nmem_strdup(nmem_tmp, id);
- yaz_log(YLOG_DEBUG,
- "apply_limit: s='%s' found id '%s'",s->name,id );
-
+ if (id)
+ {
+ if ( *id )
+ {
+ values[i] = nmem_strdup(nmem_tmp, id);
+ yaz_log(YLOG_DEBUG,
+ "apply_limit: s='%s' found id '%s'",s->name,id );
+ }
+ else
+ {
+ yaz_log(YLOG_DEBUG,
+ "apply_limit: %s: term '%s' not found, failing client",
+ s->name, values[i] );
+ ret = -1;
+ }
}
}
nmem_strsplit_escape2(nmem_tmp, ",", s->value, &cvalues,