You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by bu...@apache.org on 2012/03/05 13:07:18 UTC

svn commit: r807401 - in /websites/staging/lucene/trunk/content: ./ solr/tutorial.html

Author: buildbot
Date: Mon Mar  5 12:07:17 2012
New Revision: 807401

Log:
Staging update by buildbot for lucene

Modified:
    websites/staging/lucene/trunk/content/   (props changed)
    websites/staging/lucene/trunk/content/solr/tutorial.html

Propchange: websites/staging/lucene/trunk/content/
------------------------------------------------------------------------------
    cms:source-revision = 1297020

Modified: websites/staging/lucene/trunk/content/solr/tutorial.html
==============================================================================
--- websites/staging/lucene/trunk/content/solr/tutorial.html (original)
+++ websites/staging/lucene/trunk/content/solr/tutorial.html Mon Mar  5 12:07:17 2012
@@ -228,32 +228,35 @@
 
       <div><div class="tutorial">
 
-<h1 id="solr_tutorial">Solr Tutorial</h1>
-<h2 id="overview">Overview</h2>
-<p>This document covers the basics of running Solr using an example
-schema, and some sample data.</p>
-<h2 id="requirements">Requirements</h2>
-<p>To follow along with this tutorial, you will need...</p>
-<ul>
-<li>
-<p>Java 1.6 or greater.  Some places you can get it are from
+# Solr Tutorial
+
+##Overview
+
+This document covers the basics of running Solr using an example
+schema, and some sample data.
+
+##Requirements
+
+To follow along with this tutorial, you will need...
+
+- Java 1.6 or greater.  Some places you can get it are from
 <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">Oracle</a>,
 <a href="http://openjdk.java.net/">Open JDK</a>,
 <a href="http://www.ibm.com/developerworks/java/jdk/">IBM</a>, or
 <br/>
 Running <code class="inline">java -version</code> at the command line should indicate a version
-number starting with 1.6.  Gnu's GCJ is not supported and does not work with Solr.</p>
-</li>
-<li>
-<p>A <a href="http://www.apache.org/dyn/closer.cgi/lucene/solr/">Solr release</a>.</p>
-</li>
-</ul>
-<h2 id="getting_started">Getting Started</h2>
-<p><em>
+number starting with 1.6.  Gnu's GCJ is not supported and does not work with Solr.
+
+- A <a href="http://www.apache.org/dyn/closer.cgi/lucene/solr/">Solr release</a>.
+
+##Getting Started
+*
 Please run the browser showing this tutorial and the Solr server on the same machine so tutorial links will correctly point to your Solr server.
-</em></p>
-<p>Begin by unziping the Solr release and changing your working directory
-to be the "<code  class="inline">example</code>" directory.  (Note that the base directory name may vary with the version of Solr downloaded.)  For example, with a shell in UNIX, Cygwin, or MacOS:</p>
+*
+
+Begin by unziping the Solr release and changing your working directory
+to be the "<code  class="inline">example</code>" directory.  (Note that the base directory name may vary with the version of Solr downloaded.)  For example, with a shell in UNIX, Cygwin, or MacOS:
+
 <div class="cmd">
     user:~solr$ ls
     solr-nightly.zip
@@ -261,26 +264,25 @@ to be the "<code  class="inline">example
     user:~solr$ cd solr-nightly/example/
 </div>
 
-<p>Solr can run in any Java Servlet Container of your choice, but to simplify
-this tutorial, the example index includes a small installation of Jetty.</p>
-<p>To launch Jetty with the Solr WAR, and the example configs, just run the <code  class="inline">start.jar</code> ...</p>
+Solr can run in any Java Servlet Container of your choice, but to simplify
+this tutorial, the example index includes a small installation of Jetty.
+
+To launch Jetty with the Solr WAR, and the example configs, just run the <code  class="inline">start.jar</code> ...
+
 <div class="cmd">
     user:~/solr/example$ java -jar start.jar
     2009-10-23 16:42:53.816::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog
     2009-10-23 16:42:53.907::INFO:  jetty-6.1.26
 
