Don't stop indexing on parsing errors
Change-Id: I81e188c9aeb9d7ba89d818e2551b38306f2c5278
diff --git a/Changes b/Changes
index a0e073c..8886337 100755
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+0.2.2 2024-11-14
+ - Don't stop on CSV parsing errors
+
0.2.1 2024-05-02
- Update dependencies
- Add CITATION.cff
diff --git a/service.go b/service.go
index 3d2ecdc..d0d9769 100644
--- a/service.go
+++ b/service.go
@@ -99,7 +99,8 @@
break
}
if err != nil {
- log.Fatal(err)
+ log.Println(err)
+ continue;
}
if err := txn.Set([]byte(record[0]), []byte(record[1]+","+record[2])); err == badger.ErrTxnTooBig {
diff --git a/testdata/sz_mapping_example1.csv b/testdata/sz_mapping_example1.csv
index b64ca3a..67b3622 100644
--- a/testdata/sz_mapping_example1.csv
+++ b/testdata/sz_mapping_example1.csv
@@ -1,3 +1,4 @@
"U92/JAN/00001","Süddeutsche Zeitung","https://archiv.szarchiv.de/Portal/restricted/Start.act?articleId=A800000"
"U92/JAN/00002","Süddeutsche Zeitung","https://archiv.szarchiv.de/Portal/restricted/Start.act?articleId=A800001"
"U92/JAN/00003","Süddeutsche Zeitung","https://archiv.szarchiv.de/Portal/restricted/Start.act?articleId=A800010"
+"WPD11/A16/05067","Wikipedia","http://de.wikipedia.org/wiki/Arbeitsgemeinschaft_industrieller_Forschungsvereinigungen_\"Otto_von_Guericke\""