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 2017/05/05 18:21:47 UTC

[1/2] lucene-solr:jira/solr-10290: manual cleanup of w pages

Repository: lucene-solr
Updated Branches:
  refs/heads/jira/solr-10290 bf84e407e -> c7361afb8


manual cleanup of w pages


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/4697d96c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4697d96c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4697d96c

Branch: refs/heads/jira/solr-10290
Commit: 4697d96ca4bb0c6273865c88582907d2995c7d23
Parents: bf84e40
Author: Chris Hostetter <ho...@apache.org>
Authored: Fri May 5 10:30:46 2017 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Fri May 5 10:30:46 2017 -0700

----------------------------------------------------------------------
 solr/solr-ref-guide/src/v2-api.adoc                 | 16 ++++++++++------
 .../src/velocity-response-writer.adoc               |  8 +++++---
 solr/solr-ref-guide/src/velocity-search-ui.adoc     |  4 +---
 3 files changed, 16 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4697d96c/solr/solr-ref-guide/src/v2-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/v2-api.adoc b/solr/solr-ref-guide/src/v2-api.adoc
index 58052aa..40e8a22 100644
--- a/solr/solr-ref-guide/src/v2-api.adoc
+++ b/solr/solr-ref-guide/src/v2-api.adoc
@@ -2,7 +2,9 @@
 :page-shortname: v2-api
 :page-permalink: v2-api.html
 
-The v2 API is a modernized self-documenting API interface covering most current Solr APIs. It is anticipated that once the v2 API reaches full coverage, and Solr-internal API usages like SolrJ and the Admin UI have been converted from the old API to the v2 API, the old API will eventually be retired. For now the two API styles will coexist, and all the old APIs will continue to work without any change. You can disable all v2 API endpoints by starting your servers with this system property: `-Ddisable.v2.api=true`.
+The v2 API is a modernized self-documenting API interface covering most current Solr APIs. It is anticipated that once the v2 API reaches full coverage, and Solr-internal API usages like SolrJ and the Admin UI have been converted from the old API to the v2 API, the old API will eventually be retired.
+
+For now the two API styles will coexist, and all the old APIs will continue to work without any change. You can disable all v2 API endpoints by starting your servers with this system property: `-Ddisable.v2.api=true`.
 
 The old API and the v2 API differ in three principle ways:
 
@@ -24,8 +26,8 @@ Following are some v2 API URL paths and path prefixes, along with some of the op
 |`/v2/c/__collection-name__/schema` |Schema requests.
 |`/v2/c/__collection-name__/__handler-name__` |Handler-specific requests.
 |`/v2/c/__collection-name__/shards` |Split a shard, create a shard, add a replica.
-|`/v2/c/__collection-name__/shards/____shard-name____ ` |Delete a shard, force leader election
-|`/v2/c/__collection-name__/shards/____shard-name____/____replica-name____` |Delete a replica.
+|`/v2/c/__collection-name__/shards/___shard-name___` |Delete a shard, force leader election
+|`/v2/c/__collection-name__/shards/___shard-name____/____replica-name___` |Delete a replica.
 |`/v2/cores` |Create a core.
 |`/v2/cores/__core-name__` |Reload, rename, delete, and unload a core.
 |`/v2/node` |Perform overseer operation, rejoin leader election.
@@ -128,7 +130,9 @@ Example of introspect for a POST API: `http://localhost:8983/v2/c/gettingstarted
     "/c/gettingstarted/export":["POST", "GET"],
     "/c/gettingstarted/admin/ping":["POST", "GET"],
     "/c/gettingstarted/update":["POST"]},
+
 [... more sub-paths ...]
+
 }
 ----
 
@@ -139,7 +143,7 @@ The `"commands"` section in the above example has one entry for each command sup
 
 For the "gettingstarted" collection, set the replication factor and whether to automatically add replicas (see above for the introspect output for the `"modify"` command used here):
 
-[source,text]
+[source,bash]
 ----
 $ curl http://localhost:8983/v2/c/gettingstarted -H 'Content-type:application/json' -d '
 { modify: { replicationFactor: "3", autoAddReplicas: false } }'
@@ -149,7 +153,7 @@ $ curl http://localhost:8983/v2/c/gettingstarted -H 'Content-type:application/js
 
 See the state of the cluster:
 
-[source,text]
+[source,bash]
 ----
 $ curl http://localhost:8983/v2/cluster
 
@@ -158,7 +162,7 @@ $ curl http://localhost:8983/v2/cluster
 
 Set a cluster property:
 
-[source,text]
+[source,bash]
 ----
 $ curl http://localhost:8983/v2/cluster -H 'Content-type: application/json' -d '
 { set-property: { name: autoAddReplicas, val: "false" } }'

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4697d96c/solr/solr-ref-guide/src/velocity-response-writer.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/velocity-response-writer.adoc b/solr/solr-ref-guide/src/velocity-response-writer.adoc
index 199c609..7e205ee 100644
--- a/solr/solr-ref-guide/src/velocity-response-writer.adoc
+++ b/solr/solr-ref-guide/src/velocity-response-writer.adoc
@@ -4,9 +4,9 @@
 
 The VelocityResponseWriter is an optional plugin available in the `contrib/velocity` directory. It powers the /browse user interfaces when using configurations such as "basic_configs", "techproducts", and "example/files".
 
-Its JAR and dependencies must be added (via <lib> or solr/home lib inclusion), and must be registered in `solrconfig.xml` like this:
+Its JAR and dependencies must be added (via `<lib>` or solr/home lib inclusion), and must be registered in `solrconfig.xml` like this:
 
-[source,java]
+[source,xml]
 ----
 <queryResponseWriter name="velocity" class="solr.VelocityResponseWriter">
   <str name="template.base.dir">${velocity.template.base.dir:}</str>
@@ -24,6 +24,8 @@ Its JAR and dependencies must be added (via <lib> or solr/home lib inclusion), a
 
 The above example shows the optional initialization and custom tool parameters used by VelocityResponseWriter; these are detailed in the following table. These initialization parameters are only specified in the writer registration in solrconfig.xml, not as request-time parameters. See further below for request-time parameters.
 
+== Configuration & Usage
+
 [[VelocityResponseWriter-VelocityResponseWriterinitializationparameters]]
 === VelocityResponseWriter initialization parameters
 
@@ -37,7 +39,7 @@ The above example shows the optional initialization and custom tool parameters u
 |params.resource.loader.enabled a|
 The "params" resource loader allows templates to be specified in Solr request parameters. For example:
 
-`http://localhost:8983``/solr``/gettingstarted``/select``?q=*:*``&wt=velocity``&v.template=custom``&v.template.custom=CUSTOM%3A%20%23core_name`
+`http://localhost:8983/solr/gettingstarted/select?q=\*:*&wt=velocity&v.template=custom&v.template.custom=CUSTOM%3A%20%23core_name`
 
 where `v.template=custom` says to render a template called "custom" and `v.template.custom`'s value is the actual custom template. This is disabled by default; it'd be a niche, unusual, use case to need this enabled.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4697d96c/solr/solr-ref-guide/src/velocity-search-ui.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/velocity-search-ui.adoc b/solr/solr-ref-guide/src/velocity-search-ui.adoc
index 0b86cd5..51cf459 100644
--- a/solr/solr-ref-guide/src/velocity-search-ui.adoc
+++ b/solr/solr-ref-guide/src/velocity-search-ui.adoc
@@ -6,9 +6,7 @@ Solr includes a sample search UI based on the <<response-writers.adoc#ResponseWr
 
 When using the `sample_techproducts_configs` config set, you can access the Velocity sample Search UI here: `http://localhost:8983/solr/techproducts/browse`
 
+.The Velocity Search UI
 image::images/velocity-search-ui/techproducts_browse.png[image,width=500]
 
-
-_The Velocity Search UI_
-
 For more information about the Velocity Response Writer, see the <<response-writers.adoc#ResponseWriters-VelocityResponseWriter,Response Writer page>>.


[2/2] lucene-solr:jira/solr-10290: manual cleanup of using-* pages

Posted by ho...@apache.org.
manual cleanup of using-* pages


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/c7361afb
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/c7361afb
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/c7361afb

Branch: refs/heads/jira/solr-10290
Commit: c7361afb83f3ae477c9f9a9fcbd901157735d390
Parents: 4697d96
Author: Chris Hostetter <ho...@apache.org>
Authored: Fri May 5 11:21:34 2017 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Fri May 5 11:21:34 2017 -0700

----------------------------------------------------------------------
 solr/solr-ref-guide/src/using-python.adoc             | 13 ++++++-------
 solr/solr-ref-guide/src/using-solr-from-ruby.adoc     | 12 +++++++-----
 solr/solr-ref-guide/src/using-solrj.adoc              |  5 ++---
 .../using-the-solr-administration-user-interface.adoc |  7 +++++++
 ...using-zookeeper-to-manage-configuration-files.adoc | 14 ++++++++------
 5 files changed, 30 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c7361afb/solr/solr-ref-guide/src/using-python.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-python.adoc b/solr/solr-ref-guide/src/using-python.adoc
index 629b44b..a16efe4 100644
--- a/solr/solr-ref-guide/src/using-python.adoc
+++ b/solr/solr-ref-guide/src/using-python.adoc
@@ -9,23 +9,22 @@ Solr includes an output format specifically for <<response-writers.adoc#Response
 
 Making a query is a simple matter. First, tell Python you will need to make HTTP connections.
 
