Hi Anand, Thanks for the quick response, but I'm afraid you mixed up my two questions :)
My first question was in general: how should I use save_many? My second question was: how should we handle the "bad data" errors? When you say: it is fine to remove authors from editions, I think you mean "when there are authors in the related work"? If there is no work, I think finding the new author is second best to relating the edition to a (possibly new, hopefully matching existing) work and putting the author in the work. But that is something I hope another bot (developer) can do :) How about having WorkBot create a work for every edition that has no work right now? And later see about merging works? There are many duplicate works already, why not create some (i.e. ~5 million) more and try fixing them all when it can be done automatically? Ben On 6 June 2012 14:24, Anand Chitipothu <[email protected]> wrote: >> In the past days of running VacuumBot, I've encountered errors like this: >> Bad Request: {"message": "expected /type/author, found >> /type/redirect", "at": {"property": "authors", "key": >> "/books/OL21880872M"}, "value": "/authors/OL4472901A", "error": >> "bad_data"} > > It means the save_many can't accept /authors/OL4472901A as an author because > it is of type /type/redirect. > > That author is marked as redirect without updating the edition records > referring to it. > > The way to fix it is by find the new author record it is pointing and > substituting with it. > > $ curl http://openlibrary.org/authors/OL4472901A.yml > key: /authors/OL4472901A > location: /authors/OL499507A > type: > key: /type/redirect > ... > > So you can substitute it with /authors/OL499507A. > > Or it is even fine to remove the authors field in the editions. We are not > using the authors filed in editions any more. Only the authors field in works > is used. > > Anand > _______________________________________________ > Ol-tech mailing list > [email protected] > http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech > To unsubscribe from this mailing list, send email to > [email protected] _______________________________________________ Ol-tech mailing list [email protected] http://mail.archive.org/cgi-bin/mailman/listinfo/ol-tech To unsubscribe from this mailing list, send email to [email protected]
