X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=index%2Fextract.c;h=1ec0f80c5c68b222baa92ec04f3a362d14619926;hb=d609724b63e4c82cf94a02bf7a8b40a33254a250;hp=37c0df1518d9d68190abe73b8d3bc88bc3b915a5;hpb=3921e1ac4b8cbf5c9a36ed230912f51e11f4a267;p=idzebra-moved-to-github.git diff --git a/index/extract.c b/index/extract.c index 37c0df1..1ec0f80 100644 --- a/index/extract.c +++ b/index/extract.c @@ -1,4 +1,4 @@ -/* $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 @@ -491,18 +491,6 @@ static int file_extract_record(ZebraHandle zh, } 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; } @@ -534,6 +522,18 @@ static int file_extract_record(ZebraHandle zh, } } } + 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) { @@ -915,16 +915,6 @@ int buffer_extract_record (ZebraHandle zh, 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; @@ -955,6 +945,16 @@ int buffer_extract_record (ZebraHandle zh, } } } + 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) {