-[source,java]
+[source,python]
 ----
 from urllib2 import *
 ----
 
 Now open a connection to the server and get a response. The `wt` query parameter tells Solr to return results in a format that Python can understand.
 
-[source,java]
+[source,python]
 ----
-connection = urlopen(
-                'http://localhost:8983/solr/collection_name/select?q=cheese&wt=python')
+connection = urlopen('http://localhost:8983/solr/collection_name/select?q=cheese&wt=python')
 response = eval(connection.read())
 ----
 
 Now interpreting the response is just a matter of pulling out the information that you need.
 
-[source,java]
+[source,python]
 ----
 print response['response']['numFound'], "documents found."
 
@@ -40,14 +39,14 @@ for document in response['response']['docs']:
 
 JSON is a more robust response format, but you will need to add a Python package in order to use it. At a command line, install the simplejson package like this:
 
-[source,java]
+[source,bash]
 ----
 $ sudo easy_install simplejson
 ----
 
 Once that is done, making a query is nearly the same as before. However, notice that the wt query parameter is now json, and the response is now digested by `simplejson.load()`.
 
-[source,java]
+[source,python]
 ----
 from urllib2 import *
 import simplejson

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c7361afb/solr/solr-ref-guide/src/using-solr-from-ruby.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-solr-from-ruby.adoc b/solr/solr-ref-guide/src/using-solr-from-ruby.adoc
index 760bce3..50d6ac2 100644
--- a/solr/solr-ref-guide/src/using-solr-from-ruby.adoc
+++ b/solr/solr-ref-guide/src/using-solr-from-ruby.adoc
@@ -2,17 +2,19 @@
 :page-shortname: using-solr-from-ruby
 :page-permalink: using-solr-from-ruby.html
 
-Solr has an optional Ruby response format that extends its http://Response%20Writers#JSON%20Response%20Writer[JSON output] in the following ways to allow the response to be safely eval'd by Ruby's interpreter:
+Solr has an optional Ruby response format that extends the <<response-writers.adoc#ResponseWriters-JSONResponseWriter,JSON output>> to allow the response to be safely eval'd by Ruby's interpreter
+
+This Ruby response format differs from JSON in the following ways:
 
 * Ruby's single quoted strings are used to prevent possible string exploits
-** \ and ' are the only two characters escaped...
+** `\` and `'` are the only two characters escaped...
 ** unicode escapes not used... data is written as raw UTF-8
 * nil used for null
-* => used as the key/value separator in maps
+* `\=>` used as the key/value separator in maps
 
 Here's an example Ruby response from Solr, for `http://localhost:8983/solr/techproducts/select?q=iPod&wt=ruby&indent=on` (with Solr launching using `bin/solr start -e techproducts`):
 
