You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2012/09/14 21:24:23 UTC

svn commit: r1384896 - in /lucene/dev/branches/branch_4x: ./ dev-tools/ lucene/ lucene/analysis/ lucene/analysis/icu/src/java/org/apache/lucene/collation/ lucene/backwards/ lucene/benchmark/ lucene/codecs/ lucene/core/ lucene/demo/ lucene/facet/ lucene...

Author: hossman
Date: Fri Sep 14 19:24:21 2012
New Revision: 1384896

URL: http://svn.apache.org/viewvc?rev=1384896&view=rev
Log:
SOLR-3288: minor updates to the tutorial (mostly typo fixes) and improvements to the various README files in the example -- mostly related to SolrHome dir vs SolrCore instance dir (merge r1384895)

Added:
    lucene/dev/branches/branch_4x/solr/example/solr/collection1/README.txt
      - copied unchanged from r1384895, lucene/dev/trunk/solr/example/solr/collection1/README.txt
Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/dev-tools/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/BUILD.txt   (props changed)
    lucene/dev/branches/branch_4x/lucene/CHANGES.txt   (props changed)
    lucene/dev/branches/branch_4x/lucene/JRE_VERSION_MIGRATION.txt   (props changed)
    lucene/dev/branches/branch_4x/lucene/LICENSE.txt   (props changed)
    lucene/dev/branches/branch_4x/lucene/MIGRATE.txt   (props changed)
    lucene/dev/branches/branch_4x/lucene/NOTICE.txt   (props changed)
    lucene/dev/branches/branch_4x/lucene/README.txt   (props changed)
    lucene/dev/branches/branch_4x/lucene/analysis/   (props changed)
    lucene/dev/branches/branch_4x/lucene/analysis/icu/src/java/org/apache/lucene/collation/ICUCollationKeyFilterFactory.java   (props changed)
    lucene/dev/branches/branch_4x/lucene/backwards/   (props changed)
    lucene/dev/branches/branch_4x/lucene/benchmark/   (props changed)
    lucene/dev/branches/branch_4x/lucene/build.xml   (props changed)
    lucene/dev/branches/branch_4x/lucene/codecs/   (props changed)
    lucene/dev/branches/branch_4x/lucene/common-build.xml   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/demo/   (props changed)
    lucene/dev/branches/branch_4x/lucene/facet/   (props changed)
    lucene/dev/branches/branch_4x/lucene/grouping/   (props changed)
    lucene/dev/branches/branch_4x/lucene/highlighter/   (props changed)
    lucene/dev/branches/branch_4x/lucene/ivy-settings.xml   (props changed)
    lucene/dev/branches/branch_4x/lucene/join/   (props changed)
    lucene/dev/branches/branch_4x/lucene/licenses/   (props changed)
    lucene/dev/branches/branch_4x/lucene/memory/   (props changed)
    lucene/dev/branches/branch_4x/lucene/misc/   (props changed)
    lucene/dev/branches/branch_4x/lucene/module-build.xml   (props changed)
    lucene/dev/branches/branch_4x/lucene/queries/   (props changed)
    lucene/dev/branches/branch_4x/lucene/queryparser/   (props changed)
    lucene/dev/branches/branch_4x/lucene/sandbox/   (props changed)
    lucene/dev/branches/branch_4x/lucene/site/   (props changed)
    lucene/dev/branches/branch_4x/lucene/spatial/   (props changed)
    lucene/dev/branches/branch_4x/lucene/suggest/   (props changed)
    lucene/dev/branches/branch_4x/lucene/test-framework/   (props changed)
    lucene/dev/branches/branch_4x/lucene/tools/   (props changed)
    lucene/dev/branches/branch_4x/solr/   (props changed)
    lucene/dev/branches/branch_4x/solr/CHANGES.txt   (props changed)
    lucene/dev/branches/branch_4x/solr/LICENSE.txt   (props changed)
    lucene/dev/branches/branch_4x/solr/NOTICE.txt   (props changed)
    lucene/dev/branches/branch_4x/solr/README.txt   (props changed)
    lucene/dev/branches/branch_4x/solr/build.xml   (props changed)
    lucene/dev/branches/branch_4x/solr/cloud-dev/   (props changed)
    lucene/dev/branches/branch_4x/solr/common-build.xml   (props changed)
    lucene/dev/branches/branch_4x/solr/contrib/   (props changed)
    lucene/dev/branches/branch_4x/solr/core/   (props changed)
    lucene/dev/branches/branch_4x/solr/core/src/java/doc-files/tutorial.html
    lucene/dev/branches/branch_4x/solr/dev-tools/   (props changed)
    lucene/dev/branches/branch_4x/solr/example/   (props changed)
    lucene/dev/branches/branch_4x/solr/example/README.txt
    lucene/dev/branches/branch_4x/solr/example/solr/README.txt
    lucene/dev/branches/branch_4x/solr/example/solr/solr.xml
    lucene/dev/branches/branch_4x/solr/lib/   (props changed)
    lucene/dev/branches/branch_4x/solr/licenses/   (props changed)
    lucene/dev/branches/branch_4x/solr/licenses/httpclient-LICENSE-ASL.txt   (props changed)
    lucene/dev/branches/branch_4x/solr/licenses/httpclient-NOTICE.txt   (props changed)
    lucene/dev/branches/branch_4x/solr/licenses/httpcore-LICENSE-ASL.txt   (props changed)
    lucene/dev/branches/branch_4x/solr/licenses/httpcore-NOTICE.txt   (props changed)
    lucene/dev/branches/branch_4x/solr/licenses/httpmime-LICENSE-ASL.txt   (props changed)
    lucene/dev/branches/branch_4x/solr/licenses/httpmime-NOTICE.txt   (props changed)
    lucene/dev/branches/branch_4x/solr/scripts/   (props changed)
    lucene/dev/branches/branch_4x/solr/solrj/   (props changed)
    lucene/dev/branches/branch_4x/solr/test-framework/   (props changed)
    lucene/dev/branches/branch_4x/solr/testlogging.properties   (props changed)
    lucene/dev/branches/branch_4x/solr/webapp/   (props changed)

Modified: lucene/dev/branches/branch_4x/solr/core/src/java/doc-files/tutorial.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/java/doc-files/tutorial.html?rev=1384896&r1=1384895&r2=1384896&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/java/doc-files/tutorial.html (original)
+++ lucene/dev/branches/branch_4x/solr/core/src/java/doc-files/tutorial.html Fri Sep 14 19:24:21 2012
@@ -133,7 +133,7 @@ The <span class="codefrag">exampledocs</
 showing of the types of commands Solr accepts, as well as a java utility 
 for posting them from the command line (a <span class="codefrag">post.sh</span>
 shell script is also available, but for this tutorial we'll use the 
-cross-platform Java client).  
+cross-platform Java client. Run <span class="codefrag">java -jar post.jar -h</span> so see it's various options).  
 </p>
 <p> To try this, open a new terminal window, enter the exampledocs directory, 
 and run "<span class="codefrag">java -jar post.jar</span>" on some of the XML 
@@ -293,9 +293,9 @@ Here is an example of using delete-by-qu
 <pre class="code">java -Dcommit=false -Ddata=args -jar post.jar "&lt;delete&gt;&lt;query&gt;name:DDR&lt;/query&gt;&lt;/delete&gt;"</pre>
 
 <p>
-You can force a new searcher to be opened to reflect these changes by sending a commit command to Solr (which post.jar does for you by default):
+You can force a new searcher to be opened to reflect these changes by sending an explicit commit command to Solr:
 </p>
-<pre class="code">java -jar post.jar</pre>
+<pre class="code">java -jar post.jar -</pre>
 
 <p>
 Now re-execute <a href="http://localhost:8983/solr/#/collection1/query?q=id:SP2514N">the previous search</a> 
@@ -396,7 +396,7 @@ and is useful when testing or debugging 
 <ul>
       
 <li>
-<a href="http://localhost:8983/solr/collection1/select/?indent=on&amp;q=*:*&amp;sort=div(popularity,add(price,1))+desc">q=video&amp;sort=div(popularity,add(price,1)) desc</a>
+<a href="http://localhost:8983/solr/collection1/select/?indent=on&amp;q=video&amp;sort=div(popularity,add(price,1))+desc">q=video&amp;sort=div(popularity,add(price,1)) desc</a>
 </li>
     
 </ul>
@@ -479,7 +479,7 @@ and is useful when testing or debugging 
   </p>
 <p>
     
-<a href="http://localhost:8983/solr/collection1/select/?wt=json&amp;indent=on&amp;q=*:*&amp;fl=name,manufacturedate_dt&amp;facet=true&amp;facet.range=manufacturedate_dt&amp;facet.range.start=2004-01-01T00:00:00Z&amp;facet.range.end=2010-01-01T00:00:00Z&amp;facet.range.gap=%2b1YEAR">...&amp;q=*:*&amp;facet=true&amp;facet.rage=manufacturedate_dt&amp;facet.rage.start=2004-01-01T00:00:00Z&amp;facet.rage.end=2010-01-01T00:00:00Z&amp;facet.range.gap=+1YEAR</a>
+<a href="http://localhost:8983/solr/collection1/select/?wt=json&amp;indent=on&amp;q=*:*&amp;fl=name,manufacturedate_dt&amp;facet=true&amp;facet.range=manufacturedate_dt&amp;facet.range.start=2004-01-01T00:00:00Z&amp;facet.range.end=2010-01-01T00:00:00Z&amp;facet.range.gap=%2b1YEAR">...&amp;q=*:*&amp;facet=true&amp;facet.range=manufacturedate_dt&amp;facet.range.start=2004-01-01T00:00:00Z&amp;facet.range.end=2010-01-01T00:00:00Z&amp;facet.range.gap=+1YEAR</a>
   
 </p>
 <p>
@@ -538,7 +538,7 @@ most languages.
   If you know your textual content is English, as is the case for the example 
   documents in this tutorial, and you'd like to apply English-specific stemming
   and stop word removal, as well as split compound words, you can use the 
-  <a href="http://localhost:8983/solr/#/collection1/schema-browser?type=text_en_splitting"><span class="codefrag">text_en_splitting</span> fieldType</a> instead.
+  <a href="http://localhost:8983/solr/#/collection1/schema-browser?type=text_en_splitting"><span class="codefrag">text_en_splitting</span></a> fieldType instead.
   Go ahead and edit the <span class="codefrag">schema.xml</span> in the 
   <span class="codefrag">solr/example/solr/collection1/conf</span> directory,
   to use the <span class="codefrag">text_en_splitting</span> fieldType for 
@@ -596,7 +596,7 @@ There is a handy <a href="http://localho
 where you can see how a text value is broken down into words by both Index time nad Query time analysis chains for a field or field type.  This page shows the resulting tokens after they pass through each filter in the chains.
 </p>
 <p>
-  <a href="http://localhost:8983/solr/#/collection1/analysis?analysis.fieldvalue=Canon+Power-Shot+SD500&analysis.query=&analysis.fieldtype=text_en_splitting">This url</a>
+  <a href="http://localhost:8983/solr/#/collection1/analysis?analysis.fieldvalue=Canon+Power-Shot+SD500&amp;analysis.query=&amp;analysis.fieldtype=text_en_splitting">This url</a>
   shows the tokens created from 
   "<span class="codefrag">Canon Power-Shot SD500</span>" 
   using the 
@@ -607,14 +607,14 @@ where you can see how a text value is br
   <span class="codefrag">power</span>, <span class="codefrag">shot</span> 
   are indexed, using tokens that have the same "position".
   (Compare the previous output with
-  <a href="http://localhost:8983/solr/#/collection1/analysis?analysis.fieldvalue=Canon+Power-Shot+SD500&analysis.query=&analysis.fieldtype=text_general">The tokens produced using the text_general field type</a>.)
+  <a href="http://localhost:8983/solr/#/collection1/analysis?analysis.fieldvalue=Canon+Power-Shot+SD500&amp;analysis.query=&amp;analysis.fieldtype=text_general">The tokens produced using the text_general field type</a>.)
 </p>
 
 <p>
 Mousing over the section label to the left of the section will display the full name of the analyzer component at that stage of the chain.  Toggling the "Verbose Output" checkbox will show/hide the detailed token attributes.
 </p>
 <p>
-When both <a href="http://localhost:8983/solr/#/collection1/analysis?analysis.fieldvalue=Canon+Power-Shot+SD500&analysis.query=power+shot+sd-500&analysis.fieldtype=text_en_splitting">Index and Query</a>
+When both <a href="http://localhost:8983/solr/#/collection1/analysis?analysis.fieldvalue=Canon+Power-Shot+SD500&amp;analysis.query=power+shot+sd-500&amp;analysis.fieldtype=text_en_splitting">Index and Query</a>
 values are provided, two tables will be displayed side by side showing the 
 results of each chain.  Terms in the Index chain results that are equivilent 
 to the final terms produced by the Query chain will be highlighted.
@@ -623,16 +623,16 @@ to the final terms produced by the Query
   Other interesting examples:
 </p>
 <ul>
-  <li><a href="http://localhost:8983/solr/#/collection1/analysis?analysis.fieldvalue=Four+score+and+seven+years+ago+our+fathers+brought+forth+on+this+continent+a+new+nation%2C+conceived+in+liberty+and+dedicated+to+the+proposition+that+all+men+are+created+equal.%0A&analysis.query=liberties+and+equality&analysis.fieldtype=text_en">English stemming and stop-words</a> 
+  <li><a href="http://localhost:8983/solr/#/collection1/analysis?analysis.fieldvalue=Four+score+and+seven+years+ago+our+fathers+brought+forth+on+this+continent+a+new+nation%2C+conceived+in+liberty+and+dedicated+to+the+proposition+that+all+men+are+created+equal.%0A&amp;analysis.query=liberties+and+equality&amp;analysis.fieldtype=text_en">English stemming and stop-words</a> 
     using the <span class="codefrag">text_en</span> field type
   </li>
-  <li><a href="http://localhost:8983/solr/#/collection1/analysis?analysis.fieldtype=text_cjk&analysis.fieldvalue=%EF%BD%B6%EF%BE%80%EF%BD%B6%EF%BE%85&analysis.query=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A">Half-width katakana normalization with bi-graming</a> 
+  <li><a href="http://localhost:8983/solr/#/collection1/analysis?analysis.fieldtype=text_cjk&amp;analysis.fieldvalue=%EF%BD%B6%EF%BE%80%EF%BD%B6%EF%BE%85&amp;analysis.query=%E3%82%AB%E3%82%BF%E3%82%AB%E3%83%8A">Half-width katakana normalization with bi-graming</a> 
     using the <span class="codefrag">text_cjk</span> field type
   </li>
-  <li><a href="http://localhost:8983/solr/#/collection1/analysis?analysis.fieldtype=text_ja&analysis.fieldvalue=%E7%A7%81%E3%81%AF%E5%88%B6%E9%99%90%E3%82%B9%E3%83%94%E3%83%BC%E3%83%89%E3%82%92%E8%B6%85%E3%81%88%E3%82%8B%E3%80%82">Japanese morphological decomposition with part-of-speech filtering</a>
+  <li><a href="http://localhost:8983/solr/#/collection1/analysis?analysis.fieldtype=text_ja&amp;analysis.fieldvalue=%E7%A7%81%E3%81%AF%E5%88%B6%E9%99%90%E3%82%B9%E3%83%94%E3%83%BC%E3%83%89%E3%82%92%E8%B6%85%E3%81%88%E3%82%8B%E3%80%82">Japanese morphological decomposition with part-of-speech filtering</a>
     using the <span class="codefrag">text_ja</span> field type 
   </li>
-  <li><a href="http://localhost:8983/solr/#/collection1/analysis?analysis.fieldtype=text_ar&analysis.fieldvalue=%D9%84%D8%A7+%D8%A3%D8%AA%D9%83%D9%84%D9%85+%D8%A7%D9%84%D8%B9%D8%B1%D8%A8%D9%8A%D8%A9
+  <li><a href="http://localhost:8983/solr/#/collection1/analysis?analysis.fieldtype=text_ar&amp;analysis.fieldvalue=%D9%84%D8%A7+%D8%A3%D8%AA%D9%83%D9%84%D9%85+%D8%A7%D9%84%D8%B9%D8%B1%D8%A8%D9%8A%D8%A9
 ">Arabic stop-words, normalization, and stemming</a>
     using the <span class="codefrag">text_ar</span> field type 
   </li>

Modified: lucene/dev/branches/branch_4x/solr/example/README.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/README.txt?rev=1384896&r1=1384895&r2=1384896&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/example/README.txt (original)
+++ lucene/dev/branches/branch_4x/solr/example/README.txt Fri Sep 14 19:24:21 2012
@@ -13,54 +13,70 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-Solr example configuration
---------------------------
+Solr example
+------------
+
+This directory contains an instance of the Jetty Servlet container setup to 
+run Solr using an example configuration.
 
-To run the default example configuration, use 
+To run this example:
 
   java -jar start.jar
 
 in this example directory, and when Solr is started connect to 
 
-  http://localhost:8983/solr/admin/
+  http://localhost:8983/solr/
 
 To add documents to the index, use the post.jar (or post.sh script) in
-the exampledocs subdirectory (while Solr is running), for example:
+the example/exampledocs subdirectory (while Solr is running), for example:
 
      cd exampledocs
      java -jar post.jar *.xml
 Or:  sh post.sh *.xml
 
-See also README.txt in the solr subdirectory, and check
-http://wiki.apache.org/solr/SolrResources for a list of tutorials and
-introductory articles.
-
-NOTE: This Solr example server references certain Solr jars outside of
-this server directory for non-core modules with <lib> statements in
-solrconfig.xml.  If you make a copy of this example server and wish
-to use the ExtractingRequestHandler (SolrCell), DataImportHandler (DIH),
-UIMA, the clustering component, or other modules in "contrib",
-you will need to copy the required jars into solr/lib or update the paths to
-the jars in your solrconfig.xml.
-
--SolrHome
-
-By default, start.jar starts Solr in Jetty using the default solr home
-directory of "./solr/" -- To run other example configurations, you can
-speciy the solr.solr.home system property when starting jetty...
+For more information about this example please read...
+
+ * example/solr/README.txt
+   For more information about the "Solr Home" and Solr specific configuration
+ * http://lucene.apache.org/solr/tutorial.html
+   For a Tutorial using this example configuration
+ * http://wiki.apache.org/solr/SolrResources 
+   For a list of other tutorials and introductory articles.
+
+Notes About These Examples
+--------------------------
+
+* SolrHome *
+
+By default, start.jar starts Solr in Jetty using the default Solr Home
+directory of "./solr/" (relative to the working directory of hte servlet 
+container).  To run other example configurations, you can specify the 
+solr.solr.home system property when starting jetty...
 
   java -Dsolr.solr.home=multicore -jar start.jar
   java -Dsolr.solr.home=example-DIH -jar start.jar
 
--Logging
+* References to Jar Files Outside This Directory *
 
-By default, Solr will log to the console. This can be convenient when first
-getting started, but eventually you will want to log to a file. To enable
-logging, you can just pass a system property to Jetty on startup:
+Various example SolrHome dirs contained in this directory may use "<lib>"
+statements in the solrconfig.xml file to reference plugin jars outside of 
+this directory for loading "contrib" plugins via relative paths.  
+
+If you make a copy of this example server and wish to use the 
+ExtractingRequestHandler (SolrCell), DataImportHandler (DIH), UIMA, the 
+clustering component, or any other modules in "contrib", you will need to 
+copy the required jars or update the paths to those jars in your 
+solrconfig.xml.
+
+* Logging *
+
+By default, Jetty & Solr will log to the console. This can be convenient when 
+first getting started, but eventually you will want to log to a file. To 
+configure logging, you can just pass a system property to Jetty on startup:
 
   java -Djava.util.logging.config.file=etc/logging.properties -jar start.jar
  
- This will use Java Util Logging to log to a file based on the config in
- etc/logging.properties. Logs will be written in the logs directory. It is
- also possible to setup log4j or other popular logging frameworks.
+This will use Java Util Logging to log to a file based on the config in
+etc/logging.properties. Logs will be written in the logs directory. It is
+also possible to setup log4j or other popular logging frameworks.
 

Modified: lucene/dev/branches/branch_4x/solr/example/solr/README.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/solr/README.txt?rev=1384896&r1=1384895&r2=1384896&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/example/solr/README.txt (original)
+++ lucene/dev/branches/branch_4x/solr/example/solr/README.txt Fri Sep 14 19:24:21 2012
@@ -14,7 +14,7 @@
 # limitations under the License.
 
 
-Example "Solr Home" Directory
+Example Solr Home Directory
 =============================
 
 This directory is provided as an example of what a "Solr Home" directory
@@ -27,28 +27,37 @@ directory when setting up a new instance
 Basic Directory Structure
 -------------------------
 
-The Solr Home directory typically contains the following subdirectories...
+The Solr Home directory typically contains the following...
 
-   conf/
-        This directory is mandatory and must contain your solrconfig.xml
-        and schema.xml.  Any other optional configuration files would also 
-        be kept here.
-
-   data/
-        This directory is the default location where Solr will keep your
-        index, and is used by the replication scripts for dealing with
-        snapshots.  You can override this location in the solrconfig.xml
-        and scripts.conf files. Solr will create this directory if it
-        does not already exist.
-
-   lib/
-        This directory is optional.  If it exists, Solr will load any Jars
-        found in this directory and use them to resolve any "plugins"
-        specified in your solrconfig.xml or schema.xml (ie: Analyzers,
-        Request Handlers, etc...).  Alternatively you can use the <lib>
-        syntax in solrconfig.xml to direct Solr to your plugins.  See the
-        example solrconfig.xml file for details.
-
-   bin/
-        This directory is optional.  It is the default location used for
-        keeping the replication scripts.
+* solr.xml *
+
+This is the primary configuration file Solr looks for when starting.
+This file specifies the list of "SolrCores" it should load, and high 
+level configuration options that should be used for all SolrCores.
+
+Please see the comments in ./solr.xml for more details.
+
+If no solr.xml file is found, then Solr assumes that there should be
+a single SolrCore named "collection1" and that the "Instance Directory" 
+for collection1 should be the same as the Solr Home Directory.
+
+* Individual SolrCore Instance Directories *
+
+Although solr.xml can be configured to look for SolrCore Instance Directories 
+in any path, simple sub-directories of the Solr Home Dir using relative paths 
+are common for many installations.  In this directory you can see the 
+"./collection1" Instance Directory.
+
+* A Shared 'lib' Directory *
+
+Although solr.xml can be configured with an optional "sharedLib" attribute 
+that can point to any path, it is common to use a "./lib" sub-directory of the 
+Solr Home Directory.
+
+* ZooKeeper Files *
+
+When using SolrCloud using the embedded ZooKeeper option for Solr, it is 
+common to have a "zoo.cfg" file and "zoo_data" directories in the Solr Home 
+Directory.  Please see the SolrCloud wiki page for more details...
+
+https://wiki.apache.org/solr/SolrCloud

Modified: lucene/dev/branches/branch_4x/solr/example/solr/solr.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/example/solr/solr.xml?rev=1384896&r1=1384895&r2=1384896&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/example/solr/solr.xml (original)
+++ lucene/dev/branches/branch_4x/solr/example/solr/solr.xml Fri Sep 14 19:24:21 2012
@@ -27,7 +27,7 @@
 -->
 
 <!--
- All (relative) paths are relative to the installation path
+ All (relative) paths are relative to the Solr Home Directory
   
   persistent: Save changes made via the API to this file
   sharedLib: path to a lib directory that will be shared across all cores