-...
-
-<div class="codehilite"><pre><span class="n">Oct</span> <span class="mi">23</span><span class="p">,</span> <span class="mi">2009</span> <span class="mi">4</span><span class="p">:</span><span class="mi">41</span><span class="p">:</span><span class="mi">56</span> <span class="n">PM</span> <span class="n">org</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">solr</span><span class="o">.</span><span class="n">core</span><span class="o">.</span><span class="n">SolrCore</span> <span class="n">registerSearcher</span>
-<span class="n">INFO:</span> <span class="o">[]</span> <span class="n">Registered</span> <span class="k">new</span> <span class="n">searcher</span> <span class="n">Searcher</span><span class="nv">@7c3885</span> <span class="n">main</span>
-</pre></div>
-
+    ...
 
+    Oct 23, 2009 4:41:56 PM org.apache.solr.core.SolrCore registerSearcher
+    INFO: [] Registered new searcher Searcher@7c3885 main
 </div>
 
 <p>This will start up the Jetty application server on port 8983, and use your terminal to display the logging information from Solr.</p>
 <p>You can see that the Solr is running by loading <a href="http://localhost:8983/solr/admin/">http://localhost:8983/solr/admin/</a> in your web browser.  This is the main starting point for Administering Solr.</p>
-<h2 id="indexing_data">Indexing Data</h2>
+<h2 id="indexing-data">Indexing Data</h2>
 <p>Your Solr server is up and running, but it doesn't contain any data.  You can
 modify a Solr index by POSTing XML Documents containing instructions to add (or
 update) documents, delete documents, commit pending adds and deletes, and
@@ -358,7 +360,7 @@ including those exported by Excel or MyS
 programatically create documents to send to Solr.</p>
 </li>
 </ul>
-<h2 id="updating_data">Updating Data</h2>
+<h2 id="updating-data">Updating Data</h2>
 <p>You may have noticed that even though the file <code  class="inline">solr.xml</code> has now
 been POSTed to the server twice, you still only get 1 result when searching for
 "solr".  This is because the example schema.xml specifies a "uniqueKey" field
@@ -379,7 +381,7 @@ increase,because the new documents will 
 <p>Go ahead and edit the existing XML files to change some of the data, and re-run
 the <code  class="inline">java -jar post.jar</code> command, you'll see your changes reflected
 in subsequent searches.</p>
-<h2 id="deleting_data">Deleting Data</h2>
+<h2 id="deleting-data">Deleting Data</h2>
 <p>You can delete data by POSTing a delete command to the update URL and specifying the value
   of the document's unique key field, or a query that matches multiple documents (be careful with that one!).  Since these commands
   are smaller, we will specify them right on the command line rather than reference an XML file.</p>
@@ -402,7 +404,7 @@ statistics page and observe the changes 
 Here is an example of using delete-by-query to delete anything with
   <a href="http://localhost:8983/solr/select?q=name:DDR&amp;fl=name">DDR</a> in the name:</p>
 <div class="cmd">
-java -Ddata=args -jar post.jar "&lt;delete&gt;&lt;query&lt;name:DDR&lt;/query&gt;&lt;/delete&gt;"
+java -Ddata=args -jar post.jar "&lt;delete&gt;&lt;query&gt;name:DDR&lt;/query&gt;&lt;/delete&gt;"
 </div>
 
 <p>Commit can be an expensive operation so it's best to make many changes to an index in a batch and
@@ -414,7 +416,7 @@ java -Ddata=args -jar post.jar "&lt;dele
 java -jar post.jar *.xml
 </div>
 
-<h2 id="querying_data">Querying Data</h2>
+<h2 id="querying-data">Querying Data</h2>
 <p>Searches are done via HTTP GET on the select URL with the query string in the q parameter.
 You can pass a number of optional <a href="http://wiki.apache.org/solr/StandardRequestHandler">request parameters</a>
 to the request handler to control what information is returned.  For example, you can use the "fl" parameter
@@ -462,7 +464,7 @@ tags.</p>
 <a href="http://wiki.apache.org/solr/HighlightingParameters">here</a>.</p>
 <!-- highlighting -->
 
-<h2 id="faceted_search">Faceted Search</h2>
+<h2 id="faceted-search">Faceted Search</h2>
 <p>Faceted search takes the documents matched by a query and generates counts for various
 properties or categories.  Links are usually provided that allows users to "drill down" or
 refine their search results based on the returned categories.</p>