-[source,java]
+[source,ruby]
 ----
 {
   'responseHeader'=>{
@@ -82,7 +84,7 @@ Here's an example Ruby response from Solr, for `http://localhost:8983/solr/techp
 
 Here is a simple example of how one may query Solr using the Ruby response format:
 
-[source,java]
+[source,ruby]
 ----
 require 'net/http'
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c7361afb/solr/solr-ref-guide/src/using-solrj.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-solrj.adoc b/solr/solr-ref-guide/src/using-solrj.adoc
index a3d2905..39cd440 100644
--- a/solr/solr-ref-guide/src/using-solrj.adoc
+++ b/solr/solr-ref-guide/src/using-solrj.adoc
@@ -8,16 +8,15 @@ The center of SolrJ is the `org.apache.solr.client.solrj` package, which contain
 
 `SolrClient` is abstract, so to connect to a remote Solr instance, you'll actually create an instance of either {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/impl/HttpSolrClient.html[`HttpSolrClient`], or {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/impl/CloudSolrClient.html[`CloudSolrClient`]. Both communicate with Solr via HTTP, the difference is that `HttpSolrClient` is configured using an explicit Solr URL, while `CloudSolrClient` is configured using the zkHost String for a <<solrcloud.adoc#solrcloud,SolrCloud>> cluster.
 
-*Single node Solr client*
 
+.Single node Solr client
 [source,java]
 ----
 String urlString = "http://localhost:8983/solr/techproducts";
 SolrClient solr = new HttpSolrClient.Builder(urlString).build();
 ----
 
-*SolrCloud client*
-
+.SolrCloud client
 [source,java]
 ----
 String zkHostString = "zkServerA:2181,zkServerB:2181,zkServerC:2181/solr";

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c7361afb/solr/solr-ref-guide/src/using-the-solr-administration-user-interface.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-the-solr-administration-user-interface.adoc b/solr/solr-ref-guide/src/using-the-solr-administration-user-interface.adoc
index 4cce12f..7442a69 100644
--- a/solr/solr-ref-guide/src/using-the-solr-administration-user-interface.adoc
+++ b/solr/solr-ref-guide/src/using-the-solr-administration-user-interface.adoc
@@ -5,6 +5,13 @@
 
 This section discusses the Solr Administration User Interface ("Admin UI").
 
+// TODO: areThis page is nothing but a giant TOC ...  we keeping this page?
+// TODO: should we just slurp overview-of-the-solr-admin-ui.adoc in here?
+// TODO: can we programatically build this from the data files?
+
+// TODO: if we do keep this page, all the cwiki links need replaced with relative paths to the new pages
+
+
 The <<overview-of-the-solr-admin-ui.adoc#overview-of-the-solr-admin-ui,Overview of the Solr Admin UI>> explains the basic features of the user interface, what's on the initial Admin UI page, and how to configure the interface. In addition, there are pages describing each screen of the Admin UI:
 
 * *<<getting-assistance.adoc#getting-assistance,Getting Assistance>>* shows you how to get more information about the UI.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c7361afb/solr/solr-ref-guide/src/using-zookeeper-to-manage-configuration-files.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-zookeeper-to-manage-configuration-files.adoc b/solr/solr-ref-guide/src/using-zookeeper-to-manage-configuration-files.adoc
index b07e8a7..77bc78f 100644
--- a/solr/solr-ref-guide/src/using-zookeeper-to-manage-configuration-files.adoc
+++ b/solr/solr-ref-guide/src/using-zookeeper-to-manage-configuration-files.adoc
@@ -2,7 +2,9 @@
 :page-shortname: using-zookeeper-to-manage-configuration-files
 :page-permalink: using-zookeeper-to-manage-configuration-files.html
 
-With SolrCloud your configuration files are kept in ZooKeeper. These files are uploaded in either of the following cases:
+With SolrCloud your configuration files are kept in ZooKeeper.
+
+These files are uploaded in either of the following cases:
 
 * When you start a SolrCloud example using the `bin/solr` script.
 * When you create a collection using the `bin/solr` script.
@@ -41,15 +43,15 @@ It's a good idea to keep these files under version control.
 // OLD_CONFLUENCE_ID: UsingZooKeepertoManageConfigurationFiles-UploadingConfigurationFilesusingbin/solrorSolrJ
 
 [[UsingZooKeepertoManageConfigurationFiles-UploadingConfigurationFilesusingbin_solrorSolrJ]]
-== Uploading Configuration Files using bin/solr or SolrJ
+== Uploading Configuration Files using `bin/solr` or SolrJ
 
 In production situations, <<config-sets.adoc#config-sets,Config Sets>> can also be uploaded to ZooKeeper independent of collection creation using either Solr's <<solr-control-script-reference.adoc#solr-control-script-reference,Solr Control Script>> or the {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/impl/CloudSolrClient.html[CloudSolrClient.uploadConfig] java method.
 
 The below command can be used to upload a new configset using the bin/solr script.
 
-[source,java]
+[source,text]
 ----
-$  bin/solr zk upconfig -n <name for configset> -d <path to directory with configset>
+$ bin/solr zk upconfig -n <name for configset> -d <path to directory with configset>
 ----
 
 It is strongly recommended that the configurations be kept in a version control system, Git, SVN or similar.
@@ -68,9 +70,9 @@ To update or change your SolrCloud configuration files:
 [[UsingZooKeepertoManageConfigurationFiles-PreparingZooKeeperbeforefirstclusterstart]]
 == Preparing ZooKeeper before first cluster start
 
-If you will share the same ZooKeeper instance with other applications you should use a _chroot_ in ZooKeeper. Please see <<taking-solr-to-production.adoc#TakingSolrtoProduction-ZooKeeperchroot,Taking Solr to Production#ZooKeeperchroot>> for instructions.
+If you will share the same ZooKeeper instance with other applications you should use a _chroot_ in ZooKeeper. Please see <<taking-solr-to-production.adoc#TakingSolrtoProduction-ZooKeeperchroot,ZooKeeper chroot>> for instructions.
 
-There are certain configuration files containing cluster wide configuration. Since some of these are crucial for the cluster to function properly, you may need to upload such files to ZooKeeper before starting your Solr cluster for the first time. Examples of such configuration files (not exhaustive) are `solr.xml`, `security.json `and `clusterprops.json`.
+There are certain configuration files containing cluster wide configuration. Since some of these are crucial for the cluster to function properly, you may need to upload such files to ZooKeeper before starting your Solr cluster for the first time. Examples of such configuration files (not exhaustive) are `solr.xml`, `security.json` and `clusterprops.json`.
 
 If you for example would like to keep your `solr.xml` in ZooKeeper to avoid having to copy it to every node's `solr_home` directory, you can push it to ZooKeeper with the bin/solr utility (Unix example):