<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>LiquidFoot &#187; sirsi</title>
	<atom:link href="http://www.liquidfoot.com/tag/sirsi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.liquidfoot.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 02 Jan 2012 22:56:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Vufind and Sirsi</title>
		<link>http://www.liquidfoot.com/2008/09/05/vufind-and-sirsi/</link>
		<comments>http://www.liquidfoot.com/2008/09/05/vufind-and-sirsi/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 21:08:25 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[sirsi]]></category>
		<category><![CDATA[solrmarc]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[vufind]]></category>
		<guid isPermaLink="false">http://www.liquidfoot.com/?p=58</guid>
		<description><![CDATA[I committed a bunch of small fixes into the Solrmarc and Vufind projects today to deal with the release of Solr 1.3 RC 2. We&#8217;re using the multicore functionality of Solr for Vufind and we were having some issues with the resource loaders for the different cores. The fix was pretty minor, just creating a [...]]]></description>
			<content:encoded><![CDATA[<p>I committed a bunch of small fixes into the <a href="http://code.google.com/p/solrmarc">Solrmarc</a> and <a href="http://www.vufind.org">Vufind</a> projects today to deal with the release of Solr 1.3 RC 2. We&#8217;re using the multicore functionality of Solr for Vufind and we were having some issues with the resource loaders for the different cores. The fix was pretty minor, just creating a <a href="http://lucene.apache.org/solr/api/org/apache/solr/core/CoreContainer.html">CoreContainer</a> and set the SolrCore from that:</p>
<p><code>
<pre class="brush: java; title: ; notranslate">CoreContainer cc = new CoreContainer(solrCoreDir, configFile);
solrCore = cc.getCore(solrCorename);
</pre>
<p></code></p>
<p>Ok, so that was more of an update, but it got me to reindex the our marc content. Our 001 fields don&#8217;t always have info, so our Systems Librarian told me just to use the 035a for the id field. There was only one problem&#8230;they had a &#8220;(Sirsi)&#8221; as a prefix to the actual number. This wouldn&#8217;t be that big of an issue, but it was causing the queries sent to Solr to be off, and I wasn&#8217;t getting any results for a detail view.</p>
<p>Fortunately, Solrmarc already has a facility to deal with this: PatternMaps! To pull out just the number, I changed the id definition in the vufind.properties file to</p>
<p><code>
<pre class="brush: java; title: ; notranslate">
id = 035a, (pattern_map.id), first
</pre>
<p></code></p>
<p>This basically maps the id field in the schema.xml file to the 035a, using a patternMap named pattern_map.id, and only takes the first of the 035a if there are multiples. I know, there shouldn&#8217;t be, but I&#8217;ve seen funky things <img src='http://www.liquidfoot.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now, to add the PatternMap definition:</p>
<p><code>
<pre class="brush: java; title: ; notranslate">pattern_map.id.pattern_0 = \\(Sirsi\\)\\ (.*)=&gt;$1</pre>
<p></code></p>
<p>It&#8217;s just a simple regex pattern definition that takes out the &#8220;(Sirsi)&#8221; and the space between it and the actual id we&#8217;re using.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2008/09/05/vufind-and-sirsi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