@@ -473,7 +475,7 @@ requests counts by the category field <c
 the facet counts generated are for the complete set of documents that match the query.</p>
 <p>We can facet multiple ways at the same time.  The following example adds a facet on the
 boolean <code class="inline">inStock</code> field:</p>
-<p><a href="http://localhost:8983/solr/select/?wt=json&amp;indent=on&amp;q=klzzwxh:0094:klzzwxh:0095&amp;fl=name&amp;facet=true&amp;facet.field=cat&amp;facet.field=inStock">...&amp;q=*:*&amp;facet=true&amp;facet.field=cat&amp;facet.field=inStock</a></p>
+<p><a href="http://localhost:8983/solr/select/?wt=json&amp;indent=on&amp;q=\*:\*&amp;fl=name&amp;facet=true&amp;facet.field=cat&amp;facet.field=inStock">...&amp;q=*:*&amp;facet=true&amp;facet.field=cat&amp;facet.field=inStock</a></p>
 <p>Solr can also generate counts for arbitrary queries. The following example
 queries for <code class="inline">ipod</code> and shows prices below and above 100 by using
 range queries on the price field.</p>
@@ -487,7 +489,7 @@ and
 pages.</p>
 <!-- faceted search -->
 
-<h2 id="search_ui">Search UI</h2>
+<h2 id="search-ui">Search UI</h2>
 <p>Solr includes an example search interface built with velocity templating
 that demonstrates many features, including searching, faceting, highlighting,
 autocomplete, and geospatial searching. </p>
@@ -495,7 +497,7 @@ autocomplete, and geospatial searching. 
 <a href="http://localhost:8983/solr/browse">http://localhost:8983/solr/browse</a></p>
 <!-- Search UI -->
 
-<h2 id="text_analysis">Text Analysis</h2>
+<h2 id="text-analysis">Text Analysis</h2>
 <p>Text fields are typically indexed by breaking the field into words and applying various transformations such as
 lowercasing, removing plurals, or stemming to increase relevancy.  The same text transformations are normally
 applied to any queries in order to match what is indexed.</p>
@@ -526,7 +528,7 @@ the fields in the index and what type of
 may be accessed via the <code class="inline">[SCHEMA]</code> link on the <a href="http://localhost:8983/solr/admin/">admin</a> page.</p>
 <p>A full description of the analysis components, Analyzers, Tokenizers, and TokenFilters
 available for use is <a href="http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters">here</a>.</p>
-<h2 id="analysis_debugging">Analysis Debugging</h2>
+<h2 id="analysis-debugging">Analysis Debugging</h2>
 <p>There is a handy <a href="http://localhost:8983/solr/admin/analysis.jsp">analysis</a>
   debugging page where you can see how a text value is broken down into words,
   and shows the resulting tokens after they pass through each filter in the chain.</p>
@@ -549,7 +551,7 @@ documents, and made changes to the index
 analysis, and the Solr admin interface.  You're ready to start using Solr on
 your own project!  Continue on with the following steps:</p>
 <ul>
-<li>Subscribe to the Solr <a href="mailing_lists.html">mailing lists</a>!</li>
+<li>Subscribe to the Solr <a href="discussion.html">mailing lists</a>!</li>
 <li>Make a copy of the Solr example directory as a template for your project.</li>
 <li>Customize the schema and other config in solr/conf/ to meet your needs. </li>
 </ul>
@@ -593,14 +595,14 @@ more details about Solr's many
 <ul>
 <li><a href="../whoweare.html">Who We are</a></li>
 </ul>
-<h1 id="asf_links">ASF links</h1>
+<h1 id="asf-links">ASF links</h1>
 <ul>
 <li><a href="http://www.apache.org">Apache Software Foundation</a></li>
 <li><a href="http://www.apache.org/licenses/LICENSE-2.0">License</a></li>
 <li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
 <li><a href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a></li>
 </ul>
-<h1 id="related_projects">Related Projects</h1>
+<h1 id="related-projects">Related Projects</h1>
 <ul>
 <li><a href="http://hadoop.apache.org">Apache Hadoop</a></li>
 <li><a href="http://incubator.apache.org/connectors/">Apache ManifoldCF</a></li>