<?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>Rusty Razor Blade &#187; lucene</title>
	<atom:link href="http://www.rustyrazorblade.com/category/lucene/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rustyrazorblade.com</link>
	<description>Tech Thoughts, Mostly on LAMP - by Jon Haddad</description>
	<lastBuildDate>Fri, 03 Feb 2012 20:03:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to Install the Lucene Search Engine using Solr</title>
		<link>http://www.rustyrazorblade.com/2008/03/how-to-install-the-lucene-search-engine-using-solr/</link>
		<comments>http://www.rustyrazorblade.com/2008/03/how-to-install-the-lucene-search-engine-using-solr/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 17:01:26 +0000</pubDate>
		<dc:creator>jon</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[lucene]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[solr]]></category>

		<guid isPermaLink="false">http://www.rustyrazorblade.com/2008/03/15/how-to-install-the-lucene-search-engine-using-solr/</guid>
		<description><![CDATA[<p>I&#8217;m going to go through the steps necessary to install and start using <a href="http://lucene.apache.org/solr/">Solr</a>. I&#8217;ve always been interested in trying out Lucene, but I never felt like dealing with writing my own wrapper around the classes. Solr simplifies this by creating a fully working search engine as a web service.</p> <p>Let&#8217;s get started. You&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to go through the steps necessary to install and start using <a href="http://lucene.apache.org/solr/">Solr</a>.  I&#8217;ve always been interested in trying out Lucene, but I never felt like dealing with writing my own wrapper around the classes.  Solr simplifies this by creating a fully working search engine as a web service.</p>
<p>Let&#8217;s get started.  You&#8217;ll need to check to see if Java is up to date.  Run the below to find out.</p>
<blockquote><p>java -version </p></blockquote>
<p>You need to be running at least Java 1.5.  Next is to check to see if Ant is installed.  Do that with.</p>
<blockquote><p>ant -version</p></blockquote>
<p>I&#8217;m doing this on my Mac using Leopard.  <a href="http://dita-ot.sourceforge.net/doc/DITA-setupant.html">Here&#8217;s some instructions on setting up Ant</a> if you aren&#8217;t using Leopard.</p>
<p>Java was up to date, and ant is built in.  Sweet.  However, I need to install JUnit.  I&#8217;ll do that first.</p>
<p><a href="http://www.junit.org/">Download JUnit.</a>  You&#8217;ll need to put it somewhere that&#8217;s accessible by the $CLASSPATH variable.  There&#8217;s more information on the <a href="http://junit.sourceforge.net/doc/faq/faq.htm#started_2">JUnit FAQ</a>.</p>
<p>I threw it in /usr/share and left the name as junit-4.4.jar and set my CLASSPATH to point to that file (not the directory)</p>
<blockquote><p>export CLASSPATH=$CLASSPATH:/usr/share/junit-4.4.jar</p></blockquote>
<p>I ran that, as well as put it in my /etc/bashrc file (which you must be root to edit) so I don&#8217;t have to deal with it again.</p>
<p><strong>Compile Solr</strong></p>
<p>Switch back to the directory containing the solr files, and run:</p>
<blockquote><p>ant compile</p></blockquote>
<p>You should see something like this:</p>
<blockquote><p>Buildfile: build.xml</p>
<p>init-forrest-entities:</p>
<p>checkJunitPresence:</p>
<p>compile:<br />
    [javac] Compiling 185 source files to /Users/jhaddad/src/apache-solr-1.2.0/build<br />
    [javac] Note: Some input files use or override a deprecated API.<br />
    [javac] Note: Recompile with -Xlint:deprecation for details.<br />
    [javac] Note: Some input files use unchecked or unsafe operations.<br />
    [javac] Note: Recompile with -Xlint:unchecked for details.</p>
<p>BUILD SUCCESSFUL<br />
Total time: 3 seconds</p></blockquote>
<p>I then ran: </p>
<blockquote><p>ant dist</p></blockquote>
<p>Which outputted something like this:</p>
<blockquote><p>Buildfile: build.xml</p>
<p>init-forrest-entities:</p>
<p>checkJunitPresence:</p>
<p>compile:</p>
<p>make-manifest:<br />
    [mkdir] Created dir: /Users/jhaddad/src/apache-solr-1.2.0/build/META-INF</p>
<p>dist-jar:<br />
      [jar] Building jar: /Users/jhaddad/src/apache-solr-1.2.0/dist/apache-solr-1.2.1-dev.jar</p>
<p>dist-war:<br />
      [war] Building war: /Users/jhaddad/src/apache-solr-1.2.0/dist/apache-solr-1.2.1-dev.war</p>
<p>dist:</p>
<p>BUILD SUCCESSFUL<br />
Total time: 0 seconds</p></blockquote>
<p>You can run the example by going to the example directory and running </p>
<blockquote><p>java -jar start.jar</p></blockquote>
<p>Then go here: <a href="http://localhost:8983/solr/admin/">http://localhost:8983/solr/admin/</a> and check out your admin.</p>
<p>Load a few sample docs by going here:</p>
<blockquote><p>/example/exampledocs </p></blockquote>
<p>and running </p>
<blockquote><p>java -jar post.jar solr.xml monitor.xml </p></blockquote>
<p>I will post a follow up on how to get Solr running in Tomcat, as well as examples on how to use the server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rustyrazorblade.com/2008/03/how-to-install-the-lucene-search-engine-using-solr/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

