- if (rfd->counted_items == 0 ||
- (rset->keycontrol->cmp)(buf, rfd->counted_buf) > rset->scope)
+ int got_scope;
+ if (rfd->counted_items == 0)
+ got_scope = rset->scope+1;
+ else
+ got_scope = rset->keycontrol->cmp(buf, rfd->counted_buf);
+
+#if 0
+ key_logdump_txt(YLOG_LOG, buf, "rset_default_read");
+ yaz_log(YLOG_LOG, "rset_scope=%d got_scope=%d", rset->scope, got_scope);
+#endif
+ if (got_scope > rset->scope)