-/* $Id: extract.c,v 1.175 2005-03-16 15:26:37 adam Exp $
+/* $Id: extract.c,v 1.176 2005-03-17 08:31:28 adam Exp $
Copyright (C) 1995-2005
Index Data ApS
}
return 0;
}
- if (zh->reg->keys.buf_used == 0)
- {
- /* the extraction process returned no information - the record
- is probably empty - unless flagShowRecords is in use */
- if (!zh->m_flag_rw)
- return 1;
-
- if (zh->records_processed < zh->m_file_verbose_limit)
- yaz_log (YLOG_WARN, "empty %s %s " PRINTF_OFF_T, zh->m_record_type,
- fname, recordOffset);
- return 1;
- }
if (extractCtrl.match_criteria[0])
matchStr = extractCtrl.match_criteria;
}
}
}
}
+ if (! *sysno && zh->reg->keys.buf_used == 0)
+ {
+ /* the extraction process returned no information - the record
+ is probably empty - unless flagShowRecords is in use */
+ if (!zh->m_flag_rw)
+ return 1;
+
+ if (zh->records_processed < zh->m_file_verbose_limit)
+ yaz_log (YLOG_WARN, "empty %s %s " PRINTF_OFF_T, zh->m_record_type,
+ fname, recordOffset);
+ return 1;
+ }
if (! *sysno)
{
yaz_log (YLOG_WARN, "extract error: no such filter");
return 0;
}
- if (zh->reg->keys.buf_used == 0)
- {
- /* the extraction process returned no information - the record
- is probably empty - unless flagShowRecords is in use */
- if (test_mode)
- return 1;
- yaz_log (YLOG_WARN, "No keys generated for record");
- yaz_log (YLOG_WARN, " The file is probably empty");
- return 1;
- }
/* match criteria */
matchStr = NULL;
}
}
}
+ if (! *sysno && zh->reg->keys.buf_used == 0)
+ {
+ /* new record and it's empty .. we will skip it */
+ /* the extraction process returned no information - the record
+ is probably empty - unless flagShowRecords is in use */
+ if (test_mode)
+ return 1;
+ yaz_log (YLOG_WARN, "No keys generated for record.");
+ return 1;
+ }
if (! *sysno)
{