Solr/Crap: Difference between revisions
From charlesreid1
(Created page with "Solr is a search engine server that allows for querying via HTTP, JSON, or XML, and returns results in JSON or XML. I'm trying to use it to create a searchable database of text ...") |
|||
| Line 57: | Line 57: | ||
=Running Solr= | =Running Solr= | ||
To run Solr, you have to have a web server running locally. | ==Using Jetty (Defualt)== | ||
To run Solr, you have to have a web server running locally. The example that is distributed with Solar is also distribute with Jetty, a lightweight Java web server. After you've finished running the above commands and have made the Solr example, type: | |||
<pre> | |||
$ java -jar start.jar | |||
</pre> | |||
This will start the Jetty server and get Solr running from within Jetty. Visiting hlocalhost:8983/solr/admin should look something like this: | |||
[[Image:SolrExample1.png|left|thumb|400px]] | |||
Revision as of 02:33, 8 June 2012
Solr is a search engine server that allows for querying via HTTP, JSON, or XML, and returns results in JSON or XML.
I'm trying to use it to create a searchable database of text files.
Installation
Download it and compile it by using Ant (a Java-based make program):
$ wget http://mirror.metrocast.net/apache/lucene/solr/3.6.0/apache-solr-3.6.0-src.tgz
$ tar xzf apache-solr-3.6.0-src.tgz
$ cd apache-solr-3.6.0
$ ant ivy-bootstrap # this installs ivy, an Ant dependency
$ ant compile
It'll take a couple of minutes to finish.
Test
You can test everything by running
$ ant test
Making War
Make a .war file by doing this:
$ cd /path/to/apache-solr-3.6.0/solr $ ant dist
Again, this will take a while.
Making Example
Make the Ant example by typing
$ cd /path/to/apache-solr-3.6.0/solr $ ant example
Running Solr
Using Jetty (Defualt)
To run Solr, you have to have a web server running locally. The example that is distributed with Solar is also distribute with Jetty, a lightweight Java web server. After you've finished running the above commands and have made the Solr example, type:
$ java -jar start.jar
This will start the Jetty server and get Solr running from within Jetty. Visiting hlocalhost:8983/solr/admin should look something like this: