You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ct...@apache.org on 2017/08/02 20:25:09 UTC
[04/12] lucene-solr:jira/solr-10842: SOLR-10842: minor changes to a
few files
SOLR-10842: minor changes to a few files
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/67a14889
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/67a14889
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/67a14889
Branch: refs/heads/jira/solr-10842
Commit: 67a148893e7155e568127a192ec2369b1a18186f
Parents: 30b9d3a
Author: Cassandra Targett <ct...@apache.org>
Authored: Thu Jun 29 14:36:01 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Wed Aug 2 15:20:10 2017 -0500
----------------------------------------------------------------------
solr/solr-ref-guide/src/installing-solr.adoc | 6 +--
.../src/solr-configuration-files.adoc | 4 +-
solr/solr-ref-guide/src/solr-quick-start.adoc | 46 +++++++++++---------
3 files changed, 32 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/67a14889/solr/solr-ref-guide/src/installing-solr.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/installing-solr.adoc b/solr/solr-ref-guide/src/installing-solr.adoc
index 7b180fa..6c670a2 100644
--- a/solr/solr-ref-guide/src/installing-solr.adoc
+++ b/solr/solr-ref-guide/src/installing-solr.adoc
@@ -64,7 +64,7 @@ Once extracted, you are now ready to run Solr using the instructions provided in
== Directory Layout
-After installing Solr, you'll see the following directories:
+After installing Solr, you'll see the following directories and files within them:
bin::
This directory includes several important scripts that will make using Solr easier.
@@ -86,7 +86,7 @@ dist::
The `dist` directory contains the main Solr .jar files.
docs::
-The `docs` directory includes a link to the online Javadocs. It is retained in the Solr distribution as a historical artifact - it used to contain the Javadocs, but those were removed from the packaging in preference to the online version.
+The `docs` directory includes a link to online Javadocs for Solr.
example::
The `example` directory includes several types of examples that demonstrate various Solr capabilities. See the section <<Solr Examples>> below for more details on what is in this directory.
@@ -108,7 +108,7 @@ Solr includes a set of example documents and configurations to use when getting
Here are the examples included with Solr:
exampledocs::
-This is a small set of simple CSV, XML, and JSON files that can be used with `bin/post` when first getting started with Solr.
+This is a small set of simple CSV, XML, and JSON files that can be used with `bin/post` when first getting started with Solr. For more information about using `bin/post` with these files, see <<post-tool.adoc#post-tool,Post Tool>>.
example-DIH::
This directory includes a few example DataImport Handler (DIH) configurations to help you get started with importing structured content in a database, an email server, or even an Atom feed. Each example will index a different set of data; see the README there for more details about these examples.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/67a14889/solr/solr-ref-guide/src/solr-configuration-files.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-configuration-files.adoc b/solr/solr-ref-guide/src/solr-configuration-files.adoc
index 163efb4..b4f562f 100644
--- a/solr/solr-ref-guide/src/solr-configuration-files.adoc
+++ b/solr/solr-ref-guide/src/solr-configuration-files.adoc
@@ -19,7 +19,9 @@
// under the License.
== Solr Home & Configuration Files
-When Solr runs in an application server, it needs access to a home directory. When you first install Solr, your home directory is `server/solr`. However, some examples may change this location (such as, if you run `bin/solr start -e cloud`).
+When Solr runs, it needs access to a home directory.
+
+When you first install Solr, your home directory is `server/solr`. However, some examples may change this location (such as, if you run `bin/solr start -e cloud`, your home directory will be `example/cloud`).
The home directory contains important configuration information and is the place where Solr will store its index. The layout of the home directory will look a little different when you are running Solr in standalone mode vs. when you are running in SolrCloud mode.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/67a14889/solr/solr-ref-guide/src/solr-quick-start.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-quick-start.adoc b/solr/solr-ref-guide/src/solr-quick-start.adoc
index bca593b..c0580cc 100644
--- a/solr/solr-ref-guide/src/solr-quick-start.adoc
+++ b/solr/solr-ref-guide/src/solr-quick-start.adoc
@@ -17,20 +17,25 @@ To follow along with this tutorial, you will need...
. To meet the {solr-javadocs}/solr/api/SYSTEM_REQUIREMENTS.html[system requirements]
. An Apache Solr release http://lucene.apache.org/solr/downloads.html[download]. This tutorial was written using Apache Solr {solr-version}.
-[[tutorial-getting-started]]
-== Getting Started
+For best results, 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.
-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.
+[[tutorial-getting-started]]
+== Unpack Solr and Start an Example
Begin by unzipping the Solr release and changing your working directory to the subdirectory where Solr was installed. Note that the base directory name may vary with the version of Solr downloaded. For example, with a shell in UNIX, Cygwin, or MacOS:
[source,bash]
+----
/:$ ls solr*
-solr-6.6.0.zip
-/:$ unzip -q solr-6.6.0.zip
-/:$ cd solr-6.6.0/
+solr-{solr-docs-version}.0.zip
+
+/:$ unzip -q solr-{solr-docs-version}.0.zip
-To launch Solr, run: `bin/solr start -e cloud -noprompt`
+:$ cd solr-{solr-docs-version}.0/
+----
+
+=== Launch Solr
+To launch Solr, run: `bin/solr start -e cloud -noprompt`. This will start an interactive session that will start two Solr "servers" on your machine.
[source,bash]
----
@@ -61,23 +66,30 @@ The http://localhost:8983/solr/#/~cloud[Cloud tab] in the Admin UI diagrams the
.SolrCloud Diagram
image::images/solr-quick-start/quickstart-solrcloud.png[]
-== Indexing Data
+== Index Data
-Your Solr server is up and running, but it doesn't contain any data. The Solr install includes the `bin/post` tool in order to facilitate getting various types of documents easily into Solr from the start. We'll be using this tool for the indexing examples below.
+Your Solr server is up and running, but it doesn't contain any data. The Solr install includes the `bin/post` tool in order to facilitate getting various types of documents easily into Solr from the start. We'll use this tool for the indexing examples below.
You'll need a command shell to run these examples, rooted in the Solr install directory; the shell from where you launched Solr works just fine.
NOTE: Currently the `bin/post` tool does not have a comparable Windows script, but the underlying Java program invoked is available. See the <<post-tool.adoc#PostTool-WindowsSupport,Windows section>> of the Post Tool documentation for details.
-=== Indexing a directory of "rich" files
+=== Index a Directory of "Rich" Files
-// TODO this example won't work anymore after 6.6 when we ripped out javadocs
+// TODO this example won't work anymore after 6.5 when we ripped out javadocs
Let's first index local "rich" files including HTML, PDF, Microsoft Office formats (such as MS Word), plain text and many other formats. The Post Tool (`bin/post`) features the ability to crawl a directory of files, optionally recursively even, sending the raw content of each file into Solr for extraction and indexing. A Solr install includes a `docs/` subdirectory, so that makes a convenient set of (mostly) HTML files built-in to start with.
+Here's the command to start indexing:
+
`bin/post -c gettingstarted docs/`
-Here's what it'll look like:
+To explain those options a bit:
+
+* `-c gettingstarted`: name of the collection to index into
+* `docs/`: a relative path of the Solr install `docs/` directory
+
+Here's what it'll look like when it runs:
[source,bash]
/solr-6.6.0:$ bin/post -c gettingstarted docs/
@@ -97,14 +109,9 @@ POSTing file Changes.html (text/html) to [base]/extract
COMMITting Solr index changes to http://localhost:8983/solr/gettingstarted/update...
Time spent: 0:01:16.252
-The command-line breaks down as follows:
-
-* `-c gettingstarted`: name of the collection to index into
-* `docs/`: a relative path of the Solr install `docs/` directory
-
You have now indexed thousands of documents into the `gettingstarted` collection in Solr and committed these changes.
-You can search for "solr" by loading the Admin UI http://localhost:8983/solr/#/gettingstarted/query[Query tab], enter "solr" in the `q` param (replacing `*:*`, which matches all documents), and "Execute Query". See the <<tutorial-searching,Searching>> section below for more information.
+You can search for "solr" by loading the Admin UI http://localhost:8983/solr/#/gettingstarted/query[Query tab], enter "solr" in the `q` param (replacing `\*:*`, which matches all documents), and "Execute Query". See the <<tutorial-searching,Searching>> section below for more information.
To index your own data, re-run the directory indexing command pointed to your own directory of documents. For example, on a Mac instead of `docs/` try `~/Documents/` or `~/Desktop/`! You may want to start from a clean, empty system again rather than have your content in addition to the Solr `docs/` directory; see the Cleanup section [below](#cleanup) for how to get back to a clean starting point.
@@ -219,7 +226,7 @@ other <<client-apis.adoc#client-apis,Solr clients>> to programmatically create d
You may notice that even if you index content in this guide more than once, it does not duplicate the results found. This is because the example Solr schema (a file named either `managed-schema` or `schema.xml`) specifies a `uniqueKey` field called `id`. Whenever you POST commands to Solr to add a document with the same value for the `uniqueKey` as an existing document, it automatically replaces it for you. You can see that that has happened by looking at the values for `numDocs` and `maxDoc` in the core-specific Overview section of the Solr Admin UI.
-`numDocs` represents the number of searchable documents in the index (and will be larger than the number of XML, JSON, or CSV files since some files contained more than one document). The maxDoc value may be larger as the maxDoc count includes logically deleted documents that have not yet been physically removed from the index. You can re-post the sample files over and over again as much as you want and `numDocs` will never increase, because the new documents will constantly be replacing the old.
+`numDocs` represents the number of searchable documents in the index (and will be larger than the number of XML, JSON, or CSV files since some files contained more than one document). The `maxDoc` value may be larger as the `maxDoc` count includes logically deleted documents that have not yet been physically removed from the index. You can re-post the sample files over and over again as much as you want and `numDocs` will never increase, because the new documents will constantly be replacing the old.
Go ahead and edit any of the existing example data files, change some of the data, and re-run the PostTool (`bin/post`) command. You'll see your changes reflected in subsequent searches.
@@ -245,7 +252,6 @@ The URL sent by the Admin UI to Solr is shown in light grey near the top right o
`curl "http://localhost:8983/solr/gettingstarted/select?indent=on&q=*:*&wt=json"`
-
=== Basics
==== Search for a single term