{"id":47,"date":"2014-03-26T22:56:49","date_gmt":"2014-03-27T02:56:49","guid":{"rendered":"https:\/\/juliehardesty.com\/notions\/?p=47"},"modified":"2014-03-26T22:56:49","modified_gmt":"2014-03-27T02:56:49","slug":"banging-my-head-against-the-sun","status":"publish","type":"post","link":"https:\/\/juliehardesty.com\/notions\/banging-my-head-against-the-sun\/","title":{"rendered":"Banging My Head Against the Sun"},"content":{"rendered":"<p>It sounds painful and it kind of was, but progress has been made in the quest to open our digital repository data and that progress involves Solr. To wit, there are a few things I have learned recently:<\/p>\n<ol>\n<li>I can actually figure out a lot more with Solr than I thought<\/li>\n<li>Trying to implement a Solr plugin when you are somewhat challenged to make Solr run and index records in the first place is a clear indication of one&#8217;s willfulness<\/li>\n<li>The following movies are really good for taking breaks: Fierce Creatures, The American, the new Muppets movie, and Monuments Men (breaks are important and George Clooney seems to help too!)<\/li>\n<\/ol>\n<p>The latest chapter of my story begins in Bloomington and ends in Amsterdam, with a few trips around the sun in between. Let&#8217;s begin by talking about Solr because <a title=\"Technicalities of Exposing Digital Repository Data\" href=\"https:\/\/juliehardesty.com\/notions\/technicalities-of-exposing-digital-repository-data\/\">we all know what happened when I contemplated opening up the data directly from Fedora<\/a>.<\/p>\n<p>If you want to grab a version of Solr and give it a whirl, nothing is easier than hitting the <a href=\"https:\/\/lucene.apache.org\/solr\/downloads.html\">Solr download page<\/a>, unzipping\/un-tarring the latest version, and running the magic &#8220;java -jar start.jar&#8221; command in the magic &#8220;core&#8221; directory. On a Mac or Linux box, of course (who knows what happens on Windows). You can even index some sample records with a different java command and the admin interface gives you search results and it just works.\u00a0 Magic!\u00a0 Everything&#8217;s great. Then, you want to do something more. Like try this Solr install with a giant index of actual data and then see if you can add a plugin for OAI feeds. What could go wrong?<\/p>\n<p><strong>Problem:<\/strong> Giant index of data is for a different Solr version than the one you installed<br \/>\n<strong>Problem:<\/strong> OAI plugin requires a different Solr version (3.4.0) than the one you installed (4.7.0) and the one where you got the giant index of data (1.4.1)<br \/>\n<strong>Problem:<\/strong> Even if you could get that giant index of data working on a Solr version that would also work for the OAI plugin, you can&#8217;t figure out where to put the OAI plugin&#8217;s binary (.jar file) because the magic install you used works with Jetty, a self-contained Java server, that mixes everything up between the Java code and the Solr code<\/p>\n<p>We next embark on installing Solr to run on <a href=\"http:\/\/tomcat.apache.org\/\">Tomcat<\/a>, because that&#8217;s how I give up on things.<\/p>\n<p><div id=\"attachment_54\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-54\" class=\"size-medium wp-image-54 \" title=\"Good story so far, no?\" alt=\"Good story so far, no?\" src=\"https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/3740618718_cc9261630c_b-300x195.jpg\" width=\"300\" height=\"195\" srcset=\"https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/3740618718_cc9261630c_b-300x195.jpg 300w, https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/3740618718_cc9261630c_b-461x300.jpg 461w, https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/3740618718_cc9261630c_b.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><p id=\"caption-attachment-54\" class=\"wp-caption-text\"><a href=\"http:\/\/www.flickr.com\/photos\/greghristov\/3740618718\/ \">&#8220;Brand New Tomcats [CLR]&#8221;<\/a> by Grigor Hristov<\/p><\/div>I had a giant index of data from Solr 1.4.1 and the oai4solr plugin needed Solr 3.4.0 at least, so 3.4.0 is what I chose and I backed off from using the giant index of data. Instead, I found the pieces we use to index certain types of MODS records from our Fedora digital repository into Solr 1.4.1 and, after copying the important pieces from the Solr 1.4.1 config (I hope), I&#8217;ve managed to recreate what could be our Solr index from Fedora using 3.4.0 &#8211; with 4 records of data.<\/p>\n<p>Essentially, for those who like pictures, I was dealing with one version of Solr that had an index, like a piece of bread with a pat of butter on it.<\/p>\n<div id=\"attachment_49\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-49\" class=\"size-medium wp-image-49   \" title=\"Pictures of food always help a blog post, I say.\" alt=\"Pictures of food always help a blog post, I say.\" src=\"https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/4801782899_edeeb49db6_b-300x199.jpg\" width=\"300\" height=\"199\" srcset=\"https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/4801782899_edeeb49db6_b-300x199.jpg 300w, https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/4801782899_edeeb49db6_b-451x300.jpg 451w, https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/4801782899_edeeb49db6_b.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><p id=\"caption-attachment-49\" class=\"wp-caption-text\"><a href=\"http:\/\/www.flickr.com\/photos\/67502676@N00\/1175006348\/\">&#8220;Bread &amp; Butter&#8221;<\/a> by Mark H. Anbinder<\/p><\/div>\n<p>Then I had another version of Solr that also had an index, like a broom and a dustpan.<\/p>\n<div id=\"attachment_50\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-50\" class=\"size-medium wp-image-50   \" title=\"How did that kitten get there?\" alt=\"How did that kitten get there?\" src=\"https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/4833929849_457ec2845e_b-300x202.jpg\" width=\"300\" height=\"202\" srcset=\"https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/4833929849_457ec2845e_b-300x202.jpg 300w, https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/4833929849_457ec2845e_b-443x300.jpg 443w, https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/4833929849_457ec2845e_b.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><p id=\"caption-attachment-50\" class=\"wp-caption-text\"><a href=\"http:\/\/www.flickr.com\/photos\/shyroii\/4833929849\/\">&#8220;sikth y su amado recogedor&#8221;<\/a> by Iris Shyroii<\/p><\/div>\n<p>What I was initially trying to do was butter my broom, or apply an index from one version of Solr to a different version of Solr. This is not a thing, apparently.<\/p>\n<div id=\"attachment_48\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-48\" class=\"size-medium wp-image-48   \" title=\"OK, a broom made out of butter is apparently a thing, but buttering your broom is not, trust me.\" alt=\"OK, a broom made out of butter is apparently a thing, but buttering your broom is not, trust me.\" src=\"https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/1175006348_2bab334351_b-300x200.jpg\" width=\"300\" height=\"200\" srcset=\"https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/1175006348_2bab334351_b-300x200.jpg 300w, https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/1175006348_2bab334351_b-449x300.jpg 449w, https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/1175006348_2bab334351_b.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><p id=\"caption-attachment-48\" class=\"wp-caption-text\"><a href=\"http:\/\/www.flickr.com\/photos\/sararah\/1175006348\/\">&#8220;Butter broom and Monster Book of Monsters&#8221;<\/a> by Sarah Cady<\/p><\/div>\n<p>Once Solr was installed on Tomcat, all .jar files had a single place to go and I knew where to put the oai4solr.jar file. But OAI feeds don&#8217;t just happen, they are a specialized metadata format surrounding records in more commonly recognizable metadata formats (Dublin Core, for example) and can be called up using a specific URL with specific parameters.\u00a0 So stuff has to be programmed (.jar file) but stuff also has to be configured, and I wasn&#8217;t configuring anything well in the code that accompanied the .jar file.<\/p>\n<p>Spending your Sunday afternoon with Java error messages on your localhost server sucks. In the end, clearer minds prevailed (Cliffster) and I was convinced that it was reasonable to email the guy who wrote the oai4solr plugin and put it on Github in the first place. In Amsterdam. On a Sunday night.<\/p>\n<p>He answered. From Amsterdam. On a Sunday night. <a href=\"https:\/\/github.com\/lwo\">Lucien van Wouw<\/a> from the <a href=\"http:\/\/socialhistory.org\/\">International Institute of Social History<\/a>, the author of <a href=\"https:\/\/github.com\/IISH\/oai4solr\">oai4solr<\/a>, helped me fix up my plugin configuration and I had a working oai4solr plugin on Monday morning. I now have OAI feeds from my Solr index returning sets and record lists in DC and MODS. (I&#8217;m not exactly sure how to say his last name, but I&#8217;m going with Wow! &#8211; including exclamation point &#8211; because that was awesome.)<\/p>\n<div id=\"attachment_62\" style=\"width: 310px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-62\" class=\"size-medium wp-image-62 \" title=\"Thanks, Lucien!\" alt=\"Thanks, Lucien!\" src=\"https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/3787407006_ec10879a51_b-300x240.jpg\" width=\"300\" height=\"240\" srcset=\"https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/3787407006_ec10879a51_b-300x240.jpg 300w, https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/3787407006_ec10879a51_b-374x300.jpg 374w, https:\/\/juliehardesty.com\/notions\/wp-content\/uploads\/2014\/03\/3787407006_ec10879a51_b.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><p id=\"caption-attachment-62\" class=\"wp-caption-text\"><a href=\"http:\/\/www.flickr.com\/photos\/bluebike\/3787407006\/\">&#8220;WoW!&#8221;<\/a> by Laurie Chipps<\/p><\/div>\n<p>So now I have a different Solr version with a super-small number of records, possibly configured the same as the original Solr index, definitely with a couple new things that need to be included when indexing Fedora records into Solr, and absolutely with other collections in Fedora that still need to receive this mapping treatment so they can have descriptive information and be included in our Solr index. But most importantly, there is a way forward to open our data with OAI feeds. I banged my head against the Sun and kinda made something happen!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It sounds painful and it kind of was, but progress has been made in the quest to open our digital repository data and that progress involves Solr. To wit, there are a few things I have learned recently: I can &hellip; <a href=\"https:\/\/juliehardesty.com\/notions\/banging-my-head-against-the-sun\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,7],"tags":[],"class_list":["post-47","post","type-post","status-publish","format-standard","hentry","category-metadata","category-solr"],"_links":{"self":[{"href":"https:\/\/juliehardesty.com\/notions\/wp-json\/wp\/v2\/posts\/47","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/juliehardesty.com\/notions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/juliehardesty.com\/notions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/juliehardesty.com\/notions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/juliehardesty.com\/notions\/wp-json\/wp\/v2\/comments?post=47"}],"version-history":[{"count":10,"href":"https:\/\/juliehardesty.com\/notions\/wp-json\/wp\/v2\/posts\/47\/revisions"}],"predecessor-version":[{"id":63,"href":"https:\/\/juliehardesty.com\/notions\/wp-json\/wp\/v2\/posts\/47\/revisions\/63"}],"wp:attachment":[{"href":"https:\/\/juliehardesty.com\/notions\/wp-json\/wp\/v2\/media?parent=47"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/juliehardesty.com\/notions\/wp-json\/wp\/v2\/categories?post=47"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/juliehardesty.com\/notions\/wp-json\/wp\/v2\/tags?post=47"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}