From: Eric L. M. <em...@nd...> - 2012-01-11 13:57:22
|
On Jan 11, 2012, at 8:42 AM, Demian Katz wrote: > The approach of attempting to update the index after the fact doesn’t work the way one might expect it to. Since Solr has the concept of “indexed, non-stored” fields, this means that some of the data used to build the Solr index is not subsequently retrievable. Thus, when you pull all the fields, add data, and write them back to the index, you are actually losing important data. (VuFind used to have an “edit record” feature in the admin module based on this principle, but I removed it because it was dangerous and misleading). Despite the difficulty of updating Solr records, I had significant success yesterday in this regard. Given a key, I was able to search the index, retrieve all the stored fields, rebuild a record, update the fulltext field with content, and stuff the whole thing back into Solr. From what I saw, the only problem with my solution was my inability to stuff the MARC record into the fullrecord field. (I think one of Webservice::Solr's dependencies choked on the weirdness of MARC.) You can see my code at the following, temporary, location -- http://bit.ly/yEaswh Still, today I am investigating the use of Aperture. -- Eric Lease Morgan |