fix broken error handling in knn classification write
@@ -53,10 +53,9 @@ func (c *Classifier) classifyItemUsingKNN(item search.Result, itemIndex int, kin
}
c.extendItemWithObjectMeta(&item, params, classified)
- // TODO: send back over channel for batched storage
err = c.store(item)
if err != nil {
- fmt.Printf("store %s/%s: %v", item.ClassName, item.ID, err)
+ return fmt.Errorf("store %s/%s: %v", item.ClassName, item.ID, err)
}
return nil
