{"id":325,"date":"2009-07-13T15:19:44","date_gmt":"2009-07-13T20:19:44","guid":{"rendered":"http:\/\/dilettantes.code4lib.org\/?p=325"},"modified":"2009-07-13T15:19:44","modified_gmt":"2009-07-13T20:19:44","slug":"going-solr-without-solr","status":"publish","type":"post","link":"https:\/\/rossfsinger.me\/blog\/2009\/07\/going-solr-without-solr\/","title":{"rendered":"Going Solr without Solr"},"content":{"rendered":"<p>For a long time, I was massively confused about what the <a href=\"http:\/\/n2.talis.com\/\" target=\"_blank\">Platform<\/a> was or did.\u00c2\u00a0 Months after I started at Talis I was still fairly unclear of what the Platform actually did.\u00c2\u00a0 I&#8217;ve now got my head around it, use it, and have a pretty good understanding of why and how it&#8217;s useful, but I fully realize that a lot of people (and by <em>people<\/em> I&#8217;m really referring to <em>library people<\/em>) don&#8217;t and don&#8217;t really care to learn.<\/p>\n<p>What they want is <a href=\"http:\/\/lucene.apache.org\/solr\/\" target=\"_blank\">Solr<\/a>.\u00c2\u00a0 Actually, no, what they want is a magical turnkey system that takes their crappy OPAC (or whatever) data and transmogrifies it into a modern, of-the-web type discovery system.\u00c2\u00a0 What is powering that discovery system is mostly irrelevant if it behaves halfway decently and is pretty easy to get up and running for a proof-of-concept.\u00c2\u00a0 These two points, of course, are why Solr is so damned popular; to say that it meets those criteria is a massive understatement.\u00c2\u00a0 The front-end of that Solr index is another story entirely, but Solr itself is a piece of cake.<\/p>\n<p>Almost from the time I started at Talis I have thought that a Solr-clone API for the Platform would make sense.\u00c2\u00a0 Although the Platform doesn&#8217;t have all of the functionality of Solr, it has several of the sexy bits (Lucene syntax and faceting, for example) and if it had some way to respond to an out of the box Solr client, it seemed to me that it would make it a lot easier to turn an off-the-shelf Solr powered application (a la <a href=\"http:\/\/vufind.org\/\" target=\"_blank\">VuFind<\/a> or <a href=\"http:\/\/projectblacklight.org\/\" target=\"_blank\">Blacklight<\/a>) into a Platform powered, RDF\/<a href=\"http:\/\/linkeddata.org\/\" target=\"_blank\">linked data<\/a> application with minimal customization.\u00c2\u00a0 It&#8217;s not Solr and in many ways is quite different than Solr &#8212; but if it can exploit its similarities with Solr enough to leverage the pretty awesome client base that Solr has, it&#8217;ll make it easier to open the door for things the Platform is good at.\u00c2\u00a0 Alternately, if the search capabilities of the Platform become too limited compared to Solr, the data is open &#8212; just index it in Solr.\u00c2\u00a0 Theoretically, if the API is a Solr-clone, you should be able to point your application at either.<\/p>\n<p>The proof-of-concept project I&#8217;m working on right now is basically a re\u00c3\u00abnvisioned <a href=\"http:\/\/journal.code4lib.org\/articles\/24\" target=\"_blank\">Communicat<\/a>:\u00c2\u00a0 a combination discovery interface; personal and group resource collection aggregator; resource-list content management system (for course reserves, say, or subject\/course guides, etc.);\u00c2\u00a0 and &#8220;discovered&#8221; resources (articles, books, etc.) cache and recommendation service.\u00c2\u00a0 None of these would be terribly sophisticated at a first pass, I&#8217;m just trying to get (and show) a clearer understanding of how a Communicat might work.\u00c2\u00a0 As such, I&#8217;m trying to do as little development from the ground up as I can get away with.<\/p>\n<p>I&#8217;ll go into more detail later as it starts to get fleshed out some, but for the discovery and presentation piece, I plan on using <a href=\"http:\/\/projectblacklight.org\/\" target=\"_blank\">Blacklight<\/a>.\u00c2\u00a0 Of the OSS discovery interfaces, it&#8217;s the most versatile for the wide variety of resources I would hope to be in a Communicat-like system.\u00c2\u00a0 It&#8217;s also Ruby, so I feel the most comfortable hacking away at it.\u00c2\u00a0 It also meant I needed the aforementioned Solr-like API for the Platform, so I hastily cobbled together something using <a href=\"http:\/\/pho.rubyforge.org\/rdoc\/index.html\" target=\"_blank\">Pho<\/a> and <a href=\"http:\/\/sinatrarb.com\/\" target=\"_blank\">Sinatra<\/a>.\u00c2\u00a0 I&#8217;m calling it pret-a-porter, and the <a href=\"http:\/\/github.com\/rsinger\/pret-a-porter\/tree\/master\" target=\"_blank\">sources are available on Github<\/a>.<\/p>\n<p><a href=\"http:\/\/anvil.lisforge.net:30301\/bib-demo-2\/select?facet=true&amp;facet.field=language_facet&amp;facet.field=subject_era_facet&amp;facet.field=geographic_subject_facet&amp;facet.field=format_facet&amp;q=england&amp;rows=10&amp;spellcheck.q=england&amp;wt=ruby\" target=\"_blank\">You can see it in action here<\/a>.\u00c2\u00a0 The first part of the path corresponds with whatever Platform store you want to search.\u00c2\u00a0 The only &#8220;Response Writers&#8221; available are Ruby and JSON (I&#8217;ll add an XML response as soon as I can &#8212; I just needed Ruby for Blacklight and JSON came basically for free along with it).\u00c2\u00a0 It&#8217;s incredibly naive and rough at this point, but it&#8217;s a start.\u00c2\u00a0 Most importantly, I have Blacklight working against it.\u00c2\u00a0 Here&#8217;s <a href=\"http:\/\/anvil.lisforge.net:30302\/\" target=\"_blank\">Blacklight running off of a Prism 3 store<\/a>.\u00c2\u00a0 It took a little bit of customization of Blacklight to make this work, but it would still be interchangeable with a Solr index (assuming you were still planning on using the Platform for your data storage).\u00c2\u00a0 When I say a &#8220;little bit&#8221;, I mean very little.\u00c2\u00a0 Both pieces (pret-a-porter and the Blacklight implementation) took less than three days total to get running.<\/p>\n<p>If only the rest of the Communicat could come together that quickly!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For a long time, I was massively confused about what the Platform was or did.\u00c2\u00a0 Months after I started at Talis I was still fairly unclear of what the Platform actually did.\u00c2\u00a0 I&#8217;ve now got my head around it, use it, and have a pretty good understanding of why and how it&#8217;s useful, but I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[67,49,66],"tags":[],"class_list":["post-325","post","type-post","status-publish","format-standard","hentry","category-communicat","category-platform","category-solr"],"_links":{"self":[{"href":"https:\/\/rossfsinger.me\/blog\/wp-json\/wp\/v2\/posts\/325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rossfsinger.me\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rossfsinger.me\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rossfsinger.me\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rossfsinger.me\/blog\/wp-json\/wp\/v2\/comments?post=325"}],"version-history":[{"count":3,"href":"https:\/\/rossfsinger.me\/blog\/wp-json\/wp\/v2\/posts\/325\/revisions"}],"predecessor-version":[{"id":328,"href":"https:\/\/rossfsinger.me\/blog\/wp-json\/wp\/v2\/posts\/325\/revisions\/328"}],"wp:attachment":[{"href":"https:\/\/rossfsinger.me\/blog\/wp-json\/wp\/v2\/media?parent=325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rossfsinger.me\/blog\/wp-json\/wp\/v2\/categories?post=325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rossfsinger.me\/blog\/wp-json\/wp\/v2\/tags?post=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}