You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by cp...@apache.org on 2017/06/02 10:56:24 UTC

[01/38] lucene-solr:jira/solr-8668: minor edits to the reference guide

Repository: lucene-solr
Updated Branches:
  refs/heads/jira/solr-8668 d8d7e2857 -> 51fe774c5


minor edits to the reference guide


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

Branch: refs/heads/jira/solr-8668
Commit: d14ca98df8acee2380fde8c20ee3086894603195
Parents: c680de1
Author: Erick Erickson <er...@apache.org>
Authored: Tue May 30 10:19:55 2017 -0700
Committer: Erick Erickson <er...@apache.org>
Committed: Tue May 30 10:19:55 2017 -0700

----------------------------------------------------------------------
 solr/solr-ref-guide/src/near-real-time-searching.adoc | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d14ca98d/solr/solr-ref-guide/src/near-real-time-searching.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/near-real-time-searching.adoc b/solr/solr-ref-guide/src/near-real-time-searching.adoc
index 8751a49..641208e 100644
--- a/solr/solr-ref-guide/src/near-real-time-searching.adoc
+++ b/solr/solr-ref-guide/src/near-real-time-searching.adoc
@@ -29,9 +29,9 @@ However, pay special attention to cache and autowarm settings as they can have a
 [[NearRealTimeSearching-CommitsandOptimizing]]
 == Commits and Optimizing
 
-A commit operation makes index changes visible to new search requests. A *hard commit* uses the transaction log to get the id of the latest document changes, and also calls `fsync` on the index files to ensure they have been flushed to stable storage and no data loss will result from a power failure.
+A commit operation makes index changes visible to new search requests. A *hard commit* uses the transaction log to get the id of the latest document changes, and also calls `fsync` on the index files to ensure they have been flushed to stable storage and no data loss will result from a power failure. The current transaction log is closed and a new one is opened. See the "transaction log" discussion below for data loss issues.
 
-A *soft commit* is much faster since it only makes index changes visible and does not `fsync` index files or write a new index descriptor. If the JVM crashes or there is a loss of power, changes that occurred after the last *hard commit* will be lost. Search collections that have NRT requirements (that want index changes to be quickly visible to searches) will want to soft commit often but hard commit less frequently. A softCommit may be "less expensive" in terms of time, but not free, since it can slow throughput.
+A *soft commit* is much faster since it only makes index changes visible and does not `fsync` index files, or write a new index descriptor or start a new transaction log. Search collections that have NRT requirements (that want index changes to be quickly visible to searches) will want to soft commit often but hard commit less frequently. A softCommit may be "less expensive", but it is not free, since it can slow throughput. See the "transaction log" discussion below for data loss issues. 
 
 An *optimize* is like a *hard commit* except that it forces all of the index segments to be merged into a single segment first. Depending on the use, this operation should be performed infrequently (e.g., nightly), if at all, since it involves reading and re-writing the entire index. Segments are normally merged over time anyway (as determined by the merge policy), and optimize just forces these merges to occur immediately.
 
@@ -48,6 +48,15 @@ Soft commit takes uses two parameters: `maxDocs` and `maxTime`.
 
 Use `maxDocs` and `maxTime` judiciously to fine-tune your commit strategies.
 
+[[NearRealTimeSearching-TransactionLogs]]
+=== Transaction Logs (tlogs)
+
+Transaction logs are a "rolling window" of at least the last `N` (default 100) documents indexed. Tlogs are configured in solrconfig.xml, including the value of `N`. The current transaction log is closed and a new one opened each time any variety of hard commit occurs. Soft commits have no effect on the transaction log.
+  
+When tlogs are enabled, documents being added to the index are written to the tlog before the indexing call returns to the client. In the event of an un-graceful shutdown (power loss, JVM crash, `kill -9` etc) any documents written to the tlog that was open when Solr stopped are replayed on startup.
+
+When Solr is shut down gracefully (i.e. using the `bin/solr stop` command and the like) Solr will close the tlog file and index segments so no replay will be necessary on startup.
+
 [[NearRealTimeSearching-AutoCommits]]
 === AutoCommits
 
@@ -75,6 +84,7 @@ It's better to use `maxTime` rather than `maxDocs` to modify an `autoSoftCommit`
 |===
 |Parameter |Valid Attributes |Description
 |`waitSearcher` |true, false |Block until a new searcher is opened and registered as the main query searcher, making the changes visible. Default is true.
+|`OpenSearcher` |true, false |Open a new searcher making all documents indexed so far visible for searching. Default is true.
 |`softCommit` |true, false |Perform a soft commit. This will refresh the view of the index faster, but without guarantees that the document is stably stored. Default is false.
 |`expungeDeletes` |true, false |Valid for `commit` only. This parameter purges deleted data from segments. The default is false.
 |`maxSegments` |integer |Valid for `optimize` only. Optimize down to at most this number of segments. The default is 1.


[25/38] lucene-solr:jira/solr-8668: SOLR-10792: Deprecate and remove implicit registration of lucenePlusSort aka OldLuceneQParser

Posted by cp...@apache.org.
SOLR-10792: Deprecate and remove implicit registration of lucenePlusSort aka OldLuceneQParser


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

Branch: refs/heads/jira/solr-8668
Commit: c88c524bbf225dcf71a4998373ad88c7ad8efd80
Parents: 57fe80d
Author: Chris Hostetter <ho...@apache.org>
Authored: Thu Jun 1 10:01:17 2017 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Thu Jun 1 10:01:17 2017 -0700

----------------------------------------------------------------------
 solr/CHANGES.txt                                         |  5 +++++
 .../java/org/apache/solr/search/LuceneQParserPlugin.java |  2 +-
 .../org/apache/solr/search/OldLuceneQParserPlugin.java   |  3 +++
 .../src/java/org/apache/solr/search/QParserPlugin.java   |  1 -
 .../src/test-files/solr/collection1/conf/solrconfig.xml  |  3 +++
 .../test/org/apache/solr/search/QueryEqualityTest.java   |  1 +
 solr/solr-ref-guide/src/other-parsers.adoc               | 11 -----------
 7 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c88c524b/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 6d0e6c7..4159318 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -82,6 +82,10 @@ Upgrading from Solr 6.x
 * Deprecated LatLonType, GeoHashField, SpatialPointVectorFieldType, and SpatialTermQueryPrefixTreeFieldType.
   Instead, switch to LatLonPointSpatialField or SpatialRecursivePrefixTreeFieldType or RptWithGeometrySpatialField.
 
+* The 'lucenePlusSort' QParser has been deprecated, and is no longer implicitly defined.  If you wish to continue using
+  this QParser untill Solr 8, you must explicitly register it in your solrconfig.xml:
+     '<queryParser name="lucenePlusSort" class="solr.OldLuceneQParserPlugin"/>'
+
 New Features
 ----------------------
 * SOLR-9857, SOLR-9858: Collect aggregated metrics from nodes and shard leaders in overseer. (ab)
@@ -207,6 +211,7 @@ Other Changes
 
 * SOLR-10744: Update noggit to newer version (0.8) (noble)
 
+* SOLR-10792: Deprecate and remove implicit registration of "lucenePlusSort" aka OldLuceneQParser (hossman)
 
 ==================  6.7.0 ==================
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c88c524b/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.java
index 4e2a4d6..8668330 100644
--- a/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/LuceneQParserPlugin.java
@@ -42,7 +42,7 @@ public class LuceneQParserPlugin extends QParserPlugin {
   }
 }
 
-
+@Deprecated 
 class OldLuceneQParser extends LuceneQParser {
   String sortStr;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c88c524b/solr/core/src/java/org/apache/solr/search/OldLuceneQParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/OldLuceneQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/OldLuceneQParserPlugin.java
index d2b583c..d4cbfcb 100644
--- a/solr/core/src/java/org/apache/solr/search/OldLuceneQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/OldLuceneQParserPlugin.java
@@ -23,7 +23,10 @@ import org.apache.solr.request.SolrQueryRequest;
  * Parse Solr's variant of Lucene QueryParser syntax, including the
  * deprecated sort specification after the query.
  * <br>Example: <code>{!lucenePlusSort}myfield:foo +bar -baz;price asc</code>
+ *
+ * @deprecated This class should have been removed a long time ago, it will be removed in Solr 8.0
  */
+@Deprecated
 public class OldLuceneQParserPlugin extends QParserPlugin {
   public static final String NAME = "lucenePlusSort";
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c88c524b/solr/core/src/java/org/apache/solr/search/QParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/QParserPlugin.java b/solr/core/src/java/org/apache/solr/search/QParserPlugin.java
index d8dc29f..2ee63cf 100644
--- a/solr/core/src/java/org/apache/solr/search/QParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/QParserPlugin.java
@@ -47,7 +47,6 @@ public abstract class QParserPlugin implements NamedListInitializedPlugin, SolrI
   static {
     HashMap<String, Class<? extends QParserPlugin>> map = new HashMap<>(30, 1);
     map.put(LuceneQParserPlugin.NAME, LuceneQParserPlugin.class);
-    map.put(OldLuceneQParserPlugin.NAME, OldLuceneQParserPlugin.class);
     map.put(FunctionQParserPlugin.NAME, FunctionQParserPlugin.class);
     map.put(PrefixQParserPlugin.NAME, PrefixQParserPlugin.class);
     map.put(BoostQParserPlugin.NAME, BoostQParserPlugin.class);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c88c524b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
index a63f6cb..27f2e42 100644
--- a/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig.xml
@@ -494,6 +494,9 @@
 
   <queryParser name="foo" class="FooQParserPlugin"/>
 
+  <!-- deprecated parser, delete once class is deleted in Solr 8.0 -->
+  <queryParser name="lucenePlusSort" class="solr.OldLuceneQParserPlugin"/>
+  
   <updateRequestProcessorChain name="dedupe">
     <processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
       <bool name="enabled">false</bool>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c88c524b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
index 1ec4198..0a9059c 100644
--- a/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
+++ b/solr/core/src/test/org/apache/solr/search/QueryEqualityTest.java
@@ -94,6 +94,7 @@ public class QueryEqualityTest extends SolrTestCaseJ4 {
                       " +apache +solr");
   }
 
+  @Deprecated
   public void testQueryLucenePlusSort() throws Exception {
     assertQueryEquals("lucenePlusSort", 
                       "apache solr", "apache  solr", "apache solr ; score desc");

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c88c524b/solr/solr-ref-guide/src/other-parsers.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/other-parsers.adoc b/solr/solr-ref-guide/src/other-parsers.adoc
index 9b438f5..7660780 100644
--- a/solr/solr-ref-guide/src/other-parsers.adoc
+++ b/solr/solr-ref-guide/src/other-parsers.adoc
@@ -645,17 +645,6 @@ If the `q1` parameter is price, then the query would be a function query on the
 
 For more information about the possibilities of nested queries, see Yonik Seeley's blog post https://lucidworks.com/2009/03/31/nested-queries-in-solr/[Nested Queries in Solr].
 
-[[OtherParsers-OldLuceneQueryParser]]
-== Old Lucene Query Parser
-
-`OldLuceneQParser` extends the `QParserPlugin` by parsing Solr's variant of Lucene's QueryParser syntax, including the deprecated sort specification after the query.
-
-Example:
-
-[source,text]
-----
-{!lucenePlusSort} myfield:foo +bar -baz;price asc
-----
 
 [[OtherParsers-PayloadQueryParsers]]
 == Payload Query Parsers


[03/38] lucene-solr:jira/solr-8668: SOLR-10770: Fix precommit

Posted by cp...@apache.org.
SOLR-10770: Fix precommit


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

Branch: refs/heads/jira/solr-8668
Commit: 4608e7d03690755a05f53693519db6b06c6e9d7c
Parents: 5207629
Author: Joel Bernstein <jb...@apache.org>
Authored: Tue May 30 14:51:46 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Tue May 30 14:51:46 2017 -0400

----------------------------------------------------------------------
 .../apache/solr/client/solrj/io/stream/TimeSeriesStream.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4608e7d0/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TimeSeriesStream.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TimeSeriesStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TimeSeriesStream.java
index f38da85..fe2a106 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TimeSeriesStream.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TimeSeriesStream.java
@@ -17,7 +17,6 @@
 package org.apache.solr.client.solrj.io.stream;
 
 import java.io.IOException;
-import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
 import java.time.ZoneOffset;
 import java.time.format.DateTimeFormatter;
@@ -57,8 +56,8 @@ public class TimeSeriesStream extends TupleStream implements Expressible  {
   private String end;
   private String gap;
   private String field;
+  private String format;
   private DateTimeFormatter formatter;
-  private SimpleDateFormat ISOFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'");
 
   private Metric[] metrics;
   private List<Tuple> tuples = new ArrayList();
@@ -197,7 +196,8 @@ public class TimeSeriesStream extends TupleStream implements Expressible  {
     this.params = params;
     this.end = end;
     if(format != null) {
-      formatter = DateTimeFormatter.ofPattern(format);
+      this.format = format;
+      formatter = DateTimeFormatter.ofPattern(format, Locale.ROOT);
     }
   }
 
@@ -225,6 +225,8 @@ public class TimeSeriesStream extends TupleStream implements Expressible  {
     expression.addParameter(new StreamExpressionNamedParameter("end", end));
     expression.addParameter(new StreamExpressionNamedParameter("gap", gap));
     expression.addParameter(new StreamExpressionNamedParameter("field", gap));
+    expression.addParameter(new StreamExpressionNamedParameter("format", format));
+
 
     // zkHost
     expression.addParameter(new StreamExpressionNamedParameter("zkHost", zkHost));


[31/38] lucene-solr:jira/solr-8668: SOLR-10566: Add documentation

Posted by cp...@apache.org.
SOLR-10566: Add documentation


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

Branch: refs/heads/jira/solr-8668
Commit: 6d6e47f1965697a830d94836058b7b9ef4d97036
Parents: 71b5d34
Author: Joel Bernstein <jb...@apache.org>
Authored: Thu Jun 1 16:26:57 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Thu Jun 1 16:26:57 2017 -0400

----------------------------------------------------------------------
 solr/solr-ref-guide/src/stream-sources.adoc | 31 +++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/6d6e47f1/solr/solr-ref-guide/src/stream-sources.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-sources.adoc b/solr/solr-ref-guide/src/stream-sources.adoc
index e7356ae..986a5da 100644
--- a/solr/solr-ref-guide/src/stream-sources.adoc
+++ b/solr/solr-ref-guide/src/stream-sources.adoc
@@ -390,7 +390,36 @@ stats(collection1,
 
 == timeseries
 
-//TODO
+The `timeseries` function builds a time series aggregation. Under the covers the `timeseries` function uses the
+JSON Facet API as its high performance aggregation engine.
+
+=== timeseries Parameters
+
+* `collection`: (Mandatory) Collection the stats will be aggregated from.
+* `q`: (Mandatory) The query to build the aggregations from.
+* `field`: (Mandatory) The date field for the time series.
+* `start`: (Mandatory) The start of the time series expressed in Solr date or date math syntax.
+* `end`: (Mandatory) The end of the time series expressed in Solr date or date math syntax.
+* `gap`: (Mandatory) The time gap between time series aggregation points expressed in Solr date math syntax.
+* `metrics`: (Mandatory) The metrics to include in the result tuple. Current supported metrics are `sum(col)`, `avg(col)`, `min(col)`, `max(col)` and `count(*)`
+
+=== timeseries Syntax
+
+[source,text]
+----
+timeseries(collection1,
+           q=*:*,
+           field="rec_dt"
+           start="NOW-30DAYS",
+           end="NOW",
+           gap="+1DAY",
+           sum(a_i),
+           max(a_i),
+           max(a_f),
+           avg(a_i),
+           avg(a_f),
+           count(*))
+----
 
 == train
 


[11/38] lucene-solr:jira/solr-8668: SOLR-10757: Merge remote-tracking branch 'refs/remotes/origin/master'

Posted by cp...@apache.org.
SOLR-10757: Merge remote-tracking branch 'refs/remotes/origin/master'

Conflicts:
	solr/CHANGES.txt


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

Branch: refs/heads/jira/solr-8668
Commit: 7a5261a2228b52d6b29d1d6c147ce08f43e917cb
Parents: ee33f38 55e37cd
Author: Chris Hostetter <ho...@apache.org>
Authored: Wed May 31 09:52:25 2017 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Wed May 31 09:52:25 2017 -0700

----------------------------------------------------------------------
 .../spatial3d/geom/GeoPolygonFactory.java       | 63 +++++++++++++++
 .../lucene/spatial3d/geom/GeoPolygonTest.java   | 63 +++++++++++++++
 solr/CHANGES.txt                                |  3 +
 .../apache/solr/cloud/CreateCollectionCmd.java  |  4 +-
 .../org/apache/solr/cloud/TestPullReplica.java  | 20 ++++-
 .../org/apache/solr/cloud/TestTlogReplica.java  | 20 ++++-
 solr/solr-ref-guide/src/codec-factory.adoc      | 24 +++++-
 .../src/near-real-time-searching.adoc           | 14 +++-
 .../src/solr-control-script-reference.adoc      | 11 ++-
 .../solrj/io/stream/TimeSeriesStream.java       | 38 ++++++++-
 .../solrj/io/stream/StreamExpressionTest.java   | 81 ++++++++++++++++++++
 11 files changed, 321 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7a5261a2/solr/CHANGES.txt
----------------------------------------------------------------------
diff --cc solr/CHANGES.txt
index d78f991,f57cac5..1192d36
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@@ -198,8 -198,9 +198,11 @@@ Other Change
  
  * SOLR-10755: delete/refactor many solrj deprecations (hossman)
  
+ * SOLR-10752: replicationFactor (nrtReplicas) default is 0 if tlogReplicas is specified when creating a collection
+   (Tomás Fernández Löbbe)
+ 
 +* SOLR-10757: delete/refactor/cleanup CollectionAdminRequest deprecations (hossman)
 +
  ==================  6.7.0 ==================
  
  Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.


[15/38] lucene-solr:jira/solr-8668: LUCENE-7853: Return the public interface, not the private implementation

Posted by cp...@apache.org.
LUCENE-7853: Return the public interface, not the private implementation


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

Branch: refs/heads/jira/solr-8668
Commit: 08ea9a787e624db4440c57b882afcfecddecc86b
Parents: 9769323
Author: Karl Wright <Da...@gmail.com>
Authored: Wed May 31 15:03:44 2017 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Wed May 31 15:03:44 2017 -0400

----------------------------------------------------------------------
 .../lucene/spatial3d/geom/GeoPolygonFactory.java    | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/08ea9a78/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java
index 4c1850e..7cabe32 100755
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java
@@ -56,9 +56,9 @@ public class GeoPolygonFactory {
    * that we are dealing with a concave polygon, e.g. the polygon has been serialized.
    * If there is not such certainty, please refer to @{@link GeoPolygonFactory#makeGeoPolygon(PlanetModel, List)}.
    * @param pointList is a list of the GeoPoints to build an arbitrary polygon out of.
-   * @return a GeoConcavePolygon corresponding to what was specified.
+   * @return a GeoPolygon corresponding to what was specified.
    */
-  public static GeoConcavePolygon makeGeoConcavePolygon(final PlanetModel planetModel,
+  public static GeoPolygon makeGeoConcavePolygon(final PlanetModel planetModel,
                                                         final List<GeoPoint> pointList) {
     return new GeoConcavePolygon(planetModel, pointList);
   }
@@ -70,9 +70,9 @@ public class GeoPolygonFactory {
    * there is certainty that we are dealing with a convex polygon, e.g. the polygon has been serialized.
    * If there is not such certainty, please refer to @{@link GeoPolygonFactory#makeGeoPolygon(PlanetModel, List)}.
    * @param pointList is a list of the GeoPoints to build an arbitrary polygon out of.
-   * @return a GeoConvexPolygon corresponding to what was specified.
+   * @return a GeoPolygon corresponding to what was specified.
    */
-  public static GeoConvexPolygon makeGeoConvexPolygon(final PlanetModel planetModel,
+  public static GeoPolygon makeGeoConvexPolygon(final PlanetModel planetModel,
                                                       final List<GeoPoint> pointList) {
     return new GeoConvexPolygon(planetModel, pointList);
   }
@@ -105,9 +105,9 @@ public class GeoPolygonFactory {
    * @param pointList is a list of the GeoPoints to build an arbitrary polygon out of.
    * @param holes is a list of polygons representing "holes" in the outside polygon.  Holes describe the area outside
    *  each hole as being "in set".  Null == none.
-   * @return a GeoConcavePolygon corresponding to what was specified.
+   * @return a GeoPolygon corresponding to what was specified.
    */
-  public static GeoConcavePolygon makeGeoConcavePolygon(final PlanetModel planetModel,
+  public static GeoPolygon makeGeoConcavePolygon(final PlanetModel planetModel,
                                                         final List<GeoPoint> pointList,
                                                         final List<GeoPolygon> holes) {
     return new GeoConcavePolygon(planetModel,pointList, holes);
@@ -122,9 +122,9 @@ public class GeoPolygonFactory {
    * @param pointList is a list of the GeoPoints to build an arbitrary polygon out of.
    * @param holes is a list of polygons representing "holes" in the outside polygon.  Holes describe the area outside
    *  each hole as being "in set".  Null == none.
-   * @return a GeoConvexPolygon corresponding to what was specified.
+   * @return a GeoPolygon corresponding to what was specified.
    */
-  public static GeoConvexPolygon makeGeoConvexPolygon(final PlanetModel planetModel,
+  public static GeoPolygon makeGeoConvexPolygon(final PlanetModel planetModel,
                                                       final List<GeoPoint> pointList,
                                                       final List<GeoPolygon> holes) {
     return new GeoConvexPolygon(planetModel,pointList, holes);


[29/38] lucene-solr:jira/solr-8668: SOLR-10504: Add documentation

Posted by cp...@apache.org.
SOLR-10504: Add documentation


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

Branch: refs/heads/jira/solr-8668
Commit: b0f44ad69129f0533317f5bcdd8d7dea1556cd8e
Parents: 4015397
Author: Joel Bernstein <jb...@apache.org>
Authored: Thu Jun 1 15:56:05 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Thu Jun 1 15:56:05 2017 -0400

----------------------------------------------------------------------
 solr/solr-ref-guide/src/stream-sources.adoc | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b0f44ad6/solr/solr-ref-guide/src/stream-sources.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-sources.adoc b/solr/solr-ref-guide/src/stream-sources.adoc
index ad91eb3..fcd006c 100644
--- a/solr/solr-ref-guide/src/stream-sources.adoc
+++ b/solr/solr-ref-guide/src/stream-sources.adoc
@@ -113,7 +113,14 @@ jdbc(
 ----
 
 == echo
-//TODO
+
+The `echo` function returns a single Tuple echoing its text parameter. `Echo` is the simplest stream source designed to provide text
+to a text analyzing stream decorator.
+
+[source,text]
+----
+echo("Hello world")
+----
 
 == facet
 


[37/38] lucene-solr:jira/solr-8668: LUCENE-7858: checkJavadocLinks.py to mention common root causes of broken links

Posted by cp...@apache.org.
LUCENE-7858: checkJavadocLinks.py to mention common root causes of broken links


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

Branch: refs/heads/jira/solr-8668
Commit: 445ceda01cb5355d4a21a095a19fe1af2b28959e
Parents: cccf97c
Author: Christine Poerschke <cp...@apache.org>
Authored: Fri Jun 2 10:40:53 2017 +0100
Committer: Christine Poerschke <cp...@apache.org>
Committed: Fri Jun 2 10:40:53 2017 +0100

----------------------------------------------------------------------
 dev-tools/scripts/checkJavadocLinks.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/445ceda0/dev-tools/scripts/checkJavadocLinks.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/checkJavadocLinks.py b/dev-tools/scripts/checkJavadocLinks.py
index e5ff2f3..2e3cdea 100644
--- a/dev-tools/scripts/checkJavadocLinks.py
+++ b/dev-tools/scripts/checkJavadocLinks.py
@@ -266,7 +266,10 @@ def checkAll(dirName):
 if __name__ == '__main__':
   if checkAll(sys.argv[1]):
     print()
-    print('Broken javadocs links were found!')
+    print('Broken javadocs links were found! Common root causes:')
+    # please feel free to add to this list
+    print('* A typo of some sort for manually created links.')
+    print('* Public methods referencing non-public classes in their signature.')
     sys.exit(1)
   sys.exit(0)
   


[05/38] lucene-solr:jira/solr-8668: LUCENE-7853: Add methods for people to use who know their polygon's characteristics

Posted by cp...@apache.org.
LUCENE-7853: Add methods for people to use who know their polygon's characteristics


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

Branch: refs/heads/jira/solr-8668
Commit: 71411df0cfec385fbd0fcd0f0291c6a06c05a428
Parents: fed7343
Author: Karl Wright <Da...@gmail.com>
Authored: Wed May 31 07:55:53 2017 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Wed May 31 07:55:53 2017 -0400

----------------------------------------------------------------------
 .../spatial3d/geom/GeoPolygonFactory.java       | 63 ++++++++++++++++++++
 .../lucene/spatial3d/geom/GeoPolygonTest.java   | 63 ++++++++++++++++++++
 2 files changed, 126 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/71411df0/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java
index 97bc230..4c1850e 100755
--- a/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java
+++ b/lucene/spatial3d/src/java/org/apache/lucene/spatial3d/geom/GeoPolygonFactory.java
@@ -49,6 +49,34 @@ public class GeoPolygonFactory {
     return makeGeoPolygon(planetModel, pointList, null);
   }
 
+  /** Create a GeoConcavePolygon using the specified points. The polygon must have
+   * a maximum extent larger than PI. The siding of the polygon is chosen so that any
+   * adjacent point to a segment provides an exterior measurement and therefore,
+   * the polygon is a truly concave polygon. Note that this method should only be used when there is certainty
+   * that we are dealing with a concave polygon, e.g. the polygon has been serialized.
+   * If there is not such certainty, please refer to @{@link GeoPolygonFactory#makeGeoPolygon(PlanetModel, List)}.
+   * @param pointList is a list of the GeoPoints to build an arbitrary polygon out of.
+   * @return a GeoConcavePolygon corresponding to what was specified.
+   */
+  public static GeoConcavePolygon makeGeoConcavePolygon(final PlanetModel planetModel,
+                                                        final List<GeoPoint> pointList) {
+    return new GeoConcavePolygon(planetModel, pointList);
+  }
+
+  /** Create a GeoConvexPolygon using the specified points. The polygon must have
+   * a maximum extent no larger than PI. The siding of the polygon is chosen so that any  adjacent
+   * point to a segment provides an interior measurement and therefore
+   * the polygon is a truly convex polygon. Note that this method should only be used when
+   * there is certainty that we are dealing with a convex polygon, e.g. the polygon has been serialized.
+   * If there is not such certainty, please refer to @{@link GeoPolygonFactory#makeGeoPolygon(PlanetModel, List)}.
+   * @param pointList is a list of the GeoPoints to build an arbitrary polygon out of.
+   * @return a GeoConvexPolygon corresponding to what was specified.
+   */
+  public static GeoConvexPolygon makeGeoConvexPolygon(final PlanetModel planetModel,
+                                                      final List<GeoPoint> pointList) {
+    return new GeoConvexPolygon(planetModel, pointList);
+  }
+
   /** Create a GeoPolygon using the specified points and holes, using order to determine 
    * siding of the polygon.  Much like ESRI, this method uses clockwise to indicate the space
    * on the same side of the shape as being inside, and counter-clockwise to indicate the
@@ -66,6 +94,41 @@ public class GeoPolygonFactory {
     final List<GeoPolygon> holes) {
     return makeGeoPolygon(planetModel, pointList, holes, 0.0);
   }
+
+
+  /** Create a GeoConcavePolygon using the specified points and holes. The polygon must have
+   * a maximum extent larger than PI. The siding of the polygon is chosen so that any  adjacent
+   * point to a segment provides an exterior measurement and therefore
+   * the polygon is a truly concave polygon. Note that this method should only be used when
+   * there is certainty that we are dealing with a concave polygon, e.g. the polygon has been serialized.
+   * If there is not such certainty, please refer to {@link GeoPolygonFactory#makeGeoPolygon(PlanetModel, List, List)}.
+   * @param pointList is a list of the GeoPoints to build an arbitrary polygon out of.
+   * @param holes is a list of polygons representing "holes" in the outside polygon.  Holes describe the area outside
+   *  each hole as being "in set".  Null == none.
+   * @return a GeoConcavePolygon corresponding to what was specified.
+   */
+  public static GeoConcavePolygon makeGeoConcavePolygon(final PlanetModel planetModel,
+                                                        final List<GeoPoint> pointList,
+                                                        final List<GeoPolygon> holes) {
+    return new GeoConcavePolygon(planetModel,pointList, holes);
+  }
+
+  /** Create a GeoConvexPolygon using the specified points and holes. The polygon must have
+   * a maximum extent no larger than PI. The siding of the polygon is chosen so that any adjacent
+   * point to a segment provides an interior measurement and therefore
+   * the polygon is a truly convex polygon. Note that this method should only be used when
+   * there is certainty that we are dealing with a convex polygon, e.g. the polygon has been serialized.
+   * If there is not such certainty, please refer to {@link GeoPolygonFactory#makeGeoPolygon(PlanetModel, List, List)}.
+   * @param pointList is a list of the GeoPoints to build an arbitrary polygon out of.
+   * @param holes is a list of polygons representing "holes" in the outside polygon.  Holes describe the area outside
+   *  each hole as being "in set".  Null == none.
+   * @return a GeoConvexPolygon corresponding to what was specified.
+   */
+  public static GeoConvexPolygon makeGeoConvexPolygon(final PlanetModel planetModel,
+                                                      final List<GeoPoint> pointList,
+                                                      final List<GeoPolygon> holes) {
+    return new GeoConvexPolygon(planetModel,pointList, holes);
+  }
   
   /** Create a GeoPolygon using the specified points and holes, using order to determine 
    * siding of the polygon.  Much like ESRI, this method uses clockwise to indicate the space

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/71411df0/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java
----------------------------------------------------------------------
diff --git a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java
index 8527e99..f3ac52b 100755
--- a/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java
+++ b/lucene/spatial3d/src/test/org/apache/lucene/spatial3d/geom/GeoPolygonTest.java
@@ -19,6 +19,7 @@ package org.apache.lucene.spatial3d.geom;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.BitSet;
+import java.util.Collections;
 
 import org.junit.Test;
 import static org.junit.Assert.assertEquals;
@@ -966,5 +967,67 @@ shape:
 
     assertTrue(solid.isWithin(point));
   }
+
+  @Test
+  public void testConcavePolygon() {
+    ArrayList<GeoPoint> points = new ArrayList<>();
+    points.add(new GeoPoint(PlanetModel.SPHERE, -0.1, -0.5));
+    points.add(new GeoPoint(PlanetModel.SPHERE, 0.0, -0.6));
+    points.add(new GeoPoint(PlanetModel.SPHERE, 0.1, -0.5));
+    points.add(new GeoPoint(PlanetModel.SPHERE, 0.0, -0.4));
+    GeoPolygon polygon = (GeoPolygon)((GeoCompositePolygon)GeoPolygonFactory.makeGeoPolygon(PlanetModel.SPHERE, points)).shapes.get(0);
+    GeoPolygon polygonConcave = GeoPolygonFactory.makeGeoConcavePolygon(PlanetModel.SPHERE,points);
+    assertEquals(polygon,polygonConcave);
+  }
+
+  @Test
+  public void testConcavePolygonWithHole() {
+    ArrayList<GeoPoint> points = new ArrayList<>();
+    points.add(new GeoPoint(PlanetModel.SPHERE, -1.1, -1.5));
+    points.add(new GeoPoint(PlanetModel.SPHERE, 1.0, -1.6));
+    points.add(new GeoPoint(PlanetModel.SPHERE, 1.1, -1.5));
+    points.add(new GeoPoint(PlanetModel.SPHERE, 1.0, -1.4));
+    ArrayList<GeoPoint> hole_points = new ArrayList<>();
+    hole_points.add(new GeoPoint(PlanetModel.SPHERE, -0.1, -0.5));
+    hole_points.add(new GeoPoint(PlanetModel.SPHERE, 0.0, -0.6));
+    hole_points.add(new GeoPoint(PlanetModel.SPHERE, 0.1, -0.5));
+    hole_points.add(new GeoPoint(PlanetModel.SPHERE, 0.0, -0.4));
+    GeoPolygon hole = GeoPolygonFactory.makeGeoPolygon(PlanetModel.SPHERE,hole_points);
+
+    GeoPolygon polygon = (GeoPolygon)((GeoCompositePolygon)GeoPolygonFactory.makeGeoPolygon(PlanetModel.SPHERE, points,Collections.singletonList(hole))).shapes.get(0);
+    GeoPolygon polygon2 = GeoPolygonFactory.makeGeoConcavePolygon(PlanetModel.SPHERE,points,Collections.singletonList(hole));
+    assertEquals(polygon,polygon2);
+  }
+
+  @Test
+  public void testConvexPolygon() {
+    ArrayList<GeoPoint> points = new ArrayList<>();
+    points.add(new GeoPoint(PlanetModel.SPHERE, 0, 0));
+    points.add(new GeoPoint(PlanetModel.SPHERE, 0.0, 0.5));
+    points.add(new GeoPoint(PlanetModel.SPHERE, 0.5, 0.5));
+    points.add(new GeoPoint(PlanetModel.SPHERE, 0.5, 0));
+    GeoPolygon polygon = (GeoPolygon)((GeoCompositePolygon)GeoPolygonFactory.makeGeoPolygon(PlanetModel.SPHERE, points)).shapes.get(0);
+    GeoPolygon polygon2 = GeoPolygonFactory.makeGeoConvexPolygon(PlanetModel.SPHERE,points);
+    assertEquals(polygon,polygon2);
+  }
+
+  @Test
+  public void testConvexPolygonWithHole() {
+    ArrayList<GeoPoint> points = new ArrayList<>();
+    points.add(new GeoPoint(PlanetModel.SPHERE, -1, -1));
+    points.add(new GeoPoint(PlanetModel.SPHERE, -1, 1));
+    points.add(new GeoPoint(PlanetModel.SPHERE, 1, 1));
+    points.add(new GeoPoint(PlanetModel.SPHERE, 1, -1));
+    ArrayList<GeoPoint> hole_points = new ArrayList<>();
+    hole_points.add(new GeoPoint(PlanetModel.SPHERE, -0.1, -0.5));
+    hole_points.add(new GeoPoint(PlanetModel.SPHERE, 0.0, -0.6));
+    hole_points.add(new GeoPoint(PlanetModel.SPHERE, 0.1, -0.5));
+    hole_points.add(new GeoPoint(PlanetModel.SPHERE, 0.0, -0.4));
+    GeoPolygon hole = GeoPolygonFactory.makeGeoPolygon(PlanetModel.SPHERE,hole_points);
+
+    GeoPolygon polygon = (GeoPolygon)((GeoCompositePolygon)GeoPolygonFactory.makeGeoPolygon(PlanetModel.SPHERE, points,Collections.singletonList(hole))).shapes.get(0);
+    GeoPolygon polygon2 = GeoPolygonFactory.makeGeoConvexPolygon(PlanetModel.SPHERE,points,Collections.singletonList(hole));
+    assertEquals(polygon,polygon2);
+  }
   
 }


[19/38] lucene-solr:jira/solr-8668: SOLR-10137: Ensure that ConfigSets created via API are mutable.

Posted by cp...@apache.org.
SOLR-10137: Ensure that ConfigSets created via API are mutable.


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

Branch: refs/heads/jira/solr-8668
Commit: 7da9e9d7352083060d45c1a10430a3a17fdeefbe
Parents: f34155f
Author: Mark Miller <ma...@apache.org>
Authored: Wed May 31 17:44:00 2017 -0400
Committer: Mark Miller <ma...@apache.org>
Committed: Wed May 31 17:44:08 2017 -0400

----------------------------------------------------------------------
 solr/CHANGES.txt                                                 | 2 ++
 .../java/org/apache/solr/handler/admin/ConfigSetsHandler.java    | 4 ++++
 .../src/test/org/apache/solr/handler/admin/TestConfigsApi.java   | 2 +-
 3 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7da9e9d7/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index a2dc820..98f3ec2 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -252,6 +252,8 @@ Bug Fixes
 
 * SOLR-10360: Solr HDFS snapshot export fails due to FileNotFoundException error when using MR1 instead of
   yarn. (Hrishikesh via Mark Miller)
+  
+* SOLR-10137: Ensure that ConfigSets created via API are mutable. (Hrishikesh via Mark Miller)
 
 Optimizations
 ----------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7da9e9d7/solr/core/src/java/org/apache/solr/handler/admin/ConfigSetsHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/ConfigSetsHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/ConfigSetsHandler.java
index 3f857e7..34313d0 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/ConfigSetsHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/ConfigSetsHandler.java
@@ -238,6 +238,10 @@ public class ConfigSetsHandler extends RequestHandlerBase implements PermissionN
         props.put(param, params.get(param));
       }
     }
+
+    // The configset created via an API should be mutable.
+    props.put("immutable", "false");
+
     return props;
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7da9e9d7/solr/core/src/test/org/apache/solr/handler/admin/TestConfigsApi.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/TestConfigsApi.java b/solr/core/src/test/org/apache/solr/handler/admin/TestConfigsApi.java
index d2c96a6..c0c193d 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/TestConfigsApi.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/TestConfigsApi.java
@@ -54,6 +54,6 @@ public class TestConfigsApi extends SolrTestCaseJ4 {
         "{name :sample, operation:delete}");
 
     compareOutput(apiBag, "/cluster/configs", POST, "{create:{name : newconf, baseConfigSet: sample }}", null,
-        "{operation:create, name :newconf,  baseConfigSet: sample }");
+        "{operation:create, name :newconf,  baseConfigSet: sample, immutable: false }");
   }
 }


[16/38] lucene-solr:jira/solr-8668: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/lucene-solr

Posted by cp...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/lucene-solr


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

Branch: refs/heads/jira/solr-8668
Commit: 3291ef884d26e3f8cb43707f2acdf674f3e51c01
Parents: 08ea9a7 872b0db
Author: Karl Wright <Da...@gmail.com>
Authored: Wed May 31 15:04:40 2017 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Wed May 31 15:04:40 2017 -0400

----------------------------------------------------------------------
 solr/CHANGES.txt                                |   5 +
 .../solr/core/snapshots/SolrSnapshotsTool.java  |   7 +-
 .../AbstractCloudBackupRestoreTestCase.java     |  11 +-
 .../CollectionsAPIAsyncDistributedZkTest.java   |  62 +-
 .../solr/cloud/CollectionsAPISolrJTest.java     |  12 +-
 ...ConcurrentDeleteAndCreateCollectionTest.java |  12 +-
 .../org/apache/solr/cloud/DeleteStatusTest.java |  23 -
 .../org/apache/solr/cloud/ForceLeaderTest.java  |  25 +-
 .../cloud/FullSolrCloudDistribCmdsTest.java     |  16 +-
 .../apache/solr/cloud/HttpPartitionTest.java    |  36 +-
 .../cloud/LeaderFailoverAfterPartitionTest.java |  10 +-
 .../LeaderInitiatedRecoveryOnCommitTest.java    |  19 +-
 .../apache/solr/cloud/MultiThreadedOCPTest.java |  63 +-
 .../org/apache/solr/cloud/ReplaceNodeTest.java  |   4 +-
 .../solr/cloud/ReplicationFactorTest.java       |   4 +-
 .../apache/solr/cloud/RollingRestartTest.java   |   2 +-
 .../org/apache/solr/cloud/ShardSplitTest.java   |   8 +-
 .../cloud/SharedFSAutoReplicaFailoverTest.java  |  24 +-
 .../cloud/SimpleCollectionCreateDeleteTest.java |  13 +-
 .../apache/solr/cloud/TestCollectionAPI.java    |  24 +-
 .../cloud/TestRandomRequestDistribution.java    |  15 +-
 .../solr/cloud/TestRequestForwarding.java       |   6 +-
 .../cloud/TestSolrCloudWithKerberosAlt.java     |   9 +-
 .../TestSolrCloudWithSecureImpersonation.java   |   6 +-
 .../apache/solr/handler/TestBlobHandler.java    |  10 +-
 .../solr/search/stats/TestDistribIDF.java       |  13 +-
 .../scripts/cloud-scripts/snapshotscli.sh       |   2 +-
 solr/solr-ref-guide/src/codec-factory.adoc      |  24 +-
 solr/solr-ref-guide/src/coreadmin-api.adoc      |   2 +-
 solr/solr-ref-guide/src/enabling-ssl.adoc       |   2 +-
 solr/solr-ref-guide/src/format-of-solr-xml.adoc |  24 +-
 .../src/solr-control-script-reference.adoc      |  11 +-
 .../solrj/request/CollectionAdminRequest.java   | 844 ++-----------------
 ...ollectionAdminRequestRequiredParamsTest.java | 137 +--
 .../request/TestCollectionAdminRequest.java     |  84 +-
 .../cloud/AbstractFullDistribZkTestBase.java    |  23 +-
 36 files changed, 362 insertions(+), 1230 deletions(-)
----------------------------------------------------------------------



[13/38] lucene-solr:jira/solr-8668: Ref Guide: fix format issues and inconsistencies

Posted by cp...@apache.org.
Ref Guide: fix format issues and inconsistencies


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

Branch: refs/heads/jira/solr-8668
Commit: 52c27b4ed309067086d01f5eb272b90982990953
Parents: 7a5261a
Author: Cassandra Targett <ct...@apache.org>
Authored: Wed May 31 12:27:00 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Wed May 31 12:27:52 2017 -0500

----------------------------------------------------------------------
 solr/solr-ref-guide/src/format-of-solr-xml.adoc | 24 ++++++++++----------
 1 file changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/52c27b4e/solr/solr-ref-guide/src/format-of-solr-xml.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/format-of-solr-xml.adoc b/solr/solr-ref-guide/src/format-of-solr-xml.adoc
index 97d6f36..4e55033 100644
--- a/solr/solr-ref-guide/src/format-of-solr-xml.adoc
+++ b/solr/solr-ref-guide/src/format-of-solr-xml.adoc
@@ -25,7 +25,7 @@ This section will describe the default `solr.xml` file included with Solr and ho
 [[Formatofsolr.xml-Definingsolr.xml]]
 == Defining solr.xml
 
-You can find `solr.xml` in your Solr Home directory or in Zookeeper. The default `solr.xml` file looks like this:
+You can find `solr.xml` in your `$SOLR_HOME` directory (usually `server/solr`) in standalone mode or in Zookeeper when using SolrCloud. The default `solr.xml` file looks like this:
 
 [source,xml]
 ----
@@ -66,17 +66,17 @@ There are no attributes that you can specify in the `<solr>` tag, which is the r
 |`collectionsHandler` |As above, for custom CollectionsHandler implementations.
 | `infoHandler` |As above, for custom InfoHandler implementations.
 |`coreLoadThreads` |Specifies the number of threads that will be assigned to load cores in parallel.
-|`coreRootDirectory` |The root of the core discovery tree, defaults to SOLR_HOME.
+|`coreRootDirectory` |The root of the core discovery tree, defaults to `$SOLR_HOME`.
 |`managementPath` |Currently non-operational.
-|`sharedLib` |Specifies the path to a common library directory that will be shared across all cores. Any JAR files in this directory will be added to the search path for Solr plugins. This path is relative to the top-level container's Solr Home. Custom handlers may be placed in this directory
+|`sharedLib` |Specifies the path to a common library directory that will be shared across all cores. Any JAR files in this directory will be added to the search path for Solr plugins. This path is relative to `$SOLR_HOME`. Custom handlers may be placed in this directory.
 |`shareSchema` |This attribute, when set to true, ensures that the multiple cores pointing to the same Schema resource file will be referring to the same IndexSchema Object. Sharing the IndexSchema Object makes loading the core faster. If you use this feature, make sure that no core-specific property is used in your Schema file.
 |`transientCacheSize` |Defines how many cores with transient=true that can be loaded before swapping the least recently used core for a new core.
-|`configSetBaseDir` |The directory under which configsets for solr cores can be found. Defaults to SOLR_HOME/configsets
+|`configSetBaseDir` |The directory under which configsets for Solr cores can be found. Defaults to `$SOLR_HOME/configsets`.
 |===
 
-==== The `<solrcloud>` element
+==== The `<solrcloud>` Element
 
-This element defines several parameters that relate so SolrCloud. This section is ignored unless the solr instance is started with either `-DzkRun` or `-DzkHost`
+This element defines several parameters that relate so SolrCloud. This section is ignored unless theSolr instance is started with either `-DzkRun` or `-DzkHost`
 
 // TODO: Change column width to %autowidth.spread when https://github.com/asciidoctor/asciidoctor-pdf/issues/599 is fixed
 
@@ -96,18 +96,18 @@ This element defines several parameters that relate so SolrCloud. This section i
 |`zkCredentialsProvider` & ` zkACLProvider` |Optional parameters that can be specified if you are using <<zookeeper-access-control.adoc#zookeeper-access-control,ZooKeeper Access Control>>.
 |===
 
-==== The `<logging>` element
+==== The `<logging>` Element
 
 // TODO: Change column width to %autowidth.spread when https://github.com/asciidoctor/asciidoctor-pdf/issues/599 is fixed
 
 [cols="30,70",options="header"]
 |===
 |Node |Description
-|`class` |The class to use for logging. The corresponding JAR file must be available to solr, perhaps through a `<lib>` directive in solrconfig.xml.
+|`class` |The class to use for logging. The corresponding JAR file must be available to Solr, perhaps through a `<lib>` directive in `solrconfig.xml`.
 |`enabled` |true/false - whether to enable logging or not.
 |===
 
-===== The `<logging><watcher>` element
+===== The `<logging><watcher>` Element
 
 // TODO: Change column width to %autowidth.spread when https://github.com/asciidoctor/asciidoctor-pdf/issues/599 is fixed
 
@@ -118,7 +118,7 @@ This element defines several parameters that relate so SolrCloud. This section i
 |`threshold` |The logging level above which your particular logging implementation will record. For example when using log4j one might specify DEBUG, WARN, INFO, etc.
 |===
 
-==== The `<shardHandlerFactory>` element
+==== The `<shardHandlerFactory>` Element
 
 Custom shard handlers can be defined in `solr.xml` if you wish to create a custom shard handler.
 
@@ -134,8 +134,8 @@ Since this is a custom shard handler, sub-elements are specific to the implement
 [cols="30,70",options="header"]
 |===
 |Node |Description
-|`socketTimeout` |The read timeout for intra-cluster query and administrative requests. The default is the same as the distribUpdateSoTimeout specified in the solrcloud section.
-|`connTimeout` |The connection timeout for intra-cluster query and administrative requests. Defaults to the distribUpdateConnTimeout specified in the solrcloud section
+|`socketTimeout` |The read timeout for intra-cluster query and administrative requests. The default is the same as the `distribUpdateSoTimeout` specified in the `<solrcloud>` section.
+|`connTimeout` |The connection timeout for intra-cluster query and administrative requests. Defaults to the `distribUpdateConnTimeout` specified in the `<solrcloud>` section
 |`urlScheme` |URL scheme to be used in distributed search
 |`maxConnectionsPerHost` |Maximum connections allowed per host. Defaults to 20
 |`maxConnections` |Maximum total connections allowed. Defaults to 10000


[28/38] lucene-solr:jira/solr-8668: SOLR-10426: Add documentation

Posted by cp...@apache.org.
SOLR-10426: Add documentation


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

Branch: refs/heads/jira/solr-8668
Commit: 401539758b34279d98c9d25d844ed9435925e938
Parents: 0e7207b
Author: Joel Bernstein <jb...@apache.org>
Authored: Thu Jun 1 15:35:10 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Thu Jun 1 15:35:29 2017 -0400

----------------------------------------------------------------------
 solr/solr-ref-guide/src/stream-sources.adoc | 25 +++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/40153975/solr/solr-ref-guide/src/stream-sources.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-sources.adoc b/solr/solr-ref-guide/src/stream-sources.adoc
index 7d3a2e2..ad91eb3 100644
--- a/solr/solr-ref-guide/src/stream-sources.adoc
+++ b/solr/solr-ref-guide/src/stream-sources.adoc
@@ -327,7 +327,30 @@ The expression above performs a breadth-first search to find the shortest paths
 The search starts from the nodeID "\john@company.com" in the `from_address` field and searches for the nodeID "\jane@company.com" in the `to_address` field. This search is performed iteratively until the `maxDepth` has been reached. Each level in the traversal is implemented as a parallel partitioned nested loop join across the entire collection. The `threads` parameter controls the number of threads performing the join at each level, while the `partitionSize` parameter controls the of number of nodes in each join partition. The `maxDepth` parameter controls the number of levels to traverse. `fq` is a limiting query applied to each level in the traversal.
 
 == shuffle
-//TODO
+
+The `shuffle` expression sorts and exports entire result sets. The `shuffle` expression is similar to the `search` expression except that
+under the covers `shuffle` always uses the /export handler. The `shuffle` expression is designed to be combined with the relational algebra
+decorators that require complete, sorted result sets. Shuffled result sets can be partitioned across worker nodes with the parallel
+stream decorator to perform parallel relational algebra. When used in parallel mode the partitionKeys parameter must be provided.
+
+=== shuffle Parameters
+
+* `collection`: (Mandatory) the collection being searched.
+* `q`: (Mandatory) The query to perform on the Solr index.
+* `fl`: (Mandatory) The list of fields to return.
+* `sort`: (Mandatory) The sort criteria.
+* `zkHost`: Only needs to be defined if the collection being searched is found in a different zkHost than the local stream handler.
+* `partitionKeys`: Comma delimited list of keys to partition the search results by. To be used with the parallel function for parallelizing operations across worker nodes. See the <<stream-decorators.adoc#parallel,parallel>> function for details.
+
+=== shuffle Syntax
+
+[source,text]
+----
+shuffle(collection1,
+        q="*:*",
+        fl="id,a_s,a_i,a_f",
+        sort="a_f asc, a_i asc")
+----
 
 == stats
 


[30/38] lucene-solr:jira/solr-8668: SOLR-10504: Add documentation

Posted by cp...@apache.org.
SOLR-10504: Add documentation


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

Branch: refs/heads/jira/solr-8668
Commit: 71b5d342fdb914524db7bbc1ca770a81c636293f
Parents: b0f44ad
Author: Joel Bernstein <jb...@apache.org>
Authored: Thu Jun 1 15:59:24 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Thu Jun 1 15:59:24 2017 -0400

----------------------------------------------------------------------
 solr/solr-ref-guide/src/stream-sources.adoc | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/71b5d342/solr/solr-ref-guide/src/stream-sources.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-sources.adoc b/solr/solr-ref-guide/src/stream-sources.adoc
index fcd006c..e7356ae 100644
--- a/solr/solr-ref-guide/src/stream-sources.adoc
+++ b/solr/solr-ref-guide/src/stream-sources.adoc
@@ -117,6 +117,8 @@ jdbc(
 The `echo` function returns a single Tuple echoing its text parameter. `Echo` is the simplest stream source designed to provide text
 to a text analyzing stream decorator.
 
+=== echo Syntax
+
 [source,text]
 ----
 echo("Hello world")


[12/38] lucene-solr:jira/solr-8668: Ref Guide: remove lingering references to "example Jetty" and "your container"

Posted by cp...@apache.org.
Ref Guide: remove lingering references to "example Jetty" and "your container"


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

Branch: refs/heads/jira/solr-8668
Commit: d148bd4e9ea7bf3d117cc46b6576f824b79c39d9
Parents: 52c27b4
Author: Cassandra Targett <ct...@apache.org>
Authored: Wed May 31 12:27:28 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Wed May 31 12:27:52 2017 -0500

----------------------------------------------------------------------
 solr/solr-ref-guide/src/coreadmin-api.adoc | 2 +-
 solr/solr-ref-guide/src/enabling-ssl.adoc  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d148bd4e/solr/solr-ref-guide/src/coreadmin-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/coreadmin-api.adoc b/solr/solr-ref-guide/src/coreadmin-api.adoc
index 3624c52..a2e3aa3 100644
--- a/solr/solr-ref-guide/src/coreadmin-api.adoc
+++ b/solr/solr-ref-guide/src/coreadmin-api.adoc
@@ -119,7 +119,7 @@ The RELOAD action loads a new core from the configuration of an existing, regist
 
 `admin/cores?action=RELOAD&core=_core-name_`
 
-This is useful when you've made changes to a Solr core's configuration on disk, such as adding new field definitions. Calling the RELOAD action lets you apply the new configuration without having to restart the Web container.
+This is useful when you've made changes to a Solr core's configuration on disk, such as adding new field definitions. Calling the RELOAD action lets you apply the new configuration without having to restart Solr.
 
 [IMPORTANT]
 ====

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d148bd4e/solr/solr-ref-guide/src/enabling-ssl.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/enabling-ssl.adoc b/solr/solr-ref-guide/src/enabling-ssl.adoc
index 87394ee..ec6b59d 100644
--- a/solr/solr-ref-guide/src/enabling-ssl.adoc
+++ b/solr/solr-ref-guide/src/enabling-ssl.adoc
@@ -20,7 +20,7 @@
 
 Solr can encrypt communications to and from clients, and between nodes in SolrCloud mode, with SSL.
 
-This section describes enabling SSL with the example Jetty server using a self-signed certificate.
+This section describes enabling SSL using a self-signed certificate.
 
 For background on SSL certificates and keys, see http://www.tldp.org/HOWTO/SSL-Certificates-HOWTO/.
 


[27/38] lucene-solr:jira/solr-8668: Ref Guide: fix bad bullet item from conversion

Posted by cp...@apache.org.
Ref Guide: fix bad bullet item from conversion


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

Branch: refs/heads/jira/solr-8668
Commit: 0e7207b9a78c1e1ace1d9ec8df55b8516c161e38
Parents: fb3d3f1
Author: Cassandra Targett <ct...@apache.org>
Authored: Thu Jun 1 13:02:41 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Thu Jun 1 13:02:41 2017 -0500

----------------------------------------------------------------------
 solr/solr-ref-guide/src/the-extended-dismax-query-parser.adoc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0e7207b9/solr/solr-ref-guide/src/the-extended-dismax-query-parser.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/the-extended-dismax-query-parser.adoc b/solr/solr-ref-guide/src/the-extended-dismax-query-parser.adoc
index 6f7cf89..fff5909 100644
--- a/solr/solr-ref-guide/src/the-extended-dismax-query-parser.adoc
+++ b/solr/solr-ref-guide/src/the-extended-dismax-query-parser.adoc
@@ -24,7 +24,8 @@ In addition to supporting all the DisMax query parser parameters, Extended Disma
 
 * supports the <<the-standard-query-parser.adoc#the-standard-query-parser,full Lucene query parser syntax>>.
 * supports queries such as AND, OR, NOT, -, and +.
-* treats "and" and "or" as "AND" and "OR" in Lucene syntax mode.respects the 'magic field' names `\_val_` and `\_query_`. These are not a real fields in the Schema, but if used it helps do special things (like a function query in the case of `\_val_` or a nested query in the case of `\_query_`). If `\_val_` is used in a term or phrase query, the value is parsed as a function.
+* treats "and" and "or" as "AND" and "OR" in Lucene syntax mode.
+* respects the 'magic field' names `\_val_` and `\_query_`. These are not a real fields in the Schema, but if used it helps do special things (like a function query in the case of `\_val_` or a nested query in the case of `\_query_`). If `\_val_` is used in a term or phrase query, the value is parsed as a function.
 * includes improved smart partial escaping in the case of syntax errors; fielded queries, +/-, and phrase queries are still supported in this mode.
 * improves proximity boosting by using word shingles; you do not need the query to match all words in the document before proximity boosting is applied.
 * includes advanced stopword handling: stopwords are not required in the mandatory part of the query but are still used in the proximity boosting part. If a query consists of all stopwords, such as "to be or not to be", then all words are required.


[09/38] lucene-solr:jira/solr-8668: SOLR-10757: delete/refactor/cleanup CollectionAdminRequest deprecations

Posted by cp...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
index 6c00b5c..b3d8a3f 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CollectionAdminRequest.java
@@ -33,7 +33,6 @@ import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.response.CollectionAdminResponse;
 import org.apache.solr.client.solrj.response.RequestStatusState;
 import org.apache.solr.client.solrj.util.SolrIdentifierValidator;
-import org.apache.solr.common.SolrException;
 import org.apache.solr.common.cloud.DocCollection;
 import org.apache.solr.common.cloud.ImplicitDocRouter;
 import org.apache.solr.common.cloud.Replica;
@@ -68,14 +67,11 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
   public CollectionAdminRequest(String path, CollectionAction action) {
     super(METHOD.GET, path);
-    this.action = action;
+    this.action = checkNotNull("action", action);
   }
 
   @Override
   public SolrParams getParams() {
-    if (action == null) {
-      throw new RuntimeException( "no action specified!" );
-    }
     ModifiableSolrParams params = new ModifiableSolrParams();
     params.set(CoreAdminParams.ACTION, action.toString());
     return params;
@@ -117,12 +113,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     }
 
     /**
-     * @deprecated Use {@link #processAsync(String, SolrClient)} or {@link #processAsync(SolrClient)}
-     */
-    @Deprecated
-    public  AsyncCollectionAdminRequest setAsyncId(String id){return this;};
-
-    /**
      * Process this request asynchronously, generating and returning a request id
      * @param client a Solr client
      * @return the request id
@@ -189,12 +179,9 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
     public AsyncCollectionSpecificAdminRequest(CollectionAction action, String collection) {
       super(action);
-      this.collection = collection;
+      this.collection = checkNotNull("collection", collection);
     }
 
-    @Deprecated
-    public abstract AsyncCollectionSpecificAdminRequest setCollectionName(String collection);
-
     public String getCollectionName() {
       return collection;
     }
@@ -202,8 +189,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
-      if (collection == null)
-        throw new IllegalArgumentException("You must call setCollectionName() on this request");
       params.set(CoreAdminParams.NAME, collection);
       return params;
     }
@@ -216,23 +201,13 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
     public AsyncShardSpecificAdminRequest(CollectionAction action, String collection, String shard) {
       super(action);
-      this.collection = collection;
-      this.shard = shard;
+      this.collection = checkNotNull("collection",collection);
+      this.shard = checkNotNull("shard",shard);
     }
 
-    @Deprecated
-    public abstract AsyncShardSpecificAdminRequest setCollectionName(String collection);
-
-    @Deprecated
-    public abstract AsyncShardSpecificAdminRequest setShardName(String shard);
-
     @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
-      if (collection == null)
-        throw new IllegalArgumentException("You must call setCollectionName() on this request");
-      if (shard == null)
-        throw new IllegalArgumentException("You must call setShardName() on this request");
       params.set(CoreAdminParams.COLLECTION, collection);
       params.set(CoreAdminParams.SHARD, shard);
       return params;
@@ -246,21 +221,14 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
     public ShardSpecificAdminRequest(CollectionAction action, String collection, String shard) {
       super(action);
+      this.collection = checkNotNull("collection",collection);
+      this.shard = checkNotNull("shard",shard);
     }
 
-    @Deprecated
-    public abstract ShardSpecificAdminRequest setCollectionName(String collection);
-
-    @Deprecated
-    public abstract ShardSpecificAdminRequest setShardName(String shard);
 
     @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
-      if (collection == null)
-        throw new IllegalArgumentException("You must call setCollectionName() on this request");
-      if (shard == null)
-        throw new IllegalArgumentException("You must call setShardName() on this request");
       params.set(CoreAdminParams.COLLECTION, collection);
       params.set(CoreAdminParams.SHARD, shard);
       return params;
@@ -284,26 +252,14 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
     public CollectionAdminRoleRequest(CollectionAction action, String node, String role) {
       super(action);
-      this.node = node;
-      this.role = role;
-    }
-
-    @Override
-    public CollectionAdminRoleRequest setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
+      this.role = checkNotNull("role",role);
+      this.node = checkNotNull("node",node);
     }
 
-    @Deprecated
-    public abstract CollectionAdminRoleRequest setNode(String node);
-
     public String getNode() {
       return this.node;
     }
 
-    @Deprecated
-    public abstract CollectionAdminRoleRequest setRole(String role);
-
     public String getRole() {
       return this.role;
     }
@@ -341,7 +297,7 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
    * @param numReplicas the replication factor of the collection (same as numNrtReplicas)
    */
   public static Create createCollection(String collection, String config, int numShards, int numReplicas) {
-    return new Create(collection, config, numShards, numReplicas, 0, 0);
+    return new Create(collection, config, numShards, numReplicas, null, null);
   }
 
   /**
@@ -379,10 +335,7 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
    * @param numPullReplicas the number of replicas of type {@link org.apache.solr.common.cloud.Replica.Type#PULL}
    */
   public static Create createCollectionWithImplicitRouter(String collection, String config, String shards, int numNrtReplicas, int numTlogReplicas, int numPullReplicas) {
-    Create createRequest = new Create(collection, config, shards, numNrtReplicas);
-    createRequest.tlogReplicas = numTlogReplicas;
-    createRequest.pullReplicas = numPullReplicas;
-    return createRequest;
+    return new Create(collection, config, ImplicitDocRouter.NAME, null, checkNotNull("shards",shards), numNrtReplicas, numTlogReplicas, numPullReplicas);
   }
 
   // CREATE request
@@ -404,38 +357,34 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     protected Integer stateFormat;
     private String[] rule , snitch;
 
-    /**
-     * @deprecated Use {@link #createCollection(String, String, int, int, int, int)}
-     */
-    @Deprecated
-    public Create() {
-      super(CollectionAction.CREATE, null);
+    /** Constructor intended for typical use cases */
+    protected Create(String collection, String config, Integer numShards, Integer numNrtReplicas, Integer numTlogReplicas, Integer numPullReplicas) { // TODO: maybe add other constructors
+      this(collection, config, null, numShards, null, numNrtReplicas, numTlogReplicas, numPullReplicas);
+    }
+
+    /** Constructor that assumes {@link ImplicitDocRouter#NAME} and an explicit list of <code>shards</code> */
+    protected Create(String collection, String config, String shards, int numNrtReplicas) {
+      this(collection, config, ImplicitDocRouter.NAME, null, checkNotNull("shards",shards), numNrtReplicas, null, null);
     }
     
-    private Create(String collection, String config, int numShards, int numNrtReplicas, int numTlogReplicas, int numPullReplicas) { // TODO: maybe add other constructors
+    private Create(String collection, String config, String routerName, Integer numShards, String shards, Integer numNrtReplicas, Integer  numTlogReplicas, Integer numPullReplicas) {
       super(CollectionAction.CREATE, SolrIdentifierValidator.validateCollectionName(collection));
+      // NOTE: there's very little we can assert about the args because nothing but "collection" is required by the server
+      if ((null != shards) && (null != numShards)) {
+        throw new IllegalArgumentException("Can not specify both a numShards and a list of shards");
+      }
       this.configName = config;
+      this.routerName = routerName;
       this.numShards = numShards;
+      this.setShards(shards);
       this.nrtReplicas = numNrtReplicas;
-      this.pullReplicas = numPullReplicas;
       this.tlogReplicas = numTlogReplicas;
+      this.pullReplicas = numPullReplicas;
     }
 
-    private Create(String collection, String config, String shards, int numNrtReplicas) {
-      super(CollectionAction.CREATE, SolrIdentifierValidator.validateCollectionName(collection));
-      this.configName = config;
-      this.nrtReplicas = numNrtReplicas;
-      this.shards = shards;
-      this.routerName = ImplicitDocRouter.NAME;
-    }
-
-    @Deprecated
-    public Create setConfigName(String config) { this.configName = config; return this; }
     public Create setCreateNodeSet(String nodeSet) { this.createNodeSet = nodeSet; return this; }
     public Create setRouterName(String routerName) { this.routerName = routerName; return this; }
     public Create setRouterField(String routerField) { this.routerField = routerField; return this; }
-    @Deprecated
-    public Create setNumShards(Integer numShards) {this.numShards = numShards; return this; }
     public Create setMaxShardsPerNode(Integer numShards) { this.maxShardsPerNode = numShards; return this; }
     public Create setAutoAddReplicas(boolean autoAddReplicas) { this.autoAddReplicas = autoAddReplicas; return this; }
     public Create setNrtReplicas(Integer nrtReplicas) { this.nrtReplicas = nrtReplicas; return this;}
@@ -470,33 +419,15 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
      * @throws IllegalArgumentException if any of the shard names contain invalid characters.
      */
     public Create setShards(String shards) {
-      for (String shard : shards.split(",")) {
-        SolrIdentifierValidator.validateShardName(shard);
+      if (null != shards) {
+        for (String shard : shards.split(",")) {
+          SolrIdentifierValidator.validateShardName(shard);
+        }
       }
       this.shards = shards;
       return this;
     }
     
-    /**
-     * Provide the name of the collection to be created.
-     * 
-     * Collection names must consist entirely of periods, underscores and alphanumerics.  Other characters are not allowed.
-     * 
-     * @throws IllegalArgumentException if the collection name contains invalid characters.
-     */
-    @Deprecated
-    public Create setCollectionName(String collectionName) throws SolrException {
-      this.collection = SolrIdentifierValidator.validateCollectionName(collectionName);
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public Create setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
-
     public Properties getProperties() {
       return properties;
     }
@@ -576,31 +507,9 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
   // RELOAD request
   public static class Reload extends AsyncCollectionSpecificAdminRequest {
 
-    /**
-     * @deprecated use {@link #reloadCollection(String)}
-     */
-    @Deprecated
-    public Reload() {
-      super(CollectionAction.RELOAD, null);
-    }
-
     private Reload(String collection) {
       super(CollectionAction.RELOAD, collection);
     }
-
-    @Override
-    @Deprecated
-    public Reload setCollectionName(String collection) {
-      this.collection = collection;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public Reload setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
   }
 
   public static class DeleteNode extends AsyncCollectionAdminRequest {
@@ -611,7 +520,7 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
      */
     public DeleteNode(String node) {
       super(CollectionAction.DELETENODE);
-      this.node = node;
+      this.node = checkNotNull("node",node);
     }
     @Override
     public SolrParams getParams() {
@@ -633,8 +542,8 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
      */
     public ReplaceNode(String source, String target) {
       super(CollectionAction.REPLACENODE);
-      this.source = source;
-      this.target = target;
+      this.source = checkNotNull("source",source);
+      this.target = checkNotNull("target",target);
     }
 
     public ReplaceNode setParallel(Boolean flag) {
@@ -660,18 +569,18 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
     public MoveReplica(String collection, String replica, String targetNode) {
       super(CollectionAction.MOVEREPLICA);
-      this.collection = collection;
-      this.replica = replica;
-      this.targetNode = targetNode;
+      this.collection = checkNotNull("collection",collection);
+      this.replica = checkNotNull("replica",replica);
+      this.targetNode = checkNotNull("targetNode",targetNode);
       this.randomlyMoveReplica = false;
     }
 
     public MoveReplica(String collection, String shard, String fromNode, String targetNode) {
       super(CollectionAction.MOVEREPLICA);
-      this.collection = collection;
-      this.shard = shard;
-      this.fromNode = fromNode;
-      this.targetNode = targetNode;
+      this.collection = checkNotNull("collection",collection);
+      this.shard = checkNotNull("shard",shard);
+      this.fromNode = checkNotNull("fromNode",fromNode);
+      this.targetNode = checkNotNull("targetNode",targetNode);
       this.randomlyMoveReplica = true;
     }
 
@@ -724,13 +633,7 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
     public RebalanceLeaders(String collection) {
       super(CollectionAction.REBALANCELEADERS);
-      this.collection = collection;
-    }
-
-    @Override
-    public RebalanceLeaders setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
+      this.collection = checkNotNull("collection",collection);
     }
 
     @Override
@@ -762,31 +665,10 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
   // DELETE request
   public static class Delete extends AsyncCollectionSpecificAdminRequest {
 
-    /**
-     * @deprecated Use {@link #deleteCollection(String)}
-     */
-    @Deprecated
-    public Delete() {
-      super(CollectionAction.DELETE, null);
-    }
-
     private Delete(String collection) {
       super(CollectionAction.DELETE, collection);
     }
 
-    @Override
-    @Deprecated
-    public Delete setCollectionName(String collection) {
-      this.collection = collection;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public Delete setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
   }
 
   public static Backup backupCollection(String collection, String backupName) {
@@ -807,20 +689,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
       this.repositoryName = Optional.empty();
     }
 
-    @Override
-    @Deprecated
-    public Backup setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public Backup setCollectionName(String collection) {
-      this.collection = collection;
-      return this;
-    }
-
     public String getLocation() {
       return location;
     }
@@ -901,18 +769,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
       this.backupName = backupName;
     }
 
-    @Override
-    public Restore setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
-
-    @Override
-    public Restore setCollectionName(String collection) {
-      this.collection = collection;
-      return this;
-    }
-
     public String getLocation() {
       return location;
     }
@@ -1007,7 +863,7 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
   // This is because the setCollectionName method is deprecated.
   static <T> T checkNotNull(String param, T value) {
     if (value == null) {
-      throw new NullPointerException("Please specify a value for parameter " + param);
+      throw new NullPointerException("Please specify a non-null value for parameter " + param);
     }
     return value;
   }
@@ -1030,12 +886,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     }
 
     @Override
-    public AsyncCollectionSpecificAdminRequest setCollectionName (String collection) {
-      this.collection = checkNotNull(CoreAdminParams.COLLECTION ,collection);
-      return this;
-    }
-
-    @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();
       params.set(CoreAdminParams.COLLECTION, collection);
@@ -1062,12 +912,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     }
 
     @Override
-    public AsyncCollectionSpecificAdminRequest setCollectionName (String collection) {
-      this.collection = checkNotNull(CoreAdminParams.COLLECTION ,collection);
-      return this;
-    }
-
-    @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();
       params.set(CoreAdminParams.COLLECTION, collection);
@@ -1087,12 +931,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     }
 
     @Override
-    public AsyncCollectionSpecificAdminRequest setCollectionName (String collection) {
-      this.collection = checkNotNull(CoreAdminParams.COLLECTION ,collection);
-      return this;
-    }
-
-    @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();
       params.set(CoreAdminParams.COLLECTION, collection);
@@ -1131,47 +969,11 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
       return this;
     }
 
-    /**
-     * @deprecated use {@link #createShard(String, String)}
-     */
-    @Deprecated
-    public CreateShard() {
-      super(CollectionAction.CREATESHARD, null, null);
-    }
-
     private CreateShard(String collection, String shard) {
       super(CollectionAction.CREATESHARD, collection, SolrIdentifierValidator.validateShardName(shard));
     }
 
     @Override
-    @Deprecated
-    public CreateShard setCollectionName(String collection) {
-      this.collection = collection;
-      return this;
-    }
-
-    /**
-     * Provide the name of the shard to be created.
-     * 
-     * Shard names must consist entirely of periods, underscores, hyphens, and alphanumerics.  Other characters are not allowed.
-     * 
-     * @throws IllegalArgumentException if the shard name contains invalid characters.
-     */
-    @Override
-    @Deprecated
-    public CreateShard setShardName(String shardName) {
-      this.shard = SolrIdentifierValidator.validateShardName(shardName);
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public CreateShard setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
-
-    @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();
       if (nodeSet != null) {
@@ -1204,15 +1006,7 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
     private SplitShard(String collection) {
       super(CollectionAction.SPLITSHARD);
-      this.collection = collection;
-    }
-
-    /**
-     * @deprecated Use {@link #splitShard(String)}
-     */
-    @Deprecated
-    public SplitShard() {
-      super(CollectionAction.SPLITSHARD);
+      this.collection = checkNotNull("collection",collection);
     }
 
     public SplitShard setRanges(String ranges) { this.ranges = ranges; return this; }
@@ -1236,32 +1030,15 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
       return this;
     }
 
-    @Deprecated
-    public SplitShard setCollectionName(String collection) {
-      this.collection = collection;
-      return this;
-    }
-
     public SplitShard setShardName(String shard) {
       this.shard = shard;
       return this;
     }
 
     @Override
-    @Deprecated
-    public SplitShard setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
-
-    @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();
 
-      if(this.collection == null) {
-        throw new IllegalArgumentException("You must set collection name for this request.");
-      }
-
       params.set(CollectionAdminParams.COLLECTION, collection);
 
       if (this.shard == null && this.splitKey == null) {
@@ -1293,14 +1070,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     private Boolean deleteInstanceDir;
     private Boolean deleteDataDir;
 
-    /**
-     * @deprecated Use {@link #deleteShard(String, String)}
-     */
-    @Deprecated
-    public DeleteShard() {
-      super(CollectionAction.DELETESHARD, null, null);
-    }
-
     private DeleteShard(String collection, String shard) {
       super(CollectionAction.DELETESHARD, collection, shard);
     }
@@ -1324,27 +1093,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     }
 
     @Override
-    @Deprecated
-    public DeleteShard setCollectionName(String collection) {
-      this.collection = collection;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public DeleteShard setShardName(String shard) {
-      this.shard = shard;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public DeleteShard setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
-
-    @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
       if (deleteInstanceDir != null) {
@@ -1370,33 +1118,9 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
   // FORCELEADER request
   public static class ForceLeader extends ShardSpecificAdminRequest {
-
-    /**
-     * @deprecated Use {@link #forceLeaderElection(String, String)}
-     */
-    @Deprecated
-    public ForceLeader() {
-      super(CollectionAction.FORCELEADER, null, null);
-    }
-
     private ForceLeader(String collection, String shard) {
       super(CollectionAction.FORCELEADER, collection, shard);
     }
-
-    @Override
-    @Deprecated
-    public ForceLeader setCollectionName(String collection) {
-      this.collection = collection;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public ForceLeader setShardName(String shard) {
-      this.shard = shard;
-      return this;
-    }
-
   }
 
   /**
@@ -1431,21 +1155,7 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
     private RequestStatus(String requestId) {
       super(CollectionAction.REQUESTSTATUS);
-      this.requestId = requestId;
-    }
-
-    /**
-     * @deprecated Use {@link #requestStatus(String)}
-     */
-    @Deprecated
-    public RequestStatus() {
-      super(CollectionAction.REQUESTSTATUS);
-    }
-
-    @Deprecated
-    public RequestStatus setRequestId(String requestId) {
-      this.requestId = requestId;
-      return this;
+      this.requestId = checkNotNull("requestId",requestId);
     }
 
     public String getRequestId() {
@@ -1455,8 +1165,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();
-      if (requestId == null)
-        throw new IllegalArgumentException("You must call setRequestId() on this request");
       params.set(CoreAdminParams.REQUESTID, requestId);
       return params;
     }
@@ -1492,11 +1200,14 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
    * Returns a SolrRequest to delete an asynchronous request status
    */
   public static DeleteStatus deleteAsyncId(String requestId) {
-    return new DeleteStatus(requestId);
+    return new DeleteStatus(checkNotNull("requestId",requestId), null);
   }
 
+  /**
+   * Returns a SolrRequest to delete a all asynchronous request statuses
+   */
   public static DeleteStatus deleteAllAsyncIds() {
-    return new DeleteStatus().setFlush(true);
+    return new DeleteStatus(null, true);
   }
 
   // DELETESTATUS request
@@ -1505,29 +1216,15 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     protected String requestId = null;
     protected Boolean flush = null;
 
-    private DeleteStatus(String requestId) {
+    private DeleteStatus(String requestId, Boolean flush) {
       super(CollectionAction.DELETESTATUS);
+      if (requestId == null && flush == null)
+        throw new IllegalArgumentException("Either requestid or flush parameter must be specified.");
+      if (requestId != null && flush != null)
+        throw new IllegalArgumentException("Both requestid and flush parameters can not be specified together.");
+      
       this.requestId = requestId;
-    }
-
-    /**
-     * @deprecated Use {@link #deleteAsyncId(String)} or {@link #deleteAllAsyncIds()}
-     */
-    @Deprecated
-    public DeleteStatus() {
-      super(CollectionAction.DELETESTATUS);
-    }
-
-    @Deprecated
-    public DeleteStatus setRequestId(String requestId) {
-      this.requestId = requestId;
-      return this;
-    }
-
-    @Deprecated
-    public DeleteStatus setFlush(Boolean flush) {
       this.flush = flush;
-      return this;
     }
 
     public String getRequestId() {
@@ -1541,10 +1238,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();
-      if (requestId == null && flush == null)
-        throw new IllegalArgumentException("Either requestid or flush parameter must be specified.");
-      if (requestId != null && flush != null)
-        throw new IllegalArgumentException("Both requestid and flush parameters can not be specified together.");
       if (requestId != null)
         params.set(CoreAdminParams.REQUESTID, requestId);
       if (flush != null)
@@ -1577,52 +1270,18 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     private CreateAlias(String aliasName, String aliasedCollections) {
       super(CollectionAction.CREATEALIAS);
       this.aliasName = SolrIdentifierValidator.validateAliasName(aliasName);
-      this.aliasedCollections = aliasedCollections;
-    }
-
-    /**
-     * @deprecated Use {@link #createAlias(String, String)}
-     */
-    @Deprecated
-    public CreateAlias() {
-      super(CollectionAction.CREATEALIAS);
-    }
-
-    /**
-     * Provide the name of the alias to be created.
-     * 
-     * Alias names must consist entirely of periods, underscores and alphanumerics.  Other characters are not allowed.
-     * 
-     * @throws IllegalArgumentException if the alias name contains invalid characters.
-     */
-    @Deprecated
-    public CreateAlias setAliasName(String aliasName) {
-      this.aliasName = SolrIdentifierValidator.validateAliasName(aliasName);
-      return this;
+      this.aliasedCollections = checkNotNull("aliasedCollections",aliasedCollections);
     }
 
     public String getAliasName() {
       return aliasName;
     }
 
-    @Deprecated
-    public CreateAlias setAliasedCollections(String alias) {
-      this.aliasedCollections = alias;
-      return this;
-    }
-
     public String getAliasedCollections() {
       return this.aliasedCollections;
     }
 
     @Override
-    @Deprecated
-    public CreateAlias setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
-
-    @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = (ModifiableSolrParams) super.getParams();
       params.set(CoreAdminParams.NAME, aliasName);
@@ -1646,28 +1305,7 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
     private DeleteAlias(String aliasName) {
       super(CollectionAction.DELETEALIAS);
-      this.aliasName = aliasName;
-    }
-
-    /**
-     * @deprecated Use {@link #deleteAlias(String)}
-     */
-    @Deprecated
-    public DeleteAlias() {
-      super(CollectionAction.DELETEALIAS);
-    }
-
-    @Deprecated
-    public DeleteAlias setAliasName(String aliasName) {
-      this.aliasName = aliasName;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public DeleteAlias setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
+      this.aliasName = checkNotNull("aliasName",aliasName);
     }
 
     @Override
@@ -1676,29 +1314,30 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
       params.set(CoreAdminParams.NAME, aliasName);
       return params;
     }
-
-
   }
   
   /**
    * Returns a SolrRequest to add a replica of type {@link org.apache.solr.common.cloud.Replica.Type#NRT} to a shard in a collection
+   *
    */
   public static AddReplica addReplicaToShard(String collection, String shard) {
     return addReplicaToShard(collection, shard, Replica.Type.NRT);
   }
 
   /**
-   * Returns a SolrRequest to add a replica of the specified type to a shard in a collection
+   * Returns a SolrRequest to add a replica of the specified type to a shard in a collection.  
+   * If the replica type is null, the server default will be used.
+   *
    */
   public static AddReplica addReplicaToShard(String collection, String shard, Replica.Type replicaType) {
-    return new AddReplica(collection, shard, null, replicaType);
+    return new AddReplica(collection, checkNotNull("shard",shard), null, replicaType);
   }
 
   /**
    * Returns a SolrRequest to add a replica to a collection using a route key
    */
   public static AddReplica addReplicaByRouteKey(String collection, String routeKey) {
-    return new AddReplica(collection, null, routeKey, Replica.Type.NRT);
+    return new AddReplica(collection, null, checkNotNull("routeKey",routeKey), null);
   }
 
   // ADDREPLICA request
@@ -1713,17 +1352,9 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     protected Properties properties;
     protected Replica.Type type;
 
-    /**
-     * @deprecated Use {@link #addReplicaByRouteKey(String, String)} or {@link #addReplicaToShard(String, String)}
-     */
-    @Deprecated
-    public AddReplica() {
-      super(CollectionAction.ADDREPLICA);
-    }
-
     private AddReplica(String collection, String shard, String routeKey, Replica.Type type) {
       super(CollectionAction.ADDREPLICA);
-      this.collection = collection;
+      this.collection = checkNotNull("collection",collection);
       this.shard = shard;
       this.routeKey = routeKey;
       this.type = type;
@@ -1758,12 +1389,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
       return routeKey;
     }
 
-    @Deprecated
-    public AddReplica setRouteKey(String routeKey) {
-      this.routeKey = routeKey;
-      return this;
-    }
-
     public String getInstanceDir() {
       return instanceDir;
     }
@@ -1782,25 +1407,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
       return this;
     }
 
-    @Deprecated
-    public AddReplica setCollectionName(String collection) {
-      this.collection = collection;
-      return this;
-    }
-
-    @Deprecated
-    public AddReplica setShardName(String shard) {
-      this.shard = shard;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public AddReplica setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
-    
     public AddReplica setType(Replica.Type type) {
       this.type = type;
       return this;
@@ -1809,18 +1415,14 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
-      if (collection == null)
-        throw new IllegalArgumentException("You must call setCollection() on this request");
       params.add(CoreAdminParams.COLLECTION, collection);
-      if (shard == null || shard.isEmpty()) {
-        if (routeKey == null) {
-          throw new IllegalArgumentException("Either shard or routeKey must be provided");
-        }
-        params.add(ShardParams._ROUTE_, routeKey);
-      }
-      else {
+      assert ((null == routeKey) ^ (null == shard));
+      if (null != shard) {
         params.add(CoreAdminParams.SHARD, shard);
       }
+      if (null != routeKey) {
+        params.add(ShardParams._ROUTE_, routeKey);
+      }
       if (node != null) {
         params.add("node", node);
       }
@@ -1845,14 +1447,14 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
    * Returns a SolrRequest to delete a replica from a shard in a collection
    */
   public static DeleteReplica deleteReplica(String collection, String shard, String replica) {
-    return new DeleteReplica(collection, shard, replica);
+    return new DeleteReplica(collection, checkNotNull("shard",shard), checkNotNull("replica",replica));
   }
 
   /**
    * Returns a SolrRequest to remove a number of replicas from a specific shard
    */
   public static DeleteReplica deleteReplicasFromShard(String collection, String shard, int count) {
-    return new DeleteReplica(collection, shard, count);
+    return new DeleteReplica(collection, checkNotNull("shard",shard), count);
   }
 
   public static DeleteReplica deleteReplicasFromAllShards(String collection, int count) {
@@ -1870,14 +1472,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     private Boolean deleteIndexDir;
     private Integer count;
 
-    /**
-     * @deprecated Use {@link #deleteReplica(String, String, String)}
-     */
-    @Deprecated
-    public DeleteReplica() {
-      super(CollectionAction.DELETEREPLICA, null);
-    }
-
     private DeleteReplica(String collection, String shard, String replica) {
       super(CollectionAction.DELETEREPLICA, collection);
       this.shard = shard;
@@ -1895,12 +1489,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
       this.count = count;
     }
 
-    @Deprecated
-    public DeleteReplica setReplica(String replica) {
-      this.replica = replica;
-      return this;
-    }
-
     public String getReplica() {
       return this.replica;
     }
@@ -1915,33 +1503,12 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     }
 
     @Override
-    @Deprecated
-    public DeleteReplica setCollectionName(String collection) {
-      this.collection = collection;
-      return this;
-    }
-
-    @Deprecated
-    public DeleteReplica setShardName(String shard) {
-      this.shard = shard;
-      return this;
-    }
-
-    @Deprecated
-    public DeleteReplica setCount(Integer count) {
-      this.count = count;
-      return this;
-    }
-
-    @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
 
       // AsyncCollectionSpecificAdminRequest uses 'name' rather than 'collection'
       // TODO - deal with this inconsistency
       params.remove(CoreAdminParams.NAME);
-      if (this.collection == null)
-        throw new IllegalArgumentException("You must set a collection name for this request");
       params.set(ZkStateReader.COLLECTION_PROP, this.collection);
 
       if (this.replica != null)
@@ -1996,7 +1563,7 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
   }
 
   /**
-   * Returns a SolrRequest to set a cluster property
+   * Returns a SolrRequest to set (or unset) a cluster property
    */
   public static ClusterProp setClusterProperty(String propertyName, String propertyValue) {
     return new ClusterProp(propertyName, propertyValue);
@@ -2008,36 +1575,16 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     private String propertyName;
     private String propertyValue;
 
-    /**
-     * @deprecated Use {@link #setClusterProperty(String, String)}
-     */
-    @Deprecated
-    public ClusterProp() {
-      super(CollectionAction.CLUSTERPROP);
-    }
-
     private ClusterProp(String propertyName, String propertyValue) {
       super(CollectionAction.CLUSTERPROP);
-      this.propertyName = propertyName;
+      this.propertyName = checkNotNull("propertyName",propertyName);
       this.propertyValue = propertyValue;
     }
 
-    @Deprecated
-    public ClusterProp setPropertyName(String propertyName) {
-      this.propertyName = propertyName;
-      return this;
-    }
-
     public String getPropertyName() {
       return this.propertyName;
     }
 
-    @Deprecated
-    public ClusterProp setPropertyValue(String propertyValue) {
-      this.propertyValue = propertyValue;
-      return this;
-    }
-
     public String getPropertyValue() {
       return this.propertyValue;
     }
@@ -2075,47 +1622,21 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     private Integer forwardTimeout;
     private Properties properties;
 
-    /**
-     * @deprecated Use {@link #migrateData(String, String, String)}
-     */
-    @Deprecated
-    public Migrate() {
-      super(CollectionAction.MIGRATE);
-    }
-
     private Migrate(String collection, String targetCollection, String splitKey) {
       super(CollectionAction.MIGRATE);
-      this.collection = collection;
-      this.targetCollection = targetCollection;
-      this.splitKey = splitKey;
-    }
-
-    @Deprecated
-    public Migrate setCollectionName(String collection) {
-      this.collection = collection;
-      return this;
+      this.collection = checkNotNull("collection",collection);
+      this.targetCollection = checkNotNull("targetCollection",targetCollection);
+      this.splitKey = checkNotNull("splitKey",splitKey);
     }
 
     public String getCollectionName() {
       return collection;
     }
 
-    @Deprecated
-    public Migrate setTargetCollection(String targetCollection) {
-      this.targetCollection = targetCollection;
-      return this;
-    }
-
     public String getTargetCollection() {
       return this.targetCollection;
     }
 
-    @Deprecated
-    public Migrate setSplitKey(String splitKey) {
-      this.splitKey = splitKey;
-      return this;
-    }
-
     public String getSplitKey() {
       return this.splitKey;
     }
@@ -2139,13 +1660,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     }
 
     @Override
-    @Deprecated
-    public Migrate setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
-
-    @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
       params.set(CoreAdminParams.COLLECTION, collection);
@@ -2173,32 +1687,9 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
   // ADDROLE request
   public static class AddRole extends CollectionAdminRoleRequest {
-
-    /**
-     * @deprecated Use {@link #addRole(String, String)}
-     */
-    @Deprecated
-    public AddRole() {
-      super(CollectionAction.ADDROLE, null, null);
-    }
-
     private AddRole(String node, String role) {
       super(CollectionAction.ADDROLE, node, role);
     }
-
-    @Override
-    @Deprecated
-    public AddRole setNode(String node) {
-      this.node = node;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public AddRole setRole(String role) {
-      this.role = role;
-      return this;
-    }
   }
 
   /**
@@ -2210,32 +1701,9 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
   // REMOVEROLE request
   public static class RemoveRole extends CollectionAdminRoleRequest {
-
-    /**
-     * @deprecated Use {@link #removeRole(String, String)}
-     */
-    @Deprecated
-    public RemoveRole() {
-      super(CollectionAction.REMOVEROLE, null, null);
-    }
-
     private RemoveRole(String node, String role) {
       super(CollectionAction.REMOVEROLE, node, role);
     }
-
-    @Override
-    @Deprecated
-    public RemoveRole setNode(String node) {
-      this.node = node;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public RemoveRole setRole(String role) {
-      this.role = role;
-      return this;
-    }
   }
 
   /**
@@ -2252,12 +1720,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
       super(CollectionAction.OVERSEERSTATUS);
     }
 
-    @Override
-    @Deprecated
-    public OverseerStatus setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
   }
 
   /**
@@ -2377,51 +1839,25 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     private String propertyValue;
     private Boolean shardUnique;
 
-    /**
-     * @deprecated Use {@link #addReplicaProperty(String, String, String, String, String)}
-     */
-    @Deprecated
-    public AddReplicaProp() {
-      super(CollectionAction.ADDREPLICAPROP, null, null);
-    }
-
     private AddReplicaProp(String collection, String shard, String replica, String propertyName, String propertyValue) {
       super(CollectionAction.ADDREPLICAPROP, collection, shard);
-      this.replica = replica;
-      this.propertyName = propertyName;
-      this.propertyValue = propertyValue;
+      this.replica = checkNotNull("replica",replica);
+      this.propertyName = checkNotNull("propertyName",propertyName);
+      this.propertyValue = checkNotNull("propertyValue",propertyValue);
     }
 
     public String getReplica() {
       return replica;
     }
 
-    @Deprecated
-    public AddReplicaProp setReplica(String replica) {
-      this.replica = replica;
-      return this;
-    }
-
     public String getPropertyName() {
       return propertyName;
     }
 
-    @Deprecated
-    public AddReplicaProp setPropertyName(String propertyName) {
-      this.propertyName = propertyName;
-      return this;
-    }
-
     public String getPropertyValue() {
       return propertyValue;
     }
 
-    @Deprecated
-    public AddReplicaProp setPropertyValue(String propertyValue) {
-      this.propertyValue = propertyValue;
-      return this;
-    }
-
     public Boolean getShardUnique() {
       return shardUnique;
     }
@@ -2432,27 +1868,6 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     }
 
     @Override
-    @Deprecated
-    public AddReplicaProp setCollectionName(String collection) {
-      this.collection = collection;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public AddReplicaProp setShardName(String shard) {
-      this.shard = shard;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public AddReplicaProp setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
-
-    @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
       params.set(CoreAdminParams.REPLICA, replica);
@@ -2482,61 +1897,20 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
     private String replica;
     private String propertyName;
 
-    /**
-     * @deprecated Use {@link #deleteReplicaProperty(String, String, String, String)}
-     */
-    @Deprecated
-    public DeleteReplicaProp() {
-      super(CollectionAction.DELETEREPLICAPROP, null, null);
-    }
-
     private DeleteReplicaProp(String collection, String shard, String replica, String propertyName) {
       super(CollectionAction.DELETEREPLICAPROP, collection, shard);
-      this.replica = replica;
-      this.propertyName = propertyName;
+      this.replica = checkNotNull("replica",replica);
+      this.propertyName = checkNotNull("propertyName",propertyName);
     }
 
     public String getReplica() {
       return replica;
     }
 
-    @Deprecated
-    public DeleteReplicaProp setReplica(String replica) {
-      this.replica = replica;
-      return this;
-    }
-
     public String getPropertyName() {
       return propertyName;
     }
 
-    @Deprecated
-    public DeleteReplicaProp setPropertyName(String propertyName) {
-      this.propertyName = propertyName;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public DeleteReplicaProp setCollectionName(String collection) {
-      this.collection = collection;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public DeleteReplicaProp setShardName(String shard) {
-      this.shard = shard;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public DeleteReplicaProp setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
-
     @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
@@ -2564,35 +1938,12 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
     private MigrateClusterState(String collection) {
       super(CollectionAction.MIGRATESTATEFORMAT);
-      this.collection = collection;
-    }
-
-    /**
-     * @deprecated Use {@link #migrateCollectionFormat(String)}
-     */
-    @Deprecated
-    public MigrateClusterState() {
-      super(CollectionAction.MIGRATESTATEFORMAT);
-    }
-
-    @Deprecated
-    public MigrateClusterState setCollectionName(String collection) {
-      this.collection = collection;
-      return this;
-    }
-
-    @Override
-    @Deprecated
-    public MigrateClusterState setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
+      this.collection = checkNotNull("collection",collection);
     }
 
     @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
-      if (collection == null)
-        throw new IllegalArgumentException("You must call setCollection() on this request");
       params.set(CoreAdminParams.COLLECTION, collection);
       return params;
     }
@@ -2615,28 +1966,14 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
 
     private BalanceShardUnique(String collection, String propertyName) {
       super(CollectionAction.BALANCESHARDUNIQUE);
-      this.collection = collection;
-      this.propertyName = propertyName;
-    }
-
-    /**
-     * @deprecated Use {@link #balanceReplicaProperty(String, String)}
-     */
-    @Deprecated
-    public BalanceShardUnique() {
-      super(CollectionAction.BALANCESHARDUNIQUE);
+      this.collection = checkNotNull("collection",collection);
+      this.propertyName = checkNotNull("propertyName",propertyName);
     }
 
     public String getPropertyName() {
       return propertyName;
     }
 
-    @Deprecated
-    public BalanceShardUnique setPropertyName(String propertyName) {
-      this.propertyName = propertyName;
-      return this;
-    }
-
     public Boolean getOnlyActiveNodes() {
       return onlyActiveNodes;
     }
@@ -2655,24 +1992,11 @@ public abstract class CollectionAdminRequest<T extends CollectionAdminResponse>
       return this;
     }
 
-    @Deprecated
-    public BalanceShardUnique setCollection(String collection) {
-      this.collection = collection;
-      return this;
-    }
-
     public String getCollection() {
       return collection;
     }
 
     @Override
-    @Deprecated
-    public BalanceShardUnique setAsyncId(String id) {
-      this.asyncId = id;
-      return this;
-    }
-
-    @Override
     public SolrParams getParams() {
       ModifiableSolrParams params = new ModifiableSolrParams(super.getParams());
       params.set(CoreAdminParams.COLLECTION, collection);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java
index 0f9b147..870aa34 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/CollectionAdminRequestRequiredParamsTest.java
@@ -17,6 +17,7 @@
 package org.apache.solr.client.solrj;
 
 import static org.apache.solr.common.params.CoreAdminParams.*;
+import static org.apache.solr.common.params.CollectionAdminParams.FLUSH;
 
 import java.util.Iterator;
 import java.util.Set;
@@ -37,135 +38,131 @@ import com.google.common.collect.Sets;
 public class CollectionAdminRequestRequiredParamsTest extends LuceneTestCase {
 
   public void testBalanceShardUnique() {
-    final CollectionAdminRequest.BalanceShardUnique request = new CollectionAdminRequest.BalanceShardUnique()
-            .setCollection("foo")
-            .setPropertyName("prop");
+    CollectionAdminRequest.BalanceShardUnique request = CollectionAdminRequest.balanceReplicaProperty("foo","prop");
     assertContainsParams(request.getParams(), ACTION, COLLECTION, "property");
+
+    request.setShardUnique(true);
+    assertContainsParams(request.getParams(), ACTION, COLLECTION, "property","shardUnique");
+    
+    request.setOnlyActiveNodes(false);
+    assertContainsParams(request.getParams(), ACTION, COLLECTION, "property","shardUnique","onlyactivenodes");
+    
+    request.setShardUnique(null);
+    assertContainsParams(request.getParams(), ACTION, COLLECTION, "property","onlyactivenodes");
+    
   }
   
   public void testClusterProp() {
-    final CollectionAdminRequest.ClusterProp request = new CollectionAdminRequest.ClusterProp()
-            .setPropertyName("foo")
-            .setPropertyValue("bar");
+    CollectionAdminRequest.ClusterProp request = CollectionAdminRequest.setClusterProperty("foo","bar");
     assertContainsParams(request.getParams(), ACTION, NAME, "val");
   }
   
   public void testAddRole() {
-    final CollectionAdminRequest.AddRole request = new CollectionAdminRequest.AddRole()
-            .setNode("node")
-            .setRole("role");
+    CollectionAdminRequest.AddRole request = CollectionAdminRequest.addRole("node","role");
     assertContainsParams(request.getParams(), ACTION, "node", "role");
   }
   
   public void testRemoveRole() {
-    final CollectionAdminRequest.RemoveRole request = new CollectionAdminRequest.RemoveRole()
-            .setNode("node")
-            .setRole("role");
+    CollectionAdminRequest.RemoveRole request = CollectionAdminRequest.removeRole("node","role");
     assertContainsParams(request.getParams(), ACTION, "node", "role");
   }
   
   public void testAddReplica() {
-    // with shard parameter
-    CollectionAdminRequest.AddReplica request = new CollectionAdminRequest.AddReplica()
-            .setShardName("shard")
-            .setCollectionName("collection");
+    // with shard parameter and "client side" implicit type param
+    CollectionAdminRequest.AddReplica request = CollectionAdminRequest.addReplicaToShard("collection", "shard");
+    assertContainsParams(request.getParams(), ACTION, COLLECTION, SHARD, ZkStateReader.REPLICA_TYPE);
+    
+    // with only shard parameter and "server side" implicit type, so no param
+    request = CollectionAdminRequest.addReplicaToShard("collection", "shard", null);
     assertContainsParams(request.getParams(), ACTION, COLLECTION, SHARD);
     
     // with route parameter
-    request = new CollectionAdminRequest.AddReplica()
-            .setRouteKey("route")
-            .setCollectionName("collection");
+    request = CollectionAdminRequest.addReplicaByRouteKey("collection","route");
     assertContainsParams(request.getParams(), ACTION, COLLECTION, ShardParams._ROUTE_);
     
-    // with type parameter
-    request = new CollectionAdminRequest.AddReplica()
-            .setShardName("shard")
-            .setCollectionName("collection")
-            .setType(Replica.Type.NRT);
+    // with explicit type parameter
+    request = CollectionAdminRequest.addReplicaToShard("collection", "shard", Replica.Type.NRT);
     assertContainsParams(request.getParams(), ACTION, COLLECTION, SHARD, ZkStateReader.REPLICA_TYPE);
   }
   
   public void testAddReplicaProp() {
-    final CollectionAdminRequest.AddReplicaProp request = new CollectionAdminRequest.AddReplicaProp()
-            .setShardName("shard")
-            .setCollectionName("collection")
-            .setReplica("replica")
-            .setPropertyName("prop")
-            .setPropertyValue("value");
+    final CollectionAdminRequest.AddReplicaProp request = CollectionAdminRequest.addReplicaProperty
+      ("collection", "shard", "replica", "prop", "value");
     assertContainsParams(request.getParams(), ACTION, COLLECTION, SHARD, REPLICA, "property", "property.value");
   }
   
   public void testClusterStatus() {
-    final CollectionAdminRequest.ClusterStatus request = new CollectionAdminRequest.ClusterStatus();
+    final CollectionAdminRequest.ClusterStatus request = CollectionAdminRequest.getClusterStatus();
     assertContainsParams(request.getParams(), ACTION);
+
+    request.setCollectionName("foo");
+    assertContainsParams(request.getParams(), ACTION, COLLECTION);
+    
+    request.setShardName("foo");
+    assertContainsParams(request.getParams(), ACTION, COLLECTION, SHARD);
+
+    request.setRouteKey("foo");
+    request.setShardName(null);
+    assertContainsParams(request.getParams(), ACTION, COLLECTION, ShardParams._ROUTE_);
+    
   }
   
   public void testCreateShard() {
-    final CollectionAdminRequest.CreateShard request = new CollectionAdminRequest.CreateShard()
-            .setCollectionName("collection")
-            .setShardName("shard");
+    final CollectionAdminRequest.CreateShard request = CollectionAdminRequest.createShard("collection","shard");
     assertContainsParams(request.getParams(), ACTION, COLLECTION, SHARD);
   }
   
   public void testDeleteReplica() {
-    final CollectionAdminRequest.DeleteReplica request = new CollectionAdminRequest.DeleteReplica()
-            .setCollectionName("collection")
-            .setShardName("shard")
-            .setReplica("replica");
+    final CollectionAdminRequest.DeleteReplica request = CollectionAdminRequest.deleteReplica("collection","shard","replica");
     assertContainsParams(request.getParams(), ACTION, COLLECTION, SHARD, REPLICA);
+
   }
   
   public void testDeleteReplicaProp() {
-    final CollectionAdminRequest.DeleteReplicaProp request = new CollectionAdminRequest.DeleteReplicaProp()
-            .setCollectionName("collection")
-            .setShardName("shard")
-            .setReplica("replica")
-            .setPropertyName("foo");
+    final CollectionAdminRequest.DeleteReplicaProp request = CollectionAdminRequest.deleteReplicaProperty
+      ("collection", "shard", "replica", "foo");
     assertContainsParams(request.getParams(), ACTION, COLLECTION, SHARD, REPLICA, "property");
   }
   
   public void testDeleteShard() {
-    final CollectionAdminRequest.DeleteShard request = new CollectionAdminRequest.DeleteShard()
-            .setCollectionName("collection")
-            .setShardName("shard");
+    final CollectionAdminRequest.DeleteShard request = CollectionAdminRequest.deleteShard("collection","shard");
     assertContainsParams(request.getParams(), ACTION, COLLECTION, SHARD);
   }
   
   public void testSplitShard() {
-    final CollectionAdminRequest.SplitShard request = new CollectionAdminRequest.SplitShard()
-            .setCollectionName("collection")
+    final CollectionAdminRequest.SplitShard request = CollectionAdminRequest.splitShard("collection")
             .setShardName("shard");
     assertContainsParams(request.getParams(), ACTION, COLLECTION, SHARD);
   }
 
   public void testCreateCollection() {
-    final CollectionAdminRequest.Create request = new CollectionAdminRequest.Create()
-            .setCollectionName("collection");
-    assertContainsParams(request.getParams(), ACTION, NAME);
+    // shortest form
+    assertContainsParams(CollectionAdminRequest.createCollection("foo", null, 1, 1).getParams(),
+                         ACTION, NAME, ZkStateReader.NUM_SHARDS_PROP,
+                         "replicationFactor", ZkStateReader.NRT_REPLICAS);
+    // shortest form w/ "explicitly" choosing "implicit" router
+    assertContainsParams(CollectionAdminRequest.createCollectionWithImplicitRouter("foo", null, "bar", 1).getParams(),
+                         ACTION, NAME, "shards", "router.name",
+                         "replicationFactor", ZkStateReader.NRT_REPLICAS);
   }
   
   public void testReloadCollection() {
-    final CollectionAdminRequest.Reload request = new CollectionAdminRequest.Reload()
-            .setCollectionName("collection");
+    final CollectionAdminRequest.Reload request = CollectionAdminRequest.reloadCollection("collection");
     assertContainsParams(request.getParams(), ACTION, NAME);
   }
   
   public void testDeleteCollection() {
-    final CollectionAdminRequest.Delete request = new CollectionAdminRequest.Delete()
-            .setCollectionName("collection");
+    final CollectionAdminRequest.Delete request = CollectionAdminRequest.deleteCollection("collection");
     assertContainsParams(request.getParams(), ACTION, NAME);
   }
   
   public void testCreateAlias() {
-    final CollectionAdminRequest.CreateAlias request = new CollectionAdminRequest.CreateAlias()
-            .setAliasName("name")
-            .setAliasedCollections("collections");
+    final CollectionAdminRequest.CreateAlias request = CollectionAdminRequest.createAlias("name","collections");
     assertContainsParams(request.getParams(), ACTION, NAME, "collections");
   }
   
   public void testDeleteAlias() {
-    final CollectionAdminRequest.DeleteAlias request = new CollectionAdminRequest.DeleteAlias()
-            .setAliasName("name");
+    final CollectionAdminRequest.DeleteAlias request = CollectionAdminRequest.deleteAlias("name");
     assertContainsParams(request.getParams(), ACTION, NAME);
   }
   
@@ -175,10 +172,7 @@ public class CollectionAdminRequestRequiredParamsTest extends LuceneTestCase {
   }
 
   public void testMigrate() {
-    final CollectionAdminRequest.Migrate request = new CollectionAdminRequest.Migrate()
-            .setCollectionName("collection")
-            .setTargetCollection("target")
-            .setSplitKey("splitKey");
+    final CollectionAdminRequest.Migrate request = CollectionAdminRequest.migrateData("collection","targer","splitKey");
     assertContainsParams(request.getParams(), ACTION, COLLECTION, "target.collection", "split.key");
   }
   
@@ -188,10 +182,21 @@ public class CollectionAdminRequestRequiredParamsTest extends LuceneTestCase {
   }
   
   public void testRequestStatus() {
-    final CollectionAdminRequest.RequestStatus request = new CollectionAdminRequest.RequestStatus()
-            .setRequestId("request");
+    final CollectionAdminRequest.RequestStatus request = CollectionAdminRequest.requestStatus("request");
     assertContainsParams(request.getParams(), ACTION, REQUESTID);
   }
+  
+  public void testDeleteStatus() {
+    assertContainsParams(CollectionAdminRequest.deleteAsyncId("foo").getParams(),
+                         ACTION, REQUESTID);
+    assertContainsParams(CollectionAdminRequest.deleteAllAsyncIds().getParams(),
+                         ACTION, FLUSH);
+  }
+  
+  public void testForceLeader() {
+    assertContainsParams(CollectionAdminRequest.forceLeaderElection("foo","bar").getParams(),
+                         ACTION, COLLECTION, SHARD);
+  }
 
   private void assertContainsParams(SolrParams solrParams, String... requiredParams) {
     final Set<String> requiredParamsSet = Sets.newHashSet(requiredParams);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCollectionAdminRequest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCollectionAdminRequest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCollectionAdminRequest.java
index c21e523..29b273e 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCollectionAdminRequest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/request/TestCollectionAdminRequest.java
@@ -17,7 +17,7 @@
 package org.apache.solr.client.solrj.request;
 
 import org.apache.lucene.util.LuceneTestCase;
-import org.apache.solr.client.solrj.request.CollectionAdminRequest.Create;
+import org.apache.solr.client.solrj.request.CollectionAdminRequest;
 import org.apache.solr.client.solrj.request.CollectionAdminRequest.CreateAlias;
 import org.apache.solr.client.solrj.request.CollectionAdminRequest.CreateShard;
 import org.apache.solr.common.SolrException;
@@ -30,57 +30,57 @@ public class TestCollectionAdminRequest extends LuceneTestCase {
   
   @Test
   public void testInvalidCollectionNameRejectedWhenCreatingCollection() {
-    final Create createRequest = new Create();
-    try {
-      createRequest.setCollectionName("invalid$collection@name");
-      fail();
-    } catch (SolrException e) {
-      final String exceptionMessage = e.getMessage();
-      assertTrue(exceptionMessage.contains("Invalid collection"));
-      assertTrue(exceptionMessage.contains("invalid$collection@name"));
-      assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
-    }
+    final SolrException e = expectThrows(SolrException.class, () -> {
+        CollectionAdminRequest.createCollection("invalid$collection@name", null, 1, 1);
+      });
+    final String exceptionMessage = e.getMessage();
+    assertTrue(exceptionMessage.contains("Invalid collection"));
+    assertTrue(exceptionMessage.contains("invalid$collection@name"));
+    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
   }
   
   @Test
-  public void testInvalidShardNamesRejectedWhenCreatingCollection() {
-    final Create createRequest = new Create();
-    try {
-      createRequest.setShards("invalid$shard@name");
-      fail();
-    } catch (SolrException e) {
-      final String exceptionMessage = e.getMessage();
-      assertTrue(exceptionMessage.contains("Invalid shard"));
-      assertTrue(exceptionMessage.contains("invalid$shard@name"));
-      assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
-    }
+  public void testInvalidShardNamesRejectedWhenCreatingImplicitCollection() {
+    final SolrException e = expectThrows(SolrException.class, () -> {
+        CollectionAdminRequest.createCollectionWithImplicitRouter("fine", "fine", "invalid$shard@name",1,0,0);
+      });
+    final String exceptionMessage = e.getMessage();
+    assertTrue(exceptionMessage.contains("Invalid shard"));
+    assertTrue(exceptionMessage.contains("invalid$shard@name"));
+    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
+  }
+  
+  @Test
+  public void testInvalidShardNamesRejectedWhenCallingSetShards() {
+    CollectionAdminRequest.Create request = CollectionAdminRequest.createCollectionWithImplicitRouter("fine",null,"fine",1);
+    final SolrException e = expectThrows(SolrException.class, () -> {
+        request.setShards("invalid$shard@name");
+      });
+    final String exceptionMessage = e.getMessage();
+    assertTrue(exceptionMessage.contains("Invalid shard"));
+    assertTrue(exceptionMessage.contains("invalid$shard@name"));
+    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
   }
   
   @Test
   public void testInvalidAliasNameRejectedWhenCreatingAlias() {
-    final CreateAlias createAliasRequest = new CreateAlias();
-    try {
-      createAliasRequest.setAliasName("invalid$alias@name");
-      fail();
-    } catch (SolrException e) {
-      final String exceptionMessage = e.getMessage();
-      assertTrue(exceptionMessage.contains("Invalid alias"));
-      assertTrue(exceptionMessage.contains("invalid$alias@name"));
-      assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
-    }
+    final SolrException e = expectThrows(SolrException.class, () -> {
+        CreateAlias createAliasRequest = CollectionAdminRequest.createAlias("invalid$alias@name","ignored");
+      });
+    final String exceptionMessage = e.getMessage();
+    assertTrue(exceptionMessage.contains("Invalid alias"));
+    assertTrue(exceptionMessage.contains("invalid$alias@name"));
+    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
   }
   
   @Test
   public void testInvalidShardNameRejectedWhenCreatingShard() {
-    final CreateShard createShardRequest = new CreateShard();
-    try {
-      createShardRequest.setShardName("invalid$shard@name");
-      fail();
-    } catch (SolrException e) {
-      final String exceptionMessage = e.getMessage();
-      assertTrue(exceptionMessage.contains("Invalid shard"));
-      assertTrue(exceptionMessage.contains("invalid$shard@name"));
-      assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
-    }
+    final SolrException e = expectThrows(SolrException.class, () -> {
+        CreateShard createShardRequest = CollectionAdminRequest.createShard("ignored","invalid$shard@name");
+      });
+    final String exceptionMessage = e.getMessage();
+    assertTrue(exceptionMessage.contains("Invalid shard"));
+    assertTrue(exceptionMessage.contains("invalid$shard@name"));
+    assertTrue(exceptionMessage.contains("must consist entirely of periods, underscores, hyphens, and alphanumerics"));
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
----------------------------------------------------------------------
diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
index 9b8f707..2970a8b 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
@@ -1892,8 +1892,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
       throws SolrServerException, IOException {
     CollectionAdminResponse resp = createCollection(testCollectionName, numShards, replicationFactor, maxShardsPerNode);
     if (resp.getResponse().get("failure") != null) {
-      CollectionAdminRequest.Delete req = new CollectionAdminRequest.Delete();
-      req.setCollectionName(testCollectionName);
+      CollectionAdminRequest.Delete req = CollectionAdminRequest.deleteCollection(testCollectionName);
       req.process(cloudClient);
 
       resp = createCollection(testCollectionName, numShards, replicationFactor, maxShardsPerNode);
@@ -2158,6 +2157,22 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
     }
   }
   
+  /** 
+   * Logs a WARN if collection can't be deleted, but does not fail or throw an exception
+   * @return true if success, else false
+   */
+  protected static boolean attemptCollectionDelete(CloudSolrClient client, String collectionName) {
+    // try to clean up
+    try {
+      CollectionAdminRequest.deleteCollection(collectionName).process(client);
+      return true;
+    } catch (Exception e) {
+      // don't fail the test
+      log.warn("Could not delete collection {} - ignoring", collectionName);
+    }
+    return false;
+  }
+
   protected void logReplicationDetails(Replica replica, StringBuilder builder) throws IOException {
     try (HttpSolrClient client = new HttpSolrClient.Builder(replica.getCoreUrl()).build()) {
       ModifiableSolrParams params = new ModifiableSolrParams();
@@ -2203,9 +2218,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
   }
 
   static CollectionAdminResponse getStatusResponse(String requestId, SolrClient client) throws SolrServerException, IOException {
-    CollectionAdminRequest.RequestStatus requestStatusRequest = new CollectionAdminRequest.RequestStatus();
-    requestStatusRequest.setRequestId(requestId);
-    return requestStatusRequest.process(client);
+    return CollectionAdminRequest.requestStatus(requestId).process(client);
   }
 
 }


[32/38] lucene-solr:jira/solr-8668: SOLR-10559: Add tuple documentation

Posted by cp...@apache.org.
SOLR-10559: Add tuple documentation


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

Branch: refs/heads/jira/solr-8668
Commit: 057451ac643b134dda3f685c5ffec1b2cdc23dc0
Parents: 6d6e47f
Author: Joel Bernstein <jb...@apache.org>
Authored: Thu Jun 1 17:08:52 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Thu Jun 1 17:08:52 2017 -0400

----------------------------------------------------------------------
 solr/solr-ref-guide/src/stream-sources.adoc | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/057451ac/solr/solr-ref-guide/src/stream-sources.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-sources.adoc b/solr/solr-ref-guide/src/stream-sources.adoc
index 986a5da..2bb0805 100644
--- a/solr/solr-ref-guide/src/stream-sources.adoc
+++ b/solr/solr-ref-guide/src/stream-sources.adoc
@@ -480,3 +480,24 @@ topic(checkpointCollection,
       q="topic query",
       fl="id, name, country")
 ----
+
+== tuple
+
+The `tuple` function emits a single Tuple with name/value pairs. The values can be set to variables assigned in a `let` expression, literals, Stream Evaluators or
+Stream Expressions. In the case of Stream Evaluators the tuple will output the return value from the evaluator.
+This could be a numeric, list or map. If a Stream Expression is set to a value, the `tuple` function will flatten
+the tuple stream from the Stream Expression into a list of Tuples.
+
+=== tuple Parameters
+
+* name=value pairs
+
+=== tuple Syntax
+
+[source,text]
+----
+tuple(a=add(1,1),
+      b=search(collection1, q="cat:a", fl="a, b, c", sort"a desc"))
+----
+
+


[36/38] lucene-solr:jira/solr-8668: SOLR-10790: Fix warnings in Assign.java and ReplicaAssigner.java classes.

Posted by cp...@apache.org.
SOLR-10790: Fix warnings in Assign.java and ReplicaAssigner.java classes.


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

Branch: refs/heads/jira/solr-8668
Commit: cccf97cae85e4714c2e7a5f042032c9fce2f47cf
Parents: 72ba34f
Author: Christine Poerschke <cp...@apache.org>
Authored: Fri Jun 2 10:39:18 2017 +0100
Committer: Christine Poerschke <cp...@apache.org>
Committed: Fri Jun 2 10:39:18 2017 +0100

----------------------------------------------------------------------
 solr/CHANGES.txt                                                  | 3 +++
 solr/core/src/java/org/apache/solr/cloud/Assign.java              | 2 +-
 .../core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java | 2 +-
 3 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/cccf97ca/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index af9ec5e..d8c9d04 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -298,6 +298,9 @@ Other Changes
 * SOLR-10741: Factor out createSliceShardsStr method from HttpShardHandler.prepDistributed.
   (Domenico Fabio Marino via Christine Poerschke)
 
+* SOLR-10790: Fix warnings in Assign.java and ReplicaAssigner.java classes.
+  (Christine Poerschke)
+
 ==================  6.6.0 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/cccf97ca/solr/core/src/java/org/apache/solr/cloud/Assign.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/Assign.java b/solr/core/src/java/org/apache/solr/cloud/Assign.java
index 265e453..63e006e 100644
--- a/solr/core/src/java/org/apache/solr/cloud/Assign.java
+++ b/solr/core/src/java/org/apache/solr/cloud/Assign.java
@@ -98,7 +98,7 @@ public class Assign {
       map.put(shardId, cnt);
     }
 
-    Collections.sort(shardIdNames, (o1, o2) -> {
+    Collections.sort(shardIdNames, (String o1, String o2) -> {
       Integer one = map.get(o1);
       Integer two = map.get(o2);
       return one.compareTo(two);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/cccf97ca/solr/core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java b/solr/core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java
index 506e158..669e82b 100644
--- a/solr/core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java
+++ b/solr/core/src/java/org/apache/solr/cloud/rule/ReplicaAssigner.java
@@ -211,7 +211,7 @@ public class ReplicaAssigner {
     int startPosition = 0;
     Map<String, Map<String, Integer>> copyOfCurrentState = getDeepCopy(shardVsNodes, 2);
     List<String> sortedLiveNodes = new ArrayList<>(this.participatingLiveNodes);
-    Collections.sort(sortedLiveNodes, (n1, n2) -> {
+    Collections.sort(sortedLiveNodes, (String n1, String n2) -> {
       int result1 = 0;
       for (int i = 0; i < rulePermutation.length; i++) {
         Rule rule = rules.get(rulePermutation[i]);


[35/38] lucene-solr:jira/solr-8668: LUCENE-7852: Correct copyright year(s) in lucene/LICENSE.txt and solr/LICENSE.txt files

Posted by cp...@apache.org.
LUCENE-7852: Correct copyright year(s) in lucene/LICENSE.txt and solr/LICENSE.txt 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/72ba34f6
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/72ba34f6
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/72ba34f6

Branch: refs/heads/jira/solr-8668
Commit: 72ba34f66c60c6d6a052502c99f8f28c6b671e38
Parents: 5b93b73
Author: Christine Poerschke <cp...@apache.org>
Authored: Fri Jun 2 10:36:07 2017 +0100
Committer: Christine Poerschke <cp...@apache.org>
Committed: Fri Jun 2 10:36:07 2017 +0100

----------------------------------------------------------------------
 lucene/CHANGES.txt | 3 +++
 lucene/NOTICE.txt  | 2 +-
 solr/CHANGES.txt   | 3 +++
 solr/NOTICE.txt    | 4 ++--
 4 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/72ba34f6/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 79a30fa..4e2e4f2 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -110,6 +110,9 @@ Other
 
 * LUCENE-7540: Upgrade ICU to 59.1 (Mike McCandless, Jim Ferenczi)
 
+* LUCENE-7852: Correct copyright year(s) in lucene/LICENSE.txt file.
+  (Christine Poerschke, Steve Rowe)
+
 ======================= Lucene 6.7.0 =======================
 
 Other

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/72ba34f6/lucene/NOTICE.txt
----------------------------------------------------------------------
diff --git a/lucene/NOTICE.txt b/lucene/NOTICE.txt
index 6260f3b..1903adc 100644
--- a/lucene/NOTICE.txt
+++ b/lucene/NOTICE.txt
@@ -1,5 +1,5 @@
 Apache Lucene
-Copyright 2014 The Apache Software Foundation
+Copyright 2001-2017 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/72ba34f6/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 106a4df..af9ec5e 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -215,6 +215,9 @@ Other Changes
 
 * SOLR-10791: Remove deprecated options in SSLTestConfig (hossman)
 
+* LUCENE-7852: Correct copyright year(s) in solr/LICENSE.txt file.
+  (Christine Poerschke, Steve Rowe)
+
 ==================  6.7.0 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/72ba34f6/solr/NOTICE.txt
----------------------------------------------------------------------
diff --git a/solr/NOTICE.txt b/solr/NOTICE.txt
index 214a2f8..4f3fa2a 100644
--- a/solr/NOTICE.txt
+++ b/solr/NOTICE.txt
@@ -1,6 +1,6 @@
 ==============================================================
  Apache Solr
- Copyright 2006-2014 The Apache Software Foundation
+ Copyright 2006-2017 The Apache Software Foundation
 ==============================================================
 
 This product includes software developed at
@@ -119,7 +119,7 @@ parrt@antlr.org
 =========================================================================
 
 Apache Lucene
-Copyright 2014 The Apache Software Foundation
+Copyright 2001-2017 The Apache Software Foundation
 
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).


[02/38] lucene-solr:jira/solr-8668: SOLR-10770: Add date formatting to timeseries Streaming Expression

Posted by cp...@apache.org.
SOLR-10770: Add date formatting to timeseries Streaming Expression


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

Branch: refs/heads/jira/solr-8668
Commit: 520762913af97f761377e03139499aeee31d2a9f
Parents: d14ca98
Author: Joel Bernstein <jb...@apache.org>
Authored: Tue May 30 14:38:50 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Tue May 30 14:39:38 2017 -0400

----------------------------------------------------------------------
 .../solrj/io/stream/TimeSeriesStream.java       | 36 ++++++++-
 .../solrj/io/stream/StreamExpressionTest.java   | 81 ++++++++++++++++++++
 2 files changed, 114 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/52076291/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TimeSeriesStream.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TimeSeriesStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TimeSeriesStream.java
index bb965b0..f38da85 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TimeSeriesStream.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TimeSeriesStream.java
@@ -17,6 +17,10 @@
 package org.apache.solr.client.solrj.io.stream;
 
 import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.time.ZoneOffset;
+import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -53,6 +57,8 @@ public class TimeSeriesStream extends TupleStream implements Expressible  {
   private String end;
   private String gap;
   private String field;
+  private DateTimeFormatter formatter;
+  private SimpleDateFormat ISOFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm'Z'");
 
   private Metric[] metrics;
   private List<Tuple> tuples = new ArrayList();
@@ -70,8 +76,9 @@ public class TimeSeriesStream extends TupleStream implements Expressible  {
                           String field,
                           String start,
                           String end,
-                          String gap) throws IOException {
-    init(collection, params, field, metrics, start, end, gap, zkHost);
+                          String gap,
+                          String format) throws IOException {
+    init(collection, params, field, metrics, start, end, gap, format, zkHost);
   }
 
   public TimeSeriesStream(StreamExpression expression, StreamFactory factory) throws IOException{
@@ -82,9 +89,17 @@ public class TimeSeriesStream extends TupleStream implements Expressible  {
     StreamExpressionNamedParameter endExpression = factory.getNamedOperand(expression, "end");
     StreamExpressionNamedParameter fieldExpression = factory.getNamedOperand(expression, "field");
     StreamExpressionNamedParameter gapExpression = factory.getNamedOperand(expression, "gap");
+    StreamExpressionNamedParameter formatExpression = factory.getNamedOperand(expression, "format");
+    StreamExpressionNamedParameter qExpression = factory.getNamedOperand(expression, "q");
+
     StreamExpressionNamedParameter zkHostExpression = factory.getNamedOperand(expression, "zkHost");
     List<StreamExpression> metricExpressions = factory.getExpressionOperandsRepresentingTypes(expression, Expressible.class, Metric.class);
 
+
+    if(qExpression == null) {
+      throw new IOException("The timeseries expression requires the q parameter");
+    }
+
     String start = null;
     if(startExpression != null) {
       start = ((StreamExpressionValue)startExpression.getParameter()).getValue();
@@ -105,6 +120,11 @@ public class TimeSeriesStream extends TupleStream implements Expressible  {
       field = ((StreamExpressionValue)fieldExpression.getParameter()).getValue();
     }
 
+    String format = null;
+    if(formatExpression != null) {
+      format = ((StreamExpressionValue)formatExpression.getParameter()).getValue();
+    }
+
     // Collection Name
     if(null == collectionName){
       throw new IOException(String.format(Locale.ROOT,"invalid expression %s - collectionName expected as first operand",expression));
@@ -149,7 +169,7 @@ public class TimeSeriesStream extends TupleStream implements Expressible  {
     }
 
     // We've got all the required items
-    init(collectionName, params, field, metrics, start, end, gap , zkHost);
+    init(collectionName, params, field, metrics, start, end, gap, format, zkHost);
   }
 
   public String getCollection() {
@@ -163,6 +183,7 @@ public class TimeSeriesStream extends TupleStream implements Expressible  {
                     String start,
                     String end,
                     String gap,
+                    String format,
                     String zkHost) throws IOException {
     this.zkHost  = zkHost;
     this.collection = collection;
@@ -175,6 +196,9 @@ public class TimeSeriesStream extends TupleStream implements Expressible  {
     this.field = field;
     this.params = params;
     this.end = end;
+    if(format != null) {
+      formatter = DateTimeFormatter.ofPattern(format);
+    }
   }
 
   @Override
@@ -348,6 +372,12 @@ public class TimeSeriesStream extends TupleStream implements Expressible  {
     for(int b=0; b<allBuckets.size(); b++) {
       NamedList bucket = (NamedList)allBuckets.get(b);
       Object val = bucket.get("val");
+
+      if(formatter != null) {
+        LocalDateTime localDateTime = LocalDateTime.ofInstant(((java.util.Date) val).toInstant(), ZoneOffset.UTC);
+        val = localDateTime.format(formatter);
+      }
+
       Tuple t = currentTuple.clone();
       t.put(field, val);
       int m = 0;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/52076291/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
index d82ca2a..3957915 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/io/stream/StreamExpressionTest.java
@@ -5368,6 +5368,87 @@ public class StreamExpressionTest extends SolrCloudTestCase {
     assertTrue(tuples.get(3).getDouble("max(price_f)").equals(400D));
     assertTrue(tuples.get(3).getDouble("min(price_f)").equals(400D));
 
+
+    expr = "timeseries("+COLLECTIONORALIAS+", q=\"*:*\", start=\"2013-01-01T01:00:00.000Z\", " +
+        "end=\"2016-12-01T01:00:00.000Z\", " +
+        "gap=\"+1YEAR\", " +
+        "field=\"test_dt\", " +
+        "format=\"yyyy\", " +
+        "count(*), sum(price_f), max(price_f), min(price_f))";
+    paramsLoc = new ModifiableSolrParams();
+    paramsLoc.set("expr", expr);
+    paramsLoc.set("qt", "/stream");
+
+    solrStream = new SolrStream(url, paramsLoc);
+
+    solrStream.setStreamContext(context);
+    tuples = getTuples(solrStream);
+    assertTrue(tuples.size() == 4);
+
+    assertTrue(tuples.get(0).get("test_dt").equals("2013"));
+    assertTrue(tuples.get(0).getLong("count(*)").equals(100L));
+    assertTrue(tuples.get(0).getDouble("sum(price_f)").equals(10000D));
+    assertTrue(tuples.get(0).getDouble("max(price_f)").equals(100D));
+    assertTrue(tuples.get(0).getDouble("min(price_f)").equals(100D));
+
+    assertTrue(tuples.get(1).get("test_dt").equals("2014"));
+    assertTrue(tuples.get(1).getLong("count(*)").equals(50L));
+    assertTrue(tuples.get(1).getDouble("sum(price_f)").equals(25000D));
+    assertTrue(tuples.get(1).getDouble("max(price_f)").equals(500D));
+    assertTrue(tuples.get(1).getDouble("min(price_f)").equals(500D));
+
+    assertTrue(tuples.get(2).get("test_dt").equals("2015"));
+    assertTrue(tuples.get(2).getLong("count(*)").equals(50L));
+    assertTrue(tuples.get(2).getDouble("sum(price_f)").equals(15000D));
+    assertTrue(tuples.get(2).getDouble("max(price_f)").equals(300D));
+    assertTrue(tuples.get(2).getDouble("min(price_f)").equals(300D));
+
+    assertTrue(tuples.get(3).get("test_dt").equals("2016"));
+    assertTrue(tuples.get(3).getLong("count(*)").equals(50L));
+    assertTrue(tuples.get(3).getDouble("sum(price_f)").equals(20000D));
+    assertTrue(tuples.get(3).getDouble("max(price_f)").equals(400D));
+    assertTrue(tuples.get(3).getDouble("min(price_f)").equals(400D));
+
+    expr = "timeseries("+COLLECTIONORALIAS+", q=\"*:*\", start=\"2013-01-01T01:00:00.000Z\", " +
+        "end=\"2016-12-01T01:00:00.000Z\", " +
+        "gap=\"+1YEAR\", " +
+        "field=\"test_dt\", " +
+        "format=\"yyyy-MM\", " +
+        "count(*), sum(price_f), max(price_f), min(price_f))";
+    paramsLoc = new ModifiableSolrParams();
+    paramsLoc.set("expr", expr);
+    paramsLoc.set("qt", "/stream");
+
+    solrStream = new SolrStream(url, paramsLoc);
+
+    solrStream.setStreamContext(context);
+    tuples = getTuples(solrStream);
+    assertTrue(tuples.size() == 4);
+
+    assertTrue(tuples.get(0).get("test_dt").equals("2013-01"));
+    assertTrue(tuples.get(0).getLong("count(*)").equals(100L));
+    assertTrue(tuples.get(0).getDouble("sum(price_f)").equals(10000D));
+    assertTrue(tuples.get(0).getDouble("max(price_f)").equals(100D));
+    assertTrue(tuples.get(0).getDouble("min(price_f)").equals(100D));
+
+    assertTrue(tuples.get(1).get("test_dt").equals("2014-01"));
+    assertTrue(tuples.get(1).getLong("count(*)").equals(50L));
+    assertTrue(tuples.get(1).getDouble("sum(price_f)").equals(25000D));
+    assertTrue(tuples.get(1).getDouble("max(price_f)").equals(500D));
+    assertTrue(tuples.get(1).getDouble("min(price_f)").equals(500D));
+
+    assertTrue(tuples.get(2).get("test_dt").equals("2015-01"));
+    assertTrue(tuples.get(2).getLong("count(*)").equals(50L));
+    assertTrue(tuples.get(2).getDouble("sum(price_f)").equals(15000D));
+    assertTrue(tuples.get(2).getDouble("max(price_f)").equals(300D));
+    assertTrue(tuples.get(2).getDouble("min(price_f)").equals(300D));
+
+    assertTrue(tuples.get(3).get("test_dt").equals("2016-01"));
+    assertTrue(tuples.get(3).getLong("count(*)").equals(50L));
+    assertTrue(tuples.get(3).getDouble("sum(price_f)").equals(20000D));
+    assertTrue(tuples.get(3).getDouble("max(price_f)").equals(400D));
+    assertTrue(tuples.get(3).getDouble("min(price_f)").equals(400D));
+
   }
 
   @Test


[34/38] lucene-solr:jira/solr-8668: SOLR-10559: Add tuple documentation

Posted by cp...@apache.org.
SOLR-10559: Add tuple documentation


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

Branch: refs/heads/jira/solr-8668
Commit: 5b93b738b1df85c66044ac5d9ec3a64a96b42e62
Parents: a827a9d
Author: Joel Bernstein <jb...@apache.org>
Authored: Thu Jun 1 17:14:02 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Thu Jun 1 17:14:02 2017 -0400

----------------------------------------------------------------------
 solr/solr-ref-guide/src/stream-sources.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5b93b738/solr/solr-ref-guide/src/stream-sources.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-sources.adoc b/solr/solr-ref-guide/src/stream-sources.adoc
index e8887b4..97a1ca4 100644
--- a/solr/solr-ref-guide/src/stream-sources.adoc
+++ b/solr/solr-ref-guide/src/stream-sources.adoc
@@ -497,7 +497,7 @@ the tuple stream from the Stream Expression into a list of Tuples.
 [source,text]
 ----
 tuple(a=add(1,1),
-      b=search(collection1, q="cat:a", fl="a, b, c", sort"a desc"))
+      b=search(collection1, q="cat:a", fl="a, b, c", sort="a desc"))
 ----
 
 


[22/38] lucene-solr:jira/solr-8668: SOLR-10793: BlobHandler should have a well-known permission name

Posted by cp...@apache.org.
SOLR-10793:  BlobHandler should have a well-known permission name


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

Branch: refs/heads/jira/solr-8668
Commit: 4a378eb0ad9963579ebc45e4b3755f378e7500cc
Parents: 82f2a35
Author: Noble Paul <no...@apache.org>
Authored: Thu Jun 1 13:44:02 2017 +0930
Committer: Noble Paul <no...@apache.org>
Committed: Thu Jun 1 13:44:02 2017 +0930

----------------------------------------------------------------------
 solr/CHANGES.txt                                  |  2 ++
 .../java/org/apache/solr/handler/BlobHandler.java | 18 +++++++++++++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a378eb0/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 98f3ec2..e52cf17 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -203,6 +203,8 @@ Other Changes
 
 * SOLR-10757: delete/refactor/cleanup CollectionAdminRequest deprecations (hossman)
 
+* SOLR-10793: BlobHandler should have a well-known permission name (noble)
+
 ==================  6.7.0 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a378eb0/solr/core/src/java/org/apache/solr/handler/BlobHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/BlobHandler.java b/solr/core/src/java/org/apache/solr/handler/BlobHandler.java
index 052fcfe..93cf80c 100644
--- a/solr/core/src/java/org/apache/solr/handler/BlobHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/BlobHandler.java
@@ -54,6 +54,8 @@ import org.apache.solr.request.SolrRequestInfo;
 import org.apache.solr.response.SolrQueryResponse;
 import org.apache.solr.schema.FieldType;
 import org.apache.solr.search.QParser;
+import org.apache.solr.security.AuthorizationContext;
+import org.apache.solr.security.PermissionNameProvider;
 import org.apache.solr.update.AddUpdateCommand;
 import org.apache.solr.update.CommitUpdateCommand;
 import org.apache.solr.update.processor.UpdateRequestProcessor;
@@ -69,8 +71,9 @@ import static org.apache.solr.common.params.CommonParams.JSON;
 import static org.apache.solr.common.params.CommonParams.SORT;
 import static org.apache.solr.common.params.CommonParams.VERSION;
 import static org.apache.solr.common.util.Utils.makeMap;
+import static org.apache.solr.security.PermissionNameProvider.Name.UPDATE_PERM;
 
-public class BlobHandler extends RequestHandlerBase implements PluginInfoInitialized {
+public class BlobHandler extends RequestHandlerBase implements PluginInfoInitialized , PermissionNameProvider {
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
   private static final long DEFAULT_MAX_SIZE = 5 * 1024 * 1024; // 5MB
@@ -293,4 +296,17 @@ public class BlobHandler extends RequestHandlerBase implements PluginInfoInitial
   public Collection<Api> getApis() {
     return ApiBag.wrapRequestHandlers(this, "core.system.blob", "core.system.blob.upload");
   }
+
+  @Override
+  public Name getPermissionName(AuthorizationContext ctx) {
+    switch (ctx.getHttpMethod()) {
+      case "GET":
+        return Name.READ_PERM;
+      case "POST":
+        return Name.UPDATE_PERM;
+      default:
+        return null;
+    }
+
+  }
 }


[04/38] lucene-solr:jira/solr-8668: SOLR-10752: replicationFactor default is 0 if tlogReplicas > 0 is specified

Posted by cp...@apache.org.
SOLR-10752: replicationFactor default is 0 if tlogReplicas > 0 is specified


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

Branch: refs/heads/jira/solr-8668
Commit: c824b097b4f2d2f8d7b9560ee258c3a2515fbcf0
Parents: 4608e7d
Author: Tomas Fernandez Lobbe <tf...@apache.org>
Authored: Tue May 30 17:54:28 2017 -0700
Committer: Tomas Fernandez Lobbe <tf...@apache.org>
Committed: Tue May 30 17:54:28 2017 -0700

----------------------------------------------------------------------
 solr/CHANGES.txt                                |  3 +++
 .../apache/solr/cloud/CreateCollectionCmd.java  |  4 ++--
 .../org/apache/solr/cloud/TestPullReplica.java  | 20 +++++++++++++++++---
 .../org/apache/solr/cloud/TestTlogReplica.java  | 20 +++++++++++++++++---
 4 files changed, 39 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c824b097/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 3661037..f57cac5 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -198,6 +198,9 @@ Other Changes
 
 * SOLR-10755: delete/refactor many solrj deprecations (hossman)
 
+* SOLR-10752: replicationFactor (nrtReplicas) default is 0 if tlogReplicas is specified when creating a collection
+  (Tomás Fernández Löbbe)
+
 ==================  6.7.0 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c824b097/solr/core/src/java/org/apache/solr/cloud/CreateCollectionCmd.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/CreateCollectionCmd.java b/solr/core/src/java/org/apache/solr/cloud/CreateCollectionCmd.java
index 3d1a54e..02bb018 100644
--- a/solr/core/src/java/org/apache/solr/cloud/CreateCollectionCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/CreateCollectionCmd.java
@@ -95,9 +95,9 @@ public class CreateCollectionCmd implements Cmd {
       // look at the replication factor and see if it matches reality
       // if it does not, find best nodes to create more cores
 
-      int numNrtReplicas = message.getInt(NRT_REPLICAS, message.getInt(REPLICATION_FACTOR, 1));
-      int numPullReplicas = message.getInt(PULL_REPLICAS, 0);
       int numTlogReplicas = message.getInt(TLOG_REPLICAS, 0);
+      int numNrtReplicas = message.getInt(NRT_REPLICAS, message.getInt(REPLICATION_FACTOR, numTlogReplicas>0?0:1));
+      int numPullReplicas = message.getInt(PULL_REPLICAS, 0);
 
       ShardHandler shardHandler = ocmh.shardHandlerFactory.getShardHandler();
       final String async = message.getStr(ASYNC);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c824b097/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java b/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
index cb732ff..cb0603d 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
@@ -29,6 +29,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
 import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrServerException;
@@ -116,9 +117,22 @@ public class TestPullReplica extends SolrCloudTestCase {
   @Repeat(iterations=2) // 2 times to make sure cleanup is complete and we can create the same collection
   public void testCreateDelete() throws Exception {
     try {
-      CollectionAdminRequest.createCollection(collectionName, "conf", 2, 1, 0, 3)
-      .setMaxShardsPerNode(100)
-      .process(cluster.getSolrClient());
+      if (random().nextBoolean()) {
+        CollectionAdminRequest.createCollection(collectionName, "conf", 2, 1, 0, 3)
+        .setMaxShardsPerNode(100)
+        .process(cluster.getSolrClient());
+      } else {
+        // Sometimes don't use SolrJ.
+        String url = String.format(Locale.ROOT, "%s/admin/collections?action=CREATE&name=%s&numShards=%s&pullReplicas=%s&maxShardsPerNode=%s", 
+            cluster.getRandomJetty(random()).getBaseUrl(), 
+            collectionName,
+            2,    // numShards
+            3,    // pullReplicas 
+            100); // maxShardsPerNode
+        url = url + pickRandom("", "&nrtReplicas=1", "&replicationFactor=1"); // These options should all mean the same
+        HttpGet createCollectionRequest = new HttpGet(url);
+        cluster.getSolrClient().getHttpClient().execute(createCollectionRequest);
+      }
       boolean reloaded = false;
       while (true) {
         DocCollection docCollection = getCollectionState(collectionName);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c824b097/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java b/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
index 034a8bf..1c2e7aa 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
@@ -30,6 +30,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
 import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.client.solrj.SolrClient;
@@ -144,9 +145,22 @@ public class TestTlogReplica extends SolrCloudTestCase {
   @Repeat(iterations=2) // 2 times to make sure cleanup is complete and we can create the same collection
   public void testCreateDelete() throws Exception {
     try {
-      CollectionAdminRequest.createCollection(collectionName, "conf", 2, 0, 4, 0)
-      .setMaxShardsPerNode(100)
-      .process(cluster.getSolrClient());
+      if (random().nextBoolean()) {
+        CollectionAdminRequest.createCollection(collectionName, "conf", 2, 0, 4, 0)
+        .setMaxShardsPerNode(100)
+        .process(cluster.getSolrClient());
+      } else {
+        // Sometimes don't use SolrJ
+        String url = String.format(Locale.ROOT, "%s/admin/collections?action=CREATE&name=%s&numShards=%s&tlogReplicas=%s&maxShardsPerNode=%s", 
+            cluster.getRandomJetty(random()).getBaseUrl(), 
+            collectionName,
+            2,    // numShards
+            4,    // tlogReplicas 
+            100); // maxShardsPerNode
+        HttpGet createCollectionRequest = new HttpGet(url);
+        cluster.getSolrClient().getHttpClient().execute(createCollectionRequest);
+      }
+      
       boolean reloaded = false;
       while (true) {
         DocCollection docCollection = getCollectionState(collectionName);


[17/38] lucene-solr:jira/solr-8668: SOLR-10773: Add support for replica types in V2 API

Posted by cp...@apache.org.
SOLR-10773: Add support for replica types in V2 API


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

Branch: refs/heads/jira/solr-8668
Commit: 22c2ed070a821efa3c5a81ca03312d4034fcb878
Parents: 3291ef8
Author: Tomas Fernandez Lobbe <tf...@apache.org>
Authored: Wed May 31 13:53:34 2017 -0700
Committer: Tomas Fernandez Lobbe <tf...@apache.org>
Committed: Wed May 31 13:53:34 2017 -0700

----------------------------------------------------------------------
 .../org/apache/solr/cloud/AddReplicaCmd.java    |  3 +-
 .../resources/apispec/collections.Commands.json | 14 ++-
 .../collections.collection.shards.Commands.json |  5 ++
 .../org/apache/solr/cloud/TestPullReplica.java  | 89 ++++++++++++++++----
 .../org/apache/solr/cloud/TestTlogReplica.java  | 86 +++++++++++++++----
 .../solr/handler/admin/TestCollectionAPIs.java  | 38 ++++++++-
 6 files changed, 197 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/22c2ed07/solr/core/src/java/org/apache/solr/cloud/AddReplicaCmd.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/AddReplicaCmd.java b/solr/core/src/java/org/apache/solr/cloud/AddReplicaCmd.java
index 7338d9e..63acdd1 100644
--- a/solr/core/src/java/org/apache/solr/cloud/AddReplicaCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/AddReplicaCmd.java
@@ -22,6 +22,7 @@ import java.lang.invoke.MethodHandles;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.Locale;
 import java.util.Map;
 
 import org.apache.commons.lang.StringUtils;
@@ -72,7 +73,7 @@ public class AddReplicaCmd implements OverseerCollectionMessageHandler.Cmd {
     String node = message.getStr(CoreAdminParams.NODE);
     String shard = message.getStr(SHARD_ID_PROP);
     String coreName = message.getStr(CoreAdminParams.NAME);
-    Replica.Type replicaType = Replica.Type.valueOf(message.getStr(ZkStateReader.REPLICA_TYPE, Replica.Type.NRT.name()));
+    Replica.Type replicaType = Replica.Type.valueOf(message.getStr(ZkStateReader.REPLICA_TYPE, Replica.Type.NRT.name()).toUpperCase(Locale.ROOT));
     boolean parallel = message.getBool("parallel", false);
     if (StringUtils.isBlank(coreName)) {
       coreName = message.getStr(CoreAdminParams.PROPERTY_PREFIX + CoreAdminParams.NAME);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/22c2ed07/solr/core/src/resources/apispec/collections.Commands.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/collections.Commands.json b/solr/core/src/resources/apispec/collections.Commands.json
index 8f5132a..13a75c0 100644
--- a/solr/core/src/resources/apispec/collections.Commands.json
+++ b/solr/core/src/resources/apispec/collections.Commands.json
@@ -51,7 +51,19 @@
         },
         "replicationFactor": {
           "type": "integer",
-          "description": "The number of replicas to be created for each shard. Replicas are physical copies of each shard, acting as failover for the shard."
+          "description": "The number of NRT replicas to be created for each shard. Replicas are physical copies of each shard, acting as failover for the shard."
+        },
+        "nrtReplicas": {
+          "type": "integer",
+          "description": "The number of NRT replicas to be created for each shard. Replicas are physical copies of each shard, acting as failover for the shard. Replicas of type NRT will be updated with each document that is added to the cluster, and can use \"softCommits\" to get a new view of the index in Near Real Time. This parameter works in the same way as 'replicationFactor'"
+        },
+        "tlogReplicas": {
+          "type": "integer",
+          "description": "The number of TLOG replicas to be created for each shard. TLOG replicas update their transaction log for every update to the cluster, but only the shard leader updates the local index, other TLOG replicas will use segment replication and copy the latest index files from the leader."
+        },
+        "pullReplicas": {
+          "type": "integer",
+          "description": "The number of PULL replicas to be created for each shard. PULL replicas don't receive copies of the documents on update requests, they just replicate the latest segments periodically from the shard leader. PULL replicas can't become shard leaders, and need at least one active TLOG(recommended) or NRT replicas in the shard to replicate from."
         },
         "nodeSet": {
           "type": "array",

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/22c2ed07/solr/core/src/resources/apispec/collections.collection.shards.Commands.json
----------------------------------------------------------------------
diff --git a/solr/core/src/resources/apispec/collections.collection.shards.Commands.json b/solr/core/src/resources/apispec/collections.collection.shards.Commands.json
index c3bf7bf..4750e2c 100644
--- a/solr/core/src/resources/apispec/collections.collection.shards.Commands.json
+++ b/solr/core/src/resources/apispec/collections.collection.shards.Commands.json
@@ -101,6 +101,11 @@
         "async": {
           "type": "string",
           "description": "Defines a request ID that can be used to track this action after it's submitted. The action will be processed asynchronously when this is defined."
+        },
+        "type": {
+          "type": "string",
+          "enum":["NRT", "TLOG", "PULL"],
+          "description": "The type of replica to add. NRT (default), TLOG or PULL"
         }
       },
       "required":["shard"]

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/22c2ed07/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java b/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
index cb0603d..2156d3b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestPullReplica.java
@@ -28,8 +28,12 @@ import java.util.Map;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrServerException;
@@ -117,21 +121,40 @@ public class TestPullReplica extends SolrCloudTestCase {
   @Repeat(iterations=2) // 2 times to make sure cleanup is complete and we can create the same collection
   public void testCreateDelete() throws Exception {
     try {
-      if (random().nextBoolean()) {
-        CollectionAdminRequest.createCollection(collectionName, "conf", 2, 1, 0, 3)
-        .setMaxShardsPerNode(100)
-        .process(cluster.getSolrClient());
-      } else {
-        // Sometimes don't use SolrJ.
-        String url = String.format(Locale.ROOT, "%s/admin/collections?action=CREATE&name=%s&numShards=%s&pullReplicas=%s&maxShardsPerNode=%s", 
-            cluster.getRandomJetty(random()).getBaseUrl(), 
-            collectionName,
-            2,    // numShards
-            3,    // pullReplicas 
-            100); // maxShardsPerNode
-        url = url + pickRandom("", "&nrtReplicas=1", "&replicationFactor=1"); // These options should all mean the same
-        HttpGet createCollectionRequest = new HttpGet(url);
-        cluster.getSolrClient().getHttpClient().execute(createCollectionRequest);
+      switch (random().nextInt(3)) {
+        case 0:
+          // Sometimes use SolrJ
+          CollectionAdminRequest.createCollection(collectionName, "conf", 2, 1, 0, 3)
+          .setMaxShardsPerNode(100)
+          .process(cluster.getSolrClient());
+          break;
+        case 1:
+          // Sometimes use v1 API
+          String url = String.format(Locale.ROOT, "%s/admin/collections?action=CREATE&name=%s&numShards=%s&pullReplicas=%s&maxShardsPerNode=%s",
+              cluster.getRandomJetty(random()).getBaseUrl(),
+              collectionName,
+              2,    // numShards
+              3,    // pullReplicas
+              100); // maxShardsPerNode
+          url = url + pickRandom("", "&nrtReplicas=1", "&replicationFactor=1"); // These options should all mean the same
+          HttpGet createCollectionGet = new HttpGet(url);
+          cluster.getSolrClient().getHttpClient().execute(createCollectionGet);
+          break;
+        case 2:
+          // Sometimes use V2 API
+          url = cluster.getRandomJetty(random()).getBaseUrl().toString() + "/____v2/c";
+          String requestBody = String.format(Locale.ROOT, "{create:{name:%s, numShards:%s, pullReplicas:%s, maxShardsPerNode:%s %s}}",
+              collectionName,
+              2,    // numShards
+              3,    // pullReplicas
+              100, // maxShardsPerNode
+              pickRandom("", ", nrtReplicas:1", ", replicationFactor:1")); // These options should all mean the same
+          HttpPost createCollectionPost = new HttpPost(url);
+          createCollectionPost.setHeader("Content-type", "application/json");
+          createCollectionPost.setEntity(new StringEntity(requestBody));
+          HttpResponse httpResponse = cluster.getSolrClient().getHttpClient().execute(createCollectionPost);
+          assertEquals(200, httpResponse.getStatusLine().getStatusCode());
+          break;
       }
       boolean reloaded = false;
       while (true) {
@@ -243,9 +266,9 @@ public class TestPullReplica extends SolrCloudTestCase {
     DocCollection docCollection = assertNumberOfReplicas(2, 0, 0, false, true);
     assertEquals(2, docCollection.getSlices().size());
     
-    CollectionAdminRequest.addReplicaToShard(collectionName, "shard1", Replica.Type.PULL).process(cluster.getSolrClient());
+    addReplicaToShard("shard1", Replica.Type.PULL);
     docCollection = assertNumberOfReplicas(2, 0, 1, true, false);
-    CollectionAdminRequest.addReplicaToShard(collectionName, "shard2", Replica.Type.PULL).process(cluster.getSolrClient());    
+    addReplicaToShard("shard2", Replica.Type.PULL);
     docCollection = assertNumberOfReplicas(2, 0, 2, true, false);
     
     waitForState("Expecting collection to have 2 shards and 2 replica each", collectionName, clusterShape(2, 2));
@@ -587,4 +610,36 @@ public class TestPullReplica extends SolrCloudTestCase {
     cluster.getSolrClient().add(collectionName, docs);
     cluster.getSolrClient().commit(collectionName);
   }
+  
+  private void addReplicaToShard(String shardName, Replica.Type type) throws ClientProtocolException, IOException, SolrServerException {
+    switch (random().nextInt(3)) {
+      case 0: // Add replica with SolrJ
+        CollectionAdminResponse response = CollectionAdminRequest.addReplicaToShard(collectionName, shardName, type).process(cluster.getSolrClient());
+        assertEquals("Unexpected response status: " + response.getStatus(), 0, response.getStatus());
+        break;
+      case 1: // Add replica with V1 API
+        String url = String.format(Locale.ROOT, "%s/admin/collections?action=ADDREPLICA&collection=%s&shard=%s&type=%s",
+            cluster.getRandomJetty(random()).getBaseUrl(),
+            collectionName,
+            shardName,
+            type);
+        HttpGet addReplicaGet = new HttpGet(url);
+        HttpResponse httpResponse = cluster.getSolrClient().getHttpClient().execute(addReplicaGet);
+        assertEquals(200, httpResponse.getStatusLine().getStatusCode());
+        break;
+      case 2:// Add replica with V2 API
+        url = String.format(Locale.ROOT, "%s/____v2/c/%s/shards",
+            cluster.getRandomJetty(random()).getBaseUrl(),
+            collectionName);
+        String requestBody = String.format(Locale.ROOT, "{add-replica:{shard:%s, type:%s}}",
+            shardName,
+            type);
+        HttpPost addReplicaPost = new HttpPost(url);
+        addReplicaPost.setHeader("Content-type", "application/json");
+        addReplicaPost.setEntity(new StringEntity(requestBody));
+        httpResponse = cluster.getSolrClient().getHttpClient().execute(addReplicaPost);
+        assertEquals(200, httpResponse.getStatusLine().getStatusCode());
+        break;
+    }
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/22c2ed07/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java b/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
index 1c2e7aa..9990601 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
@@ -29,8 +29,12 @@ import java.util.concurrent.Semaphore;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
 import org.apache.http.client.HttpClient;
 import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.entity.StringEntity;
 import org.apache.lucene.index.IndexWriter;
 import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.client.solrj.SolrClient;
@@ -145,20 +149,38 @@ public class TestTlogReplica extends SolrCloudTestCase {
   @Repeat(iterations=2) // 2 times to make sure cleanup is complete and we can create the same collection
   public void testCreateDelete() throws Exception {
     try {
-      if (random().nextBoolean()) {
-        CollectionAdminRequest.createCollection(collectionName, "conf", 2, 0, 4, 0)
-        .setMaxShardsPerNode(100)
-        .process(cluster.getSolrClient());
-      } else {
-        // Sometimes don't use SolrJ
-        String url = String.format(Locale.ROOT, "%s/admin/collections?action=CREATE&name=%s&numShards=%s&tlogReplicas=%s&maxShardsPerNode=%s", 
-            cluster.getRandomJetty(random()).getBaseUrl(), 
-            collectionName,
-            2,    // numShards
-            4,    // tlogReplicas 
-            100); // maxShardsPerNode
-        HttpGet createCollectionRequest = new HttpGet(url);
-        cluster.getSolrClient().getHttpClient().execute(createCollectionRequest);
+      switch (random().nextInt(3)) {
+        case 0:
+          CollectionAdminRequest.createCollection(collectionName, "conf", 2, 0, 4, 0)
+          .setMaxShardsPerNode(100)
+          .process(cluster.getSolrClient());
+          break;
+        case 1:
+          // Sometimes don't use SolrJ
+          String url = String.format(Locale.ROOT, "%s/admin/collections?action=CREATE&name=%s&numShards=%s&tlogReplicas=%s&maxShardsPerNode=%s",
+              cluster.getRandomJetty(random()).getBaseUrl(),
+              collectionName,
+              2,    // numShards
+              4,    // tlogReplicas
+              100); // maxShardsPerNode
+          HttpGet createCollectionGet = new HttpGet(url);
+          HttpResponse httpResponse = cluster.getSolrClient().getHttpClient().execute(createCollectionGet);
+          assertEquals(200, httpResponse.getStatusLine().getStatusCode());
+          break;
+        case 2:
+          // Sometimes use V2 API
+          url = cluster.getRandomJetty(random()).getBaseUrl().toString() + "/____v2/c";
+          String requestBody = String.format(Locale.ROOT, "{create:{name:%s, numShards:%s, tlogReplicas:%s, maxShardsPerNode:%s}}",
+              collectionName,
+              2,    // numShards
+              4,    // tlogReplicas
+              100); // maxShardsPerNode
+          HttpPost createCollectionPost = new HttpPost(url);
+          createCollectionPost.setHeader("Content-type", "application/json");
+          createCollectionPost.setEntity(new StringEntity(requestBody));
+          httpResponse = cluster.getSolrClient().getHttpClient().execute(createCollectionPost);
+          assertEquals(200, httpResponse.getStatusLine().getStatusCode());
+          break;
       }
       
       boolean reloaded = false;
@@ -244,9 +266,9 @@ public class TestTlogReplica extends SolrCloudTestCase {
     DocCollection docCollection = createAndWaitForCollection(2, 0, 1, 0);
     assertEquals(2, docCollection.getSlices().size());
     
-    CollectionAdminRequest.addReplicaToShard(collectionName, "shard1", Replica.Type.TLOG).process(cluster.getSolrClient());
+    addReplicaToShard("shard1", Replica.Type.TLOG);
     docCollection = assertNumberOfReplicas(0, 3, 0, true, false);
-    CollectionAdminRequest.addReplicaToShard(collectionName, "shard2", Replica.Type.TLOG).process(cluster.getSolrClient());    
+    addReplicaToShard("shard2", Replica.Type.TLOG);
     docCollection = assertNumberOfReplicas(0, 4, 0, true, false);
     
     waitForState("Expecting collection to have 2 shards and 2 replica each", collectionName, clusterShape(2, 2));
@@ -260,6 +282,38 @@ public class TestTlogReplica extends SolrCloudTestCase {
     assertNumberOfReplicas(0, 3, 0, true, true);
   }
   
+  private void addReplicaToShard(String shardName, Replica.Type type) throws ClientProtocolException, IOException, SolrServerException {
+    switch (random().nextInt(3)) {
+      case 0: // Add replica with SolrJ
+        CollectionAdminResponse response = CollectionAdminRequest.addReplicaToShard(collectionName, shardName, type).process(cluster.getSolrClient());
+        assertEquals("Unexpected response status: " + response.getStatus(), 0, response.getStatus());
+        break;
+      case 1: // Add replica with V1 API
+        String url = String.format(Locale.ROOT, "%s/admin/collections?action=ADDREPLICA&collection=%s&shard=%s&type=%s", 
+            cluster.getRandomJetty(random()).getBaseUrl(), 
+            collectionName,
+            shardName,
+            type);
+        HttpGet addReplicaGet = new HttpGet(url);
+        HttpResponse httpResponse = cluster.getSolrClient().getHttpClient().execute(addReplicaGet);
+        assertEquals(200, httpResponse.getStatusLine().getStatusCode());
+        break;
+      case 2:// Add replica with V2 API
+        url = String.format(Locale.ROOT, "%s/____v2/c/%s/shards", 
+            cluster.getRandomJetty(random()).getBaseUrl(), 
+            collectionName);
+        String requestBody = String.format(Locale.ROOT, "{add-replica:{shard:%s, type:%s}}", 
+            shardName,
+            type);
+        HttpPost addReplicaPost = new HttpPost(url);
+        addReplicaPost.setHeader("Content-type", "application/json");
+        addReplicaPost.setEntity(new StringEntity(requestBody));
+        httpResponse = cluster.getSolrClient().getHttpClient().execute(addReplicaPost);
+        assertEquals(200, httpResponse.getStatusLine().getStatusCode());
+        break;
+    }
+  }
+  
   public void testRemoveLeader() throws Exception {
     doReplaceLeader(true);
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/22c2ed07/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java b/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
index 9f5a246..e7dbf3e 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
@@ -58,11 +58,19 @@ public class TestCollectionAPIs extends SolrTestCaseJ4 {
     MockCollectionsHandler collectionsHandler = new MockCollectionsHandler();
     ApiBag apiBag = new ApiBag(false);
     Collection<Api> apis = collectionsHandler.getApis();
-    for (Api api : apis) apiBag.register(api, Collections.EMPTY_MAP);
+    for (Api api : apis) apiBag.register(api, Collections.emptyMap());
     //test a simple create collection call
     compareOutput(apiBag, "/collections", POST,
         "{create:{name:'newcoll', config:'schemaless', numShards:2, replicationFactor:2 }}", null,
         "{name:newcoll, fromApi:'true', replicationFactor:'2', collection.configName:schemaless, numShards:'2', stateFormat:'2', operation:create}");
+    
+    compareOutput(apiBag, "/collections", POST,
+        "{create:{name:'newcoll', config:'schemaless', numShards:2, nrtReplicas:2 }}", null,
+        "{name:newcoll, fromApi:'true', nrtReplicas:'2', collection.configName:schemaless, numShards:'2', stateFormat:'2', operation:create}");
+    
+    compareOutput(apiBag, "/collections", POST,
+        "{create:{name:'newcoll', config:'schemaless', numShards:2, nrtReplicas:2, tlogReplicas:2, pullReplicas:2 }}", null,
+        "{name:newcoll, fromApi:'true', nrtReplicas:'2', tlogReplicas:'2', pullReplicas:'2', collection.configName:schemaless, numShards:'2', stateFormat:'2', operation:create}");
 
     //test a create collection with custom properties
     compareOutput(apiBag, "/collections", POST,
@@ -106,6 +114,21 @@ public class TestCollectionAPIs extends SolrTestCaseJ4 {
         "{split:{ splitKey:id12345, coreProperties : {prop1:prop1Val, prop2:prop2Val} }}", null,
         "{collection: collName , split.key : id12345 , operation : splitshard, property.prop1:prop1Val, property.prop2: prop2Val}"
     );
+    
+    compareOutput(apiBag, "/collections/collName/shards", POST,
+        "{add-replica:{shard: shard1, node: 'localhost_8978' , type:'TLOG' }}", null,
+        "{collection: collName , shard : shard1, node :'localhost_8978', operation : addreplica, type: TLOG}"
+    );
+    
+    compareOutput(apiBag, "/collections/collName/shards", POST,
+        "{add-replica:{shard: shard1, node: 'localhost_8978' , type:'PULL' }}", null,
+        "{collection: collName , shard : shard1, node :'localhost_8978', operation : addreplica, type: PULL}"
+    );
+    
+    assertErrorContains(apiBag, "/collections/collName/shards", POST,
+        "{add-replica:{shard: shard1, node: 'localhost_8978' , type:'foo' }}", null,
+        "Value of enum must be one of"
+    );
 
     compareOutput(apiBag, "/collections/collName", POST,
         "{add-replica-property : {name:propA , value: VALA, shard: shard1, replica:replica1}}", null,
@@ -150,13 +173,22 @@ public class TestCollectionAPIs extends SolrTestCaseJ4 {
     Map expected = (Map) fromJSONString(expectedOutputMapJson);
     assertMapEqual(expected, output);
     return output;
-
+  }
+  
+  static void assertErrorContains(final ApiBag apiBag, final String path, final SolrRequest.METHOD method,
+      final String payload, final CoreContainer cc, String expectedErrorMsg) throws Exception {
+    try {
+      makeCall(apiBag, path, method, payload, cc);
+      fail("Expected exception");
+    } catch (RuntimeException e) {
+      assertTrue("Expected exception with error message '" + expectedErrorMsg + "' but got: " + e.getMessage(), e.getMessage().contains(expectedErrorMsg));
+    }
   }
 
   public static Pair<SolrQueryRequest, SolrQueryResponse> makeCall(final ApiBag apiBag, String path,
                                                                    final SolrRequest.METHOD method,
                                                                    final String payload, final CoreContainer cc) throws Exception {
-    SolrParams queryParams = new MultiMapSolrParams(Collections.EMPTY_MAP);
+    SolrParams queryParams = new MultiMapSolrParams(Collections.emptyMap());
     if (path.indexOf('?') > 0) {
       String queryStr = path.substring(path.indexOf('?') + 1);
       path = path.substring(0, path.indexOf('?'));


[10/38] lucene-solr:jira/solr-8668: SOLR-10757: delete/refactor/cleanup CollectionAdminRequest deprecations

Posted by cp...@apache.org.
SOLR-10757: delete/refactor/cleanup CollectionAdminRequest deprecations


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

Branch: refs/heads/jira/solr-8668
Commit: ee33f38bd1b4c039dc0d054ccf0eb2904fc9ea92
Parents: c680de1
Author: Chris Hostetter <ho...@apache.org>
Authored: Wed May 31 09:49:56 2017 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Wed May 31 09:49:56 2017 -0700

----------------------------------------------------------------------
 solr/CHANGES.txt                                |   2 +
 .../solr/core/snapshots/SolrSnapshotsTool.java  |   7 +-
 .../AbstractCloudBackupRestoreTestCase.java     |  11 +-
 .../CollectionsAPIAsyncDistributedZkTest.java   |  62 +-
 .../solr/cloud/CollectionsAPISolrJTest.java     |  12 +-
 ...ConcurrentDeleteAndCreateCollectionTest.java |  12 +-
 .../org/apache/solr/cloud/DeleteStatusTest.java |  23 -
 .../org/apache/solr/cloud/ForceLeaderTest.java  |  25 +-
 .../cloud/FullSolrCloudDistribCmdsTest.java     |  16 +-
 .../apache/solr/cloud/HttpPartitionTest.java    |  36 +-
 .../cloud/LeaderFailoverAfterPartitionTest.java |  10 +-
 .../LeaderInitiatedRecoveryOnCommitTest.java    |  19 +-
 .../apache/solr/cloud/MultiThreadedOCPTest.java |  63 +-
 .../org/apache/solr/cloud/ReplaceNodeTest.java  |   4 +-
 .../solr/cloud/ReplicationFactorTest.java       |   4 +-
 .../apache/solr/cloud/RollingRestartTest.java   |   2 +-
 .../org/apache/solr/cloud/ShardSplitTest.java   |   8 +-
 .../cloud/SharedFSAutoReplicaFailoverTest.java  |  24 +-
 .../cloud/SimpleCollectionCreateDeleteTest.java |  13 +-
 .../apache/solr/cloud/TestCollectionAPI.java    |  24 +-
 .../cloud/TestRandomRequestDistribution.java    |  15 +-
 .../solr/cloud/TestRequestForwarding.java       |   6 +-
 .../cloud/TestSolrCloudWithKerberosAlt.java     |   9 +-
 .../TestSolrCloudWithSecureImpersonation.java   |   6 +-
 .../apache/solr/handler/TestBlobHandler.java    |  10 +-
 .../solr/search/stats/TestDistribIDF.java       |  13 +-
 .../solrj/request/CollectionAdminRequest.java   | 844 ++-----------------
 ...ollectionAdminRequestRequiredParamsTest.java | 137 +--
 .../request/TestCollectionAdminRequest.java     |  84 +-
 .../cloud/AbstractFullDistribZkTestBase.java    |  23 +-
 30 files changed, 316 insertions(+), 1208 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 3661037..d78f991 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -198,6 +198,8 @@ Other Changes
 
 * SOLR-10755: delete/refactor many solrj deprecations (hossman)
 
+* SOLR-10757: delete/refactor/cleanup CollectionAdminRequest deprecations (hossman)
+
 ==================  6.7.0 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/java/org/apache/solr/core/snapshots/SolrSnapshotsTool.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/core/snapshots/SolrSnapshotsTool.java b/solr/core/src/java/org/apache/solr/core/snapshots/SolrSnapshotsTool.java
index 935ef63..76e5beb 100644
--- a/solr/core/src/java/org/apache/solr/core/snapshots/SolrSnapshotsTool.java
+++ b/solr/core/src/java/org/apache/solr/core/snapshots/SolrSnapshotsTool.java
@@ -301,11 +301,8 @@ public class SolrSnapshotsTool implements Closeable {
       if (backupRepo.isPresent()) {
         backup.setRepositoryName(backupRepo.get());
       }
-      if (asyncReqId.isPresent()) {
-        backup.setAsyncId(asyncReqId.get());
-      }
-      CollectionAdminResponse resp = backup.process(solrClient);
-      Preconditions.checkState(resp.getStatus() == 0, "The request failed. The status code is " + resp.getStatus());
+      // if asyncId is null, processAsync will block and throw an Exception with any error
+      backup.processAsync(asyncReqId.orElse(null), solrClient);
     } catch (Exception e) {
       log.error("Failed to backup collection meta-data for collection " + collectionName, e);
       System.out.println("Failed to backup collection meta-data for collection " + collectionName

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/AbstractCloudBackupRestoreTestCase.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/AbstractCloudBackupRestoreTestCase.java b/solr/core/src/test/org/apache/solr/cloud/AbstractCloudBackupRestoreTestCase.java
index f86322d..526a8df 100644
--- a/solr/core/src/test/org/apache/solr/cloud/AbstractCloudBackupRestoreTestCase.java
+++ b/solr/core/src/test/org/apache/solr/cloud/AbstractCloudBackupRestoreTestCase.java
@@ -87,8 +87,12 @@ public abstract class AbstractCloudBackupRestoreTestCase extends SolrCloudTestCa
     int replFactor = TestUtil.nextInt(random(), 1, 2);
     int numTlogReplicas = TestUtil.nextInt(random(), 0, 1);
     int numPullReplicas = TestUtil.nextInt(random(), 0, 1);
-    CollectionAdminRequest.Create create =
-        CollectionAdminRequest.createCollection(getCollectionName(), "conf1", NUM_SHARDS, replFactor, numTlogReplicas, numPullReplicas);
+    
+    CollectionAdminRequest.Create create = isImplicit ?
+      // NOTE: use shard list with same # of shards as NUM_SHARDS; we assume this later
+      CollectionAdminRequest.createCollectionWithImplicitRouter(getCollectionName(), "conf1", "shard1,shard2", replFactor, numTlogReplicas, numPullReplicas) :
+      CollectionAdminRequest.createCollection(getCollectionName(), "conf1", NUM_SHARDS, replFactor, numTlogReplicas, numPullReplicas);
+    
     if (NUM_SHARDS * (replFactor + numTlogReplicas + numPullReplicas) > cluster.getJettySolrRunners().size() || random().nextBoolean()) {
       create.setMaxShardsPerNode((int)Math.ceil(NUM_SHARDS * (replFactor + numTlogReplicas + numPullReplicas) / cluster.getJettySolrRunners().size()));//just to assert it survives the restoration
       if (doSplitShardOperation) {
@@ -102,9 +106,6 @@ public abstract class AbstractCloudBackupRestoreTestCase extends SolrCloudTestCa
     coreProps.put("customKey", "customValue");//just to assert it survives the restoration
     create.setProperties(coreProps);
     if (isImplicit) { //implicit router
-      create.setRouterName(ImplicitDocRouter.NAME);
-      create.setNumShards(null);//erase it. TODO suggest a new createCollectionWithImplicitRouter method
-      create.setShards("shard1,shard2"); // however still same number as NUM_SHARDS; we assume this later
       create.setRouterField("shard_s");
     } else {//composite id router
       if (random().nextBoolean()) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIAsyncDistributedZkTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIAsyncDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIAsyncDistributedZkTest.java
index 30c3c9e..1474b5c 100644
--- a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIAsyncDistributedZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIAsyncDistributedZkTest.java
@@ -24,8 +24,6 @@ import org.apache.lucene.util.TestUtil;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.impl.CloudSolrClient;
 import org.apache.solr.client.solrj.request.CollectionAdminRequest;
-import org.apache.solr.client.solrj.request.CollectionAdminRequest.Create;
-import org.apache.solr.client.solrj.request.CollectionAdminRequest.SplitShard;
 import org.apache.solr.client.solrj.response.RequestStatusState;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.SolrInputDocument;
@@ -54,29 +52,19 @@ public class CollectionsAPIAsyncDistributedZkTest extends SolrCloudTestCase {
 
     final CloudSolrClient client = cluster.getSolrClient();
 
-    RequestStatusState state = new Create()
-        .setCollectionName("testasynccollectioncreation")
-        .setNumShards(1)
-        .setReplicationFactor(1)
-        .setConfigName("conf1")
+    RequestStatusState state = CollectionAdminRequest.createCollection("testasynccollectioncreation","conf1",1,1)
         .processAndWait(client, MAX_TIMEOUT_SECONDS);
     assertSame("CreateCollection task did not complete!", RequestStatusState.COMPLETED, state);
 
-    state = new Create()
-        .setCollectionName("testasynccollectioncreation")
-        .setNumShards(1)
-        .setConfigName("conf1")
+    state = CollectionAdminRequest.createCollection("testasynccollectioncreation","conf1",1,1)
         .processAndWait(client, MAX_TIMEOUT_SECONDS);
     assertSame("Recreating a collection with the same should have failed.", RequestStatusState.FAILED, state);
 
-    state = new CollectionAdminRequest.AddReplica()
-        .setCollectionName("testasynccollectioncreation")
-        .setShardName("shard1")
-        .processAndWait(client, MAX_TIMEOUT_SECONDS);
+    state = CollectionAdminRequest.addReplicaToShard("testasynccollectioncreation", "shard1")
+      .processAndWait(client, MAX_TIMEOUT_SECONDS);
     assertSame("Add replica did not complete", RequestStatusState.COMPLETED, state);
 
-    state = new SplitShard()
-        .setCollectionName("testasynccollectioncreation")
+    state = CollectionAdminRequest.splitShard("testasynccollectioncreation")
         .setShardName("shard1")
         .processAndWait(client, MAX_TIMEOUT_SECONDS * 2);
     assertEquals("Shard split did not complete. Last recorded state: " + state, RequestStatusState.COMPLETED, state);
@@ -89,12 +77,9 @@ public class CollectionsAPIAsyncDistributedZkTest extends SolrCloudTestCase {
     final String collection = "testAsyncOperations";
     final CloudSolrClient client = cluster.getSolrClient();
 
-    RequestStatusState state = new Create()
-        .setCollectionName(collection)
-        .setNumShards(1)
+    RequestStatusState state = CollectionAdminRequest.createCollection(collection,"conf1",1,1)
         .setRouterName("implicit")
         .setShards("shard1")
-        .setConfigName("conf1")
         .processAndWait(client, MAX_TIMEOUT_SECONDS);
     assertSame("CreateCollection task did not complete!", RequestStatusState.COMPLETED, state);
 
@@ -114,14 +99,11 @@ public class CollectionsAPIAsyncDistributedZkTest extends SolrCloudTestCase {
     query.set("shards", "shard1");
     assertEquals(numDocs, client.query(collection, query).getResults().getNumFound());
 
-    state = new CollectionAdminRequest.Reload()
-        .setCollectionName(collection)
+    state = CollectionAdminRequest.reloadCollection(collection)
         .processAndWait(client, MAX_TIMEOUT_SECONDS);
     assertSame("ReloadCollection did not complete", RequestStatusState.COMPLETED, state);
 
-    state = new CollectionAdminRequest.CreateShard()
-        .setCollectionName(collection)
-        .setShardName("shard2")
+    state = CollectionAdminRequest.createShard(collection,"shard2")
         .processAndWait(client, MAX_TIMEOUT_SECONDS);
     assertSame("CreateShard did not complete", RequestStatusState.COMPLETED, state);
 
@@ -135,16 +117,11 @@ public class CollectionsAPIAsyncDistributedZkTest extends SolrCloudTestCase {
     query.set("shards", "shard2");
     assertEquals(1, client.query(collection, query).getResults().getNumFound());
 
-    state = new CollectionAdminRequest.DeleteShard()
-        .setCollectionName(collection)
-        .setShardName("shard2")
-        .processAndWait(client, MAX_TIMEOUT_SECONDS);
+    state = CollectionAdminRequest.deleteShard(collection,"shard2").processAndWait(client, MAX_TIMEOUT_SECONDS);
     assertSame("DeleteShard did not complete", RequestStatusState.COMPLETED, state);
 
-    state = new CollectionAdminRequest.AddReplica()
-        .setCollectionName(collection)
-        .setShardName("shard1")
-        .processAndWait(client, MAX_TIMEOUT_SECONDS);
+    state = CollectionAdminRequest.addReplicaToShard(collection, "shard1")
+      .processAndWait(client, MAX_TIMEOUT_SECONDS);
     assertSame("AddReplica did not complete", RequestStatusState.COMPLETED, state);
 
     //cloudClient watch might take a couple of seconds to reflect it
@@ -157,9 +134,7 @@ public class CollectionsAPIAsyncDistributedZkTest extends SolrCloudTestCase {
       Thread.sleep(100);
     }
 
-    state = new CollectionAdminRequest.CreateAlias()
-        .setAliasName("myalias")
-        .setAliasedCollections(collection)
+    state = CollectionAdminRequest.createAlias("myalias",collection)
         .processAndWait(client, MAX_TIMEOUT_SECONDS);
     assertSame("CreateAlias did not complete", RequestStatusState.COMPLETED, state);
 
@@ -167,8 +142,7 @@ public class CollectionsAPIAsyncDistributedZkTest extends SolrCloudTestCase {
     query.set("shards", "shard1");
     assertEquals(numDocs, client.query("myalias", query).getResults().getNumFound());
 
-    state = new CollectionAdminRequest.DeleteAlias()
-        .setAliasName("myalias")
+    state = CollectionAdminRequest.deleteAlias("myalias")
         .processAndWait(client, MAX_TIMEOUT_SECONDS);
     assertSame("DeleteAlias did not complete", RequestStatusState.COMPLETED, state);
 
@@ -191,15 +165,11 @@ public class CollectionsAPIAsyncDistributedZkTest extends SolrCloudTestCase {
 
     shard1 = client.getZkStateReader().getClusterState().getSlice(collection, "shard1");
     String replicaName = shard1.getReplicas().iterator().next().getName();
-    state = new CollectionAdminRequest.DeleteReplica()
-        .setCollectionName(collection)
-        .setShardName("shard1")
-        .setReplica(replicaName)
-        .processAndWait(client, MAX_TIMEOUT_SECONDS);
+    state = CollectionAdminRequest.deleteReplica(collection, "shard1", replicaName)
+      .processAndWait(client, MAX_TIMEOUT_SECONDS);
     assertSame("DeleteReplica did not complete", RequestStatusState.COMPLETED, state);
 
-    state = new CollectionAdminRequest.Delete()
-        .setCollectionName(collection)
+    state = CollectionAdminRequest.deleteCollection(collection)
         .processAndWait(client, MAX_TIMEOUT_SECONDS);
     assertSame("DeleteCollection did not complete", RequestStatusState.COMPLETED, state);
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTest.java b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTest.java
index 643660b..861bdcc 100644
--- a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPISolrJTest.java
@@ -267,17 +267,21 @@ public class CollectionsAPISolrJTest extends SolrCloudTestCase {
   @Test
   public void testClusterProp() throws InterruptedException, IOException, SolrServerException {
 
+    // sanity check our expected default
+    final ClusterProperties props = new ClusterProperties(zkClient());
+    assertEquals("Expecting prop to default to unset, test needs upated",
+                 props.getClusterProperty(ZkStateReader.LEGACY_CLOUD, null), null);
+    
     CollectionAdminResponse response = CollectionAdminRequest.setClusterProperty(ZkStateReader.LEGACY_CLOUD, "false")
-        .process(cluster.getSolrClient());
+      .process(cluster.getSolrClient());
 
     assertEquals(0, response.getStatus());
 
-    ClusterProperties props = new ClusterProperties(zkClient());
-    assertEquals("Cluster property was not set", props.getClusterProperty(ZkStateReader.LEGACY_CLOUD, "true"), "false");
+    assertEquals("Cluster property was not set", props.getClusterProperty(ZkStateReader.LEGACY_CLOUD, null), "false");
 
     // Unset ClusterProp that we set.
     CollectionAdminRequest.setClusterProperty(ZkStateReader.LEGACY_CLOUD, null).process(cluster.getSolrClient());
-    assertEquals("Cluster property was not unset", props.getClusterProperty(ZkStateReader.LEGACY_CLOUD, "true"), "true");
+    assertEquals("Cluster property was not unset", props.getClusterProperty(ZkStateReader.LEGACY_CLOUD, null), null);
 
   }
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java b/solr/core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java
index 151230d..bc3b9c5 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ConcurrentDeleteAndCreateCollectionTest.java
@@ -164,11 +164,8 @@ public class ConcurrentDeleteAndCreateCollectionTest extends SolrTestCaseJ4 {
     
     private void createCollection() {
       try {
-        final CollectionAdminResponse response = new CollectionAdminRequest.Create()
-                .setCollectionName(collectionName)
-                .setNumShards(1)
-                .setReplicationFactor(1)
-                .setConfigName(configName).process(solrClient);
+        final CollectionAdminResponse response = CollectionAdminRequest.createCollection(collectionName,configName,1,1)
+                .process(solrClient);
         if (response.getStatus() != 0) {
           addFailure(new RuntimeException("failed to create collection " + collectionName));
         }
@@ -180,9 +177,8 @@ public class ConcurrentDeleteAndCreateCollectionTest extends SolrTestCaseJ4 {
     
     private void deleteCollection() {
       try {
-        final CollectionAdminRequest.Delete deleteCollectionRequest = new CollectionAdminRequest.Delete()
-                .setCollectionName(collectionName);
-        
+        final CollectionAdminRequest.Delete deleteCollectionRequest
+          = CollectionAdminRequest.deleteCollection(collectionName);
         final CollectionAdminResponse response = deleteCollectionRequest.process(solrClient);
         if (response.getStatus() != 0) {
           addFailure(new RuntimeException("failed to delete collection " + collectionName));

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/DeleteStatusTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/DeleteStatusTest.java b/solr/core/src/test/org/apache/solr/cloud/DeleteStatusTest.java
index 3b8e014..bd14ef7 100644
--- a/solr/core/src/test/org/apache/solr/cloud/DeleteStatusTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/DeleteStatusTest.java
@@ -120,27 +120,4 @@ public class DeleteStatusTest extends SolrCloudTestCase {
         CollectionAdminRequest.requestStatus(id2).process(client).getRequestStatus());
 
   }
-
-  @Test
-  @SuppressWarnings("deprecation")
-  public void testDeprecatedConstructorValidation() throws Exception {
-
-    final CloudSolrClient client = cluster.getSolrClient();
-
-    try {
-      new CollectionAdminRequest.DeleteStatus().process(client);
-      fail("delete status should have failed");
-    } catch (IllegalArgumentException e) {
-      assertTrue(e.getMessage().contains("Either requestid or flush parameter must be specified."));
-    }
-
-    try {
-      new CollectionAdminRequest.DeleteStatus().setFlush(true)
-          .setRequestId("foo")
-          .process(client);
-      fail("delete status should have failed");
-    } catch (IllegalArgumentException e) {
-      assertTrue(e.getMessage().contains("Both requestid and flush parameters can not be specified together."));
-    }
-  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/ForceLeaderTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/ForceLeaderTest.java b/solr/core/src/test/org/apache/solr/cloud/ForceLeaderTest.java
index 8f35c88..b57dcb7 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ForceLeaderTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ForceLeaderTest.java
@@ -152,14 +152,7 @@ public class ForceLeaderTest extends HttpPartitionTest {
     } finally {
       log.info("Cleaning up after the test.");
       // try to clean up
-      try {
-        CollectionAdminRequest.Delete req = new CollectionAdminRequest.Delete();
-        req.setCollectionName(testCollectionName);
-        req.process(cloudClient);
-      } catch (Exception e) {
-        // don't fail the test
-        log.warn("Could not delete collection {} after test completed", testCollectionName);
-      }
+      attemptCollectionDelete(cloudClient, testCollectionName);
     }
   }
 
@@ -206,15 +199,7 @@ public class ForceLeaderTest extends HttpPartitionTest {
       }
     } finally {
       log.info("Cleaning up after the test.");
-      // try to clean up
-      try {
-        CollectionAdminRequest.Delete req = new CollectionAdminRequest.Delete();
-        req.setCollectionName(testCollectionName);
-        req.process(cloudClient);
-      } catch (Exception e) {
-        // don't fail the test
-        log.warn("Could not delete collection {} after test completed", testCollectionName);
-      }
+      attemptCollectionDelete(cloudClient, testCollectionName);
     }
   }
 
@@ -431,10 +416,8 @@ public class ForceLeaderTest extends HttpPartitionTest {
   }
 
   private void doForceLeader(SolrClient client, String collectionName, String shard) throws IOException, SolrServerException {
-      CollectionAdminRequest.ForceLeader forceLeader = new CollectionAdminRequest.ForceLeader();
-      forceLeader.setCollectionName(collectionName);
-      forceLeader.setShardName(shard);
-      client.request(forceLeader);
+    CollectionAdminRequest.ForceLeader forceLeader = CollectionAdminRequest.forceLeaderElection(collectionName, shard);
+    client.request(forceLeader);
   }
 
   protected int getNumberOfActiveReplicas(ClusterState clusterState, String collection, String sliceId) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java b/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java
index 7f3ab96..9355c43 100644
--- a/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/FullSolrCloudDistribCmdsTest.java
@@ -157,13 +157,9 @@ public class FullSolrCloudDistribCmdsTest extends AbstractFullDistribZkTestBase
     CollectionAdminResponse response;
     Map<String, NamedList<Integer>> coresStatus;
 
-    CollectionAdminRequest.Create createCollectionRequest = new CollectionAdminRequest.Create()
-            .setCollectionName("implicit_collection_without_routerfield")
-            .setRouterName("implicit")
-            .setNumShards(2)
-            .setShards("shard1,shard2")
-            .setReplicationFactor(2)
-            .setConfigName("conf1");
+    CollectionAdminRequest.Create createCollectionRequest
+      = CollectionAdminRequest.createCollectionWithImplicitRouter("implicit_collection_without_routerfield",
+                                                                  "conf1","shard1,shard2",2);
     response = createCollectionRequest.process(server);
 
     assertEquals(0, response.getStatus());
@@ -285,14 +281,10 @@ public class FullSolrCloudDistribCmdsTest extends AbstractFullDistribZkTestBase
     CollectionAdminResponse response;
     Map<String, NamedList<Integer>> coresStatus;
 
-    response = new CollectionAdminRequest.Create()
-            .setCollectionName("compositeid_collection_with_routerfield")
+    response = CollectionAdminRequest.createCollection("compositeid_collection_with_routerfield","conf1",2,2)
             .setRouterName("compositeId")
             .setRouterField("routefield_s")
-            .setNumShards(2)
             .setShards("shard1,shard2")
-            .setReplicationFactor(2)
-            .setConfigName("conf1")
             .process(server);
 
     assertEquals(0, response.getStatus());

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java b/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
index 2cc1c30..6c7de88 100644
--- a/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
@@ -37,7 +37,6 @@ import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
 import org.apache.solr.client.solrj.impl.CloudSolrClient;
 import org.apache.solr.client.solrj.impl.HttpSolrClient;
-import org.apache.solr.client.solrj.request.CollectionAdminRequest;
 import org.apache.solr.client.solrj.request.QueryRequest;
 import org.apache.solr.client.solrj.request.UpdateRequest;
 import org.apache.solr.common.SolrException;
@@ -199,13 +198,7 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {
     zkClient.delete(znodePath, -1, false);
 
     // try to clean up
-    try {
-      new CollectionAdminRequest.Delete()
-              .setCollectionName(testCollectionName).process(cloudClient);
-    } catch (Exception e) {
-      // don't fail the test
-      log.warn("Could not delete collection {} after test completed", testCollectionName);
-    }
+    attemptCollectionDelete(cloudClient, testCollectionName);
   }
 
   protected void testMinRf() throws Exception {
@@ -387,13 +380,7 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {
     log.info("testRf2 succeeded ... deleting the "+testCollectionName+" collection");
 
     // try to clean up
-    try {
-      new CollectionAdminRequest.Delete()
-              .setCollectionName(testCollectionName).process(cloudClient);
-    } catch (Exception e) {
-      // don't fail the test
-      log.warn("Could not delete collection {} after test completed", testCollectionName);
-    }
+    attemptCollectionDelete(cloudClient, testCollectionName);
   }
   
   protected void testRf3() throws Exception {
@@ -443,14 +430,7 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {
     log.info("testRf3 succeeded ... deleting the "+testCollectionName+" collection");
 
     // try to clean up
-    try {
-      CollectionAdminRequest.Delete req = new CollectionAdminRequest.Delete();
-      req.setCollectionName(testCollectionName);
-      req.process(cloudClient);
-    } catch (Exception e) {
-      // don't fail the test
-      log.warn("Could not delete collection {} after test completed", testCollectionName);
-    }
+    attemptCollectionDelete(cloudClient, testCollectionName);
   }
 
   // test inspired by SOLR-6511
@@ -534,14 +514,7 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {
     log.info("testLeaderZkSessionLoss succeeded ... deleting the "+testCollectionName+" collection");
 
     // try to clean up
-    try {
-      CollectionAdminRequest.Delete req = new CollectionAdminRequest.Delete();
-      req.setCollectionName(testCollectionName);
-      req.process(cloudClient);
-    } catch (Exception e) {
-      // don't fail the test
-      log.warn("Could not delete collection {} after test completed", testCollectionName);
-    }
+    attemptCollectionDelete(cloudClient, testCollectionName);
   }
 
   protected List<Replica> getActiveOrRecoveringReplicas(String testCollectionName, String shardId) throws Exception {    
@@ -693,4 +666,5 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {
 
     log.info("Took {} ms to see replicas [{}] become active.", timer.getTime(), replicasToCheck);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java b/solr/core/src/test/org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java
index f172267..975459d 100644
--- a/solr/core/src/test/org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/LeaderFailoverAfterPartitionTest.java
@@ -20,7 +20,6 @@ import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
 import org.apache.solr.client.solrj.impl.HttpSolrClient;
-import org.apache.solr.client.solrj.request.CollectionAdminRequest;
 import org.apache.solr.common.SolrInputDocument;
 import org.apache.solr.common.cloud.Replica;
 import org.junit.Test;
@@ -184,13 +183,6 @@ public class LeaderFailoverAfterPartitionTest extends HttpPartitionTest {
     assertDocsExistInAllReplicas(participatingReplicas, testCollectionName, 1, 6);
 
     // try to clean up
-    try {
-      CollectionAdminRequest.Delete req = new CollectionAdminRequest.Delete();
-      req.setCollectionName(testCollectionName);
-      req.process(cloudClient);
-    } catch (Exception e) {
-      // don't fail the test
-      log.warn("Could not delete collection {} after test completed", testCollectionName);
-    }
+    attemptCollectionDelete(cloudClient, testCollectionName);
   }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/LeaderInitiatedRecoveryOnCommitTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/LeaderInitiatedRecoveryOnCommitTest.java b/solr/core/src/test/org/apache/solr/cloud/LeaderInitiatedRecoveryOnCommitTest.java
index f3965ac..f900d3a 100644
--- a/solr/core/src/test/org/apache/solr/cloud/LeaderInitiatedRecoveryOnCommitTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/LeaderInitiatedRecoveryOnCommitTest.java
@@ -19,7 +19,6 @@ package org.apache.solr.cloud;
 import org.apache.http.NoHttpResponseException;
 import org.apache.solr.client.solrj.embedded.JettySolrRunner;
 import org.apache.solr.client.solrj.impl.HttpSolrClient;
-import org.apache.solr.client.solrj.request.CollectionAdminRequest;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.cloud.Replica;
 import org.apache.solr.util.RTimer;
@@ -96,14 +95,7 @@ public class LeaderInitiatedRecoveryOnCommitTest extends BasicDistributedZkTest
     Thread.sleep(sleepMsBeforeHealPartition);
 
     // try to clean up
-    try {
-      CollectionAdminRequest.Delete req = new CollectionAdminRequest.Delete();
-      req.setCollectionName(testCollectionName);
-      req.process(cloudClient);
-    } catch (Exception e) {
-      // don't fail the test
-      log.warn("Could not delete collection {} after test completed", testCollectionName);
-    }
+    attemptCollectionDelete(cloudClient, testCollectionName);
 
     log.info("multiShardTest completed OK");
   }
@@ -144,14 +136,7 @@ public class LeaderInitiatedRecoveryOnCommitTest extends BasicDistributedZkTest
     Thread.sleep(sleepMsBeforeHealPartition);
 
     // try to clean up
-    try {
-      CollectionAdminRequest.Delete req = new CollectionAdminRequest.Delete();
-      req.setCollectionName(testCollectionName);
-      req.process(cloudClient);
-    } catch (Exception e) {
-      // don't fail the test
-      log.warn("Could not delete collection {} after test completed", testCollectionName);
-    }
+    attemptCollectionDelete(cloudClient, testCollectionName);
 
     log.info("oneShardTest completed OK");
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java b/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
index c0f29d2..537dbba 100644
--- a/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
@@ -24,6 +24,7 @@ import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrRequest;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.impl.HttpSolrClient;
+import org.apache.solr.client.solrj.request.CollectionAdminRequest;
 import org.apache.solr.client.solrj.request.CollectionAdminRequest.Create;
 import org.apache.solr.client.solrj.request.CollectionAdminRequest.SplitShard;
 import org.apache.solr.client.solrj.request.QueryRequest;
@@ -31,7 +32,6 @@ import org.apache.solr.client.solrj.response.CollectionAdminResponse;
 import org.apache.solr.client.solrj.response.RequestStatusState;
 import org.apache.solr.common.params.CollectionParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
-import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.Utils;
 import org.junit.Test;
 import org.slf4j.Logger;
@@ -116,12 +116,7 @@ public class MultiThreadedOCPTest extends AbstractFullDistribZkTestBase {
   private void testParallelCollectionAPICalls() throws IOException, SolrServerException {
     try (SolrClient client = createNewSolrClient("", getBaseUrl((HttpSolrClient) clients.get(0)))) {
       for(int i = 1 ; i <= NUM_COLLECTIONS ; i++) {
-        new Create()
-                .setCollectionName("ocptest" + i)
-                .setNumShards(4)
-                .setConfigName("conf1")
-                .setAsyncId(String.valueOf(i))
-                .process(client);
+        CollectionAdminRequest.createCollection("ocptest" + i,"conf1",4,1).processAsync(String.valueOf(i), client);
       }
   
       boolean pass = false;
@@ -158,12 +153,8 @@ public class MultiThreadedOCPTest extends AbstractFullDistribZkTestBase {
         "/overseer/collection-queue-work", new Overseer.Stats());
     try (SolrClient client = createNewSolrClient("", getBaseUrl((HttpSolrClient) clients.get(0)))) {
 
-      Create createCollectionRequest = new Create()
-              .setCollectionName("ocptest_shardsplit")
-              .setNumShards(4)
-              .setConfigName("conf1")
-              .setAsyncId("1000");
-      createCollectionRequest.process(client);
+      Create createCollectionRequest = CollectionAdminRequest.createCollection("ocptest_shardsplit","conf1",4,1);
+      createCollectionRequest.processAsync("1000",client);
 
       distributedQueue.offer(Utils.toJSON(Utils.makeMap(
           "collection", "ocptest_shardsplit",
@@ -215,36 +206,21 @@ public class MultiThreadedOCPTest extends AbstractFullDistribZkTestBase {
 
   private void testDeduplicationOfSubmittedTasks() throws IOException, SolrServerException {
     try (SolrClient client = createNewSolrClient("", getBaseUrl((HttpSolrClient) clients.get(0)))) {
-      new Create()
-              .setCollectionName("ocptest_shardsplit2")
-              .setNumShards(4)
-              .setConfigName("conf1")
-              .setAsyncId("3000")
-              .process(client);
+      CollectionAdminRequest.createCollection("ocptest_shardsplit2","conf1",4,1).processAsync("3000",client);
   
-      SplitShard splitShardRequest = new SplitShard()
-              .setCollectionName("ocptest_shardsplit2")
-              .setShardName(SHARD1)
-              .setAsyncId("3001");
-      splitShardRequest.process(client);
-  
-      splitShardRequest = new SplitShard()
-              .setCollectionName("ocptest_shardsplit2")
-              .setShardName(SHARD2)
-              .setAsyncId("3002");
-      splitShardRequest.process(client);
+      SplitShard splitShardRequest = CollectionAdminRequest.splitShard("ocptest_shardsplit2").setShardName(SHARD1);
+      splitShardRequest.processAsync("3001",client);
+      
+      splitShardRequest = CollectionAdminRequest.splitShard("ocptest_shardsplit2").setShardName(SHARD2);
+      splitShardRequest.processAsync("3002",client);
   
       // Now submit another task with the same id. At this time, hopefully the previous 3002 should still be in the queue.
-      splitShardRequest = new SplitShard()
-              .setCollectionName("ocptest_shardsplit2")
-              .setShardName(SHARD1)
-              .setAsyncId("3002");
-      CollectionAdminResponse response = splitShardRequest.process(client);
-  
-      NamedList r = response.getResponse();
-      assertEquals("Duplicate request was supposed to exist but wasn't found. De-duplication of submitted task failed.",
-          "Task with the same requestid already exists.", r.get("error"));
-  
+      expectThrows(SolrServerException.class, () -> {
+          CollectionAdminRequest.splitShard("ocptest_shardsplit2").setShardName(SHARD1).processAsync("3002",client);
+          // more helpful assertion failure
+          fail("Duplicate request was supposed to exist but wasn't found. De-duplication of submitted task failed.");
+        });
+      
       for (int i = 3001; i <= 3002; i++) {
         final RequestStatusState state = getRequestStateAfterCompletion(i + "", REQUEST_STATUS_TIMEOUT, client);
         assertSame("Task " + i + " did not complete, final state: " + state, RequestStatusState.COMPLETED, state);
@@ -271,11 +247,8 @@ public class MultiThreadedOCPTest extends AbstractFullDistribZkTestBase {
     indexThread.start();
     try (SolrClient client = createNewSolrClient("", getBaseUrl((HttpSolrClient) clients.get(0)))) {
 
-      SplitShard splitShardRequest = new SplitShard()
-              .setCollectionName("collection1")
-              .setShardName(SHARD1)
-              .setAsyncId("2000");
-      splitShardRequest.process(client);
+      SplitShard splitShardRequest = CollectionAdminRequest.splitShard("collection1").setShardName(SHARD1);
+      splitShardRequest.processAsync("2000",client);
 
       RequestStatusState state = getRequestState("2000", client);
       while (state ==  RequestStatusState.SUBMITTED) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/ReplaceNodeTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/ReplaceNodeTest.java b/solr/core/src/test/org/apache/solr/cloud/ReplaceNodeTest.java
index e1af607..ecfd3ee 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ReplaceNodeTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ReplaceNodeTest.java
@@ -65,7 +65,9 @@ public class ReplaceNodeTest extends SolrCloudTestCase {
     String emptyNode = l.remove(0);
     String node2bdecommissioned = l.get(0);
     CollectionAdminRequest.Create create;
-    create = pickRandom(CollectionAdminRequest.createCollection(coll, "conf1", 5, 2),
+    // NOTE: always using the createCollection that takes in 'int' for all types of replicas, so we never
+    // have to worry about null checking when comparing the Create command with the final Slices
+    create = pickRandom(CollectionAdminRequest.createCollection(coll, "conf1", 5, 2,0,0),
                         CollectionAdminRequest.createCollection(coll, "conf1", 5, 1,1,0),
                         CollectionAdminRequest.createCollection(coll, "conf1", 5, 0,1,1),
                         CollectionAdminRequest.createCollection(coll, "conf1", 5, 1,0,1),

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java b/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java
index abd394a..d0d4f78 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ReplicationFactorTest.java
@@ -101,9 +101,7 @@ public class ReplicationFactorTest extends AbstractFullDistribZkTestBase {
     CollectionAdminResponse resp = createCollection(testCollectionName, numShards, replicationFactor, maxShardsPerNode);
     
     if (resp.getResponse().get("failure") != null) {
-      CollectionAdminRequest.Delete req = new CollectionAdminRequest.Delete();
-      req.setCollectionName(testCollectionName);
-      req.process(cloudClient);
+      CollectionAdminRequest.deleteCollection(testCollectionName).process(cloudClient);
       
       resp = createCollection(testCollectionName, numShards, replicationFactor, maxShardsPerNode);
       

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/RollingRestartTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/RollingRestartTest.java b/solr/core/src/test/org/apache/solr/cloud/RollingRestartTest.java
index 6a906bb..1458666 100644
--- a/solr/core/src/test/org/apache/solr/cloud/RollingRestartTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/RollingRestartTest.java
@@ -70,7 +70,7 @@ public class RollingRestartTest extends AbstractFullDistribZkTestBase {
       int n = random().nextInt(getShardCount());
       String nodeName = cloudJettys.get(n).nodeName;
       log.info("Chose {} as overseer designate", nodeName);
-      new CollectionAdminRequest.AddRole().setRole("overseer").setNode(nodeName).process(cloudClient);
+      CollectionAdminRequest.addRole(nodeName,"overseer").process(cloudClient);
       designates.add(nodeName);
       designateJettys.add(cloudJettys.get(n));
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/ShardSplitTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/ShardSplitTest.java b/solr/core/src/test/org/apache/solr/cloud/ShardSplitTest.java
index 72f0694..35ac5c0 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ShardSplitTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ShardSplitTest.java
@@ -523,16 +523,12 @@ public class ShardSplitTest extends BasicDistributedZkTest {
 
     log.info("Starting testSplitShardWithRule");
     String collectionName = "shardSplitWithRule";
-    CollectionAdminRequest.Create createRequest = new CollectionAdminRequest.Create()
-        .setCollectionName(collectionName)
-        .setNumShards(1)
-        .setReplicationFactor(2)
+    CollectionAdminRequest.Create createRequest = CollectionAdminRequest.createCollection(collectionName,1,2)
         .setRule("shard:*,replica:<2,node:*");
     CollectionAdminResponse response = createRequest.process(cloudClient);
     assertEquals(0, response.getStatus());
 
-    CollectionAdminRequest.SplitShard splitShardRequest = new CollectionAdminRequest.SplitShard()
-        .setCollectionName(collectionName)
+    CollectionAdminRequest.SplitShard splitShardRequest = CollectionAdminRequest.splitShard(collectionName)
         .setShardName("shard1");
     response = splitShardRequest.process(cloudClient);
     assertEquals(String.valueOf(response.getErrorMessages()), 0, response.getStatus());

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java b/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java
index 9c345fd..9c839f6 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SharedFSAutoReplicaFailoverTest.java
@@ -146,12 +146,8 @@ public class SharedFSAutoReplicaFailoverTest extends AbstractFullDistribZkTestBa
   // serially
   private void testBasics() throws Exception {
     String collection1 = "solrj_collection";
-    Create createCollectionRequest = new Create()
-            .setCollectionName(collection1)
-            .setNumShards(2)
-            .setReplicationFactor(2)
+    Create createCollectionRequest = CollectionAdminRequest.createCollection(collection1,"conf1",2,2)
             .setMaxShardsPerNode(2)
-            .setConfigName("conf1")
             .setRouterField("myOwnField")
             .setAutoAddReplicas(true);
     CollectionAdminResponse response = createCollectionRequest.process(cloudClient);
@@ -161,12 +157,8 @@ public class SharedFSAutoReplicaFailoverTest extends AbstractFullDistribZkTestBa
     waitForRecoveriesToFinish(collection1, false);
     
     String collection2 = "solrj_collection2";
-    createCollectionRequest = new Create()
-            .setCollectionName(collection2)
-            .setNumShards(2)
-            .setReplicationFactor(2)
+    createCollectionRequest = CollectionAdminRequest.createCollection(collection2,"conf1",2,2)
             .setMaxShardsPerNode(2)
-            .setConfigName("conf1")
             .setRouterField("myOwnField")
             .setAutoAddReplicas(false);
     CollectionAdminResponse response2 = createCollectionRequest.process(getCommonCloudSolrClient());
@@ -177,12 +169,8 @@ public class SharedFSAutoReplicaFailoverTest extends AbstractFullDistribZkTestBa
     waitForRecoveriesToFinish(collection2, false);
     
     String collection3 = "solrj_collection3";
-    createCollectionRequest = new Create()
-            .setCollectionName(collection3)
-            .setNumShards(5)
-            .setReplicationFactor(1)
+    createCollectionRequest = CollectionAdminRequest.createCollection(collection3,"conf1",5,1)
             .setMaxShardsPerNode(1)
-            .setConfigName("conf1")
             .setRouterField("myOwnField")
             .setAutoAddReplicas(true);
     CollectionAdminResponse response3 = createCollectionRequest.process(getCommonCloudSolrClient());
@@ -194,12 +182,8 @@ public class SharedFSAutoReplicaFailoverTest extends AbstractFullDistribZkTestBa
 
     // a collection has only 1 replica per a shard
     String collection4 = "solrj_collection4";
-    createCollectionRequest = new Create()
-        .setCollectionName(collection4)
-        .setNumShards(5)
-        .setReplicationFactor(1)
+    createCollectionRequest = CollectionAdminRequest.createCollection(collection4,"conf1",5,1)
         .setMaxShardsPerNode(5)
-        .setConfigName("conf1")
         .setRouterField("text")
         .setAutoAddReplicas(true);
     CollectionAdminResponse response4 = createCollectionRequest.process(getCommonCloudSolrClient());

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/SimpleCollectionCreateDeleteTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/SimpleCollectionCreateDeleteTest.java b/solr/core/src/test/org/apache/solr/cloud/SimpleCollectionCreateDeleteTest.java
index abc0819..3e18ce0 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SimpleCollectionCreateDeleteTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SimpleCollectionCreateDeleteTest.java
@@ -39,10 +39,7 @@ public class SimpleCollectionCreateDeleteTest extends AbstractFullDistribZkTestB
       }
     }
     String collectionName = "SimpleCollectionCreateDeleteTest";
-    CollectionAdminRequest.Create create = new CollectionAdminRequest.Create()
-            .setCollectionName(collectionName)
-            .setNumShards(1)
-            .setReplicationFactor(1)
+    CollectionAdminRequest.Create create = CollectionAdminRequest.createCollection(collectionName,1,1)
             .setCreateNodeSet(overseerNode)
             .setStateFormat(2);
 
@@ -51,17 +48,13 @@ public class SimpleCollectionCreateDeleteTest extends AbstractFullDistribZkTestB
     if (request.get("success") != null) {
       assertTrue(cloudClient.getZkStateReader().getZkClient().exists(ZkStateReader.COLLECTIONS_ZKNODE + "/" + collectionName, false));
 
-      CollectionAdminRequest.Delete delete = new CollectionAdminRequest.Delete();
-      delete.setCollectionName(collectionName);
+      CollectionAdminRequest delete = CollectionAdminRequest.deleteCollection(collectionName);
       cloudClient.request(delete);
 
       assertFalse(cloudClient.getZkStateReader().getZkClient().exists(ZkStateReader.COLLECTIONS_ZKNODE + "/" + collectionName, false));
 
       // create collection again on a node other than the overseer leader
-      create = new CollectionAdminRequest.Create()
-              .setCollectionName(collectionName)
-              .setNumShards(1)
-              .setReplicationFactor(1)
+      create = CollectionAdminRequest.createCollection(collectionName,1,1)
               .setCreateNodeSet(notOverseerNode)
               .setStateFormat(2);
       request = create.process(cloudClient).getResponse();

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/TestCollectionAPI.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCollectionAPI.java b/solr/core/src/test/org/apache/solr/cloud/TestCollectionAPI.java
index 74ad7bd..43b018e 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestCollectionAPI.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestCollectionAPI.java
@@ -185,13 +185,7 @@ public class TestCollectionAPI extends ReplicaPropertiesBase {
     String cname = "clusterStatusZNodeVersion";
     try (CloudSolrClient client = createCloudClient(null)) {
 
-      CollectionAdminRequest.Create create = new CollectionAdminRequest.Create()
-              .setCollectionName(cname)
-              .setMaxShardsPerNode(1)
-              .setNumShards(1)
-              .setReplicationFactor(1)
-              .setConfigName("conf1");
-      create.process(client);
+      CollectionAdminRequest.createCollection(cname,"conf1",1,1).setMaxShardsPerNode(1).process(client);
 
       waitForRecoveriesToFinish(cname, true);
 
@@ -213,9 +207,7 @@ public class TestCollectionAPI extends ReplicaPropertiesBase {
       Integer znodeVersion = (Integer) collection.get("znodeVersion");
       assertNotNull(znodeVersion);
 
-      CollectionAdminRequest.AddReplica addReplica = new CollectionAdminRequest.AddReplica()
-              .setCollectionName(cname)
-              .setShardName("shard1");
+      CollectionAdminRequest.AddReplica addReplica = CollectionAdminRequest.addReplicaToShard(cname, "shard1");
       addReplica.process(client);
 
       waitForRecoveriesToFinish(cname, true);
@@ -628,13 +620,7 @@ public class TestCollectionAPI extends ReplicaPropertiesBase {
     try (CloudSolrClient client = createCloudClient(null)) {
       client.connect();
 
-      new CollectionAdminRequest.Create()
-          .setCollectionName("testClusterStateMigration")
-          .setNumShards(1)
-          .setReplicationFactor(1)
-          .setConfigName("conf1")
-          .setStateFormat(1)
-          .process(client);
+      CollectionAdminRequest.createCollection("testClusterStateMigration","conf1",1,1).setStateFormat(1).process(client);
 
       waitForRecoveriesToFinish("testClusterStateMigration", true);
 
@@ -647,9 +633,7 @@ public class TestCollectionAPI extends ReplicaPropertiesBase {
       }
       client.commit("testClusterStateMigration");
 
-      new CollectionAdminRequest.MigrateClusterState()
-          .setCollectionName("testClusterStateMigration")
-          .process(client);
+      CollectionAdminRequest.migrateCollectionFormat("testClusterStateMigration").process(client);
 
       client.getZkStateReader().forceUpdateCollection("testClusterStateMigration");
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/TestRandomRequestDistribution.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestRandomRequestDistribution.java b/solr/core/src/test/org/apache/solr/cloud/TestRandomRequestDistribution.java
index d7b9d8a..b486256 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestRandomRequestDistribution.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestRandomRequestDistribution.java
@@ -73,17 +73,11 @@ public class TestRandomRequestDistribution extends AbstractFullDistribZkTestBase
    */
   private void testRequestTracking() throws Exception {
 
-    new CollectionAdminRequest.Create()
-        .setCollectionName("a1x2")
-        .setNumShards(1)
-        .setReplicationFactor(2)
+    CollectionAdminRequest.createCollection("a1x2",1,2)
         .setCreateNodeSet(nodeNames.get(0) + ',' + nodeNames.get(1))
         .process(cloudClient);
 
-    new CollectionAdminRequest.Create()
-        .setCollectionName("b1x1")
-        .setNumShards(1)
-        .setReplicationFactor(1)
+    CollectionAdminRequest.createCollection("b1x1",1,1)
         .setCreateNodeSet(nodeNames.get(2))
         .process(cloudClient);
 
@@ -134,10 +128,7 @@ public class TestRandomRequestDistribution extends AbstractFullDistribZkTestBase
   private void testQueryAgainstDownReplica() throws Exception {
 
     log.info("Creating collection 'football' with 1 shard and 2 replicas");
-    new CollectionAdminRequest.Create()
-        .setCollectionName("football")
-        .setNumShards(1)
-        .setReplicationFactor(2)
+    CollectionAdminRequest.createCollection("football",1,2)
         .setCreateNodeSet(nodeNames.get(0) + ',' + nodeNames.get(1))
         .process(cloudClient);
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/TestRequestForwarding.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestRequestForwarding.java b/solr/core/src/test/org/apache/solr/cloud/TestRequestForwarding.java
index 8d85bf6..febbe33 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestRequestForwarding.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestRequestForwarding.java
@@ -72,11 +72,7 @@ public class TestRequestForwarding extends SolrTestCaseJ4 {
 
   private void createCollection(String name, String config) throws Exception {
     CollectionAdminResponse response;
-    CollectionAdminRequest.Create create = new CollectionAdminRequest.Create();
-    create.setConfigName(config);
-    create.setCollectionName(name);
-    create.setNumShards(2);
-    create.setReplicationFactor(1);
+    CollectionAdminRequest.Create create = CollectionAdminRequest.createCollection(name,config,2,1);
     create.setMaxShardsPerNode(1);
     response = create.process(solrCluster.getSolrClient());
     

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java
index d856011..042c111 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java
@@ -174,10 +174,7 @@ public class TestSolrCloudWithKerberosAlt extends LuceneTestCase {
       String configName = "solrCloudCollectionConfig";
       miniCluster.uploadConfigSet(SolrTestCaseJ4.TEST_PATH().resolve("collection1/conf"), configName);
 
-      CollectionAdminRequest.Create createRequest = new CollectionAdminRequest.Create();
-      createRequest.setCollectionName(collectionName);
-      createRequest.setNumShards(NUM_SHARDS);
-      createRequest.setReplicationFactor(REPLICATION_FACTOR);
+      CollectionAdminRequest.Create createRequest = CollectionAdminRequest.createCollection(collectionName,NUM_SHARDS,REPLICATION_FACTOR);
       Properties properties = new Properties();
       properties.put(CoreDescriptor.CORE_CONFIG, "solrconfig-tlog.xml");
       properties.put("solr.tests.maxBufferedDocs", "100000");
@@ -216,9 +213,7 @@ public class TestSolrCloudWithKerberosAlt extends LuceneTestCase {
         assertEquals(1, rsp.getResults().getNumFound());
         
         // delete the collection we created earlier
-        CollectionAdminRequest.Delete deleteRequest = new CollectionAdminRequest.Delete();
-        deleteRequest.setCollectionName(collectionName);
-        deleteRequest.process(cloudSolrClient);
+        CollectionAdminRequest.deleteCollection(collectionName).process(cloudSolrClient);
         
         AbstractDistribZkTestBase.waitForCollectionToDisappear(collectionName, zkStateReader, true, true, 330);
       }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithSecureImpersonation.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithSecureImpersonation.java b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithSecureImpersonation.java
index d2f7873..184cd90 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithSecureImpersonation.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithSecureImpersonation.java
@@ -173,7 +173,7 @@ public class TestSolrCloudWithSecureImpersonation extends SolrTestCaseJ4 {
 
   private void create1ShardCollection(String name, String config, MiniSolrCloudCluster solrCluster) throws Exception {
     CollectionAdminResponse response;
-    CollectionAdminRequest.Create create = new CollectionAdminRequest.Create() {
+    CollectionAdminRequest.Create create = new CollectionAdminRequest.Create(name,config,1,1,0,0) {
       @Override
       public SolrParams getParams() {
         ModifiableSolrParams msp = new ModifiableSolrParams(super.getParams());
@@ -181,10 +181,6 @@ public class TestSolrCloudWithSecureImpersonation extends SolrTestCaseJ4 {
         return msp;
       }
     };
-    create.setConfigName(config);
-    create.setCollectionName(name);
-    create.setNumShards(1);
-    create.setReplicationFactor(1);
     create.setMaxShardsPerNode(1);
     response = create.process(solrCluster.getSolrClient());
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/handler/TestBlobHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/TestBlobHandler.java b/solr/core/src/test/org/apache/solr/handler/TestBlobHandler.java
index c395d20..737e16e 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestBlobHandler.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestBlobHandler.java
@@ -62,10 +62,7 @@ public class TestBlobHandler extends AbstractFullDistribZkTestBase {
 
     try (SolrClient client = createNewSolrClient("", getBaseUrl((HttpSolrClient) clients.get(0)))) {
       CollectionAdminResponse response1;
-      CollectionAdminRequest.Create createCollectionRequest = new CollectionAdminRequest.Create()
-              .setCollectionName(".system")
-              .setNumShards(1)
-              .setReplicationFactor(2);
+      CollectionAdminRequest.Create createCollectionRequest = CollectionAdminRequest.createCollection(".system",1,2);
       response1 = createCollectionRequest.process(client);
       assertEquals(0, response1.getStatus());
       assertTrue(response1.isSuccess());
@@ -119,10 +116,7 @@ public class TestBlobHandler extends AbstractFullDistribZkTestBase {
 
   public static void createSystemCollection(SolrClient client) throws SolrServerException, IOException {
     CollectionAdminResponse response1;
-    CollectionAdminRequest.Create createCollectionRequest = new CollectionAdminRequest.Create()
-            .setCollectionName(".system")
-            .setNumShards(1)
-            .setReplicationFactor(2);
+    CollectionAdminRequest.Create createCollectionRequest = CollectionAdminRequest.createCollection(".system",1,2);
     response1 = createCollectionRequest.process(client);
     assertEquals(0, response1.getStatus());
     assertTrue(response1.isSuccess());

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ee33f38b/solr/core/src/test/org/apache/solr/search/stats/TestDistribIDF.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/stats/TestDistribIDF.java b/solr/core/src/test/org/apache/solr/search/stats/TestDistribIDF.java
index f3bcc16..c355932 100644
--- a/solr/core/src/test/org/apache/solr/search/stats/TestDistribIDF.java
+++ b/solr/core/src/test/org/apache/solr/search/stats/TestDistribIDF.java
@@ -196,20 +196,11 @@ public class TestDistribIDF extends SolrTestCaseJ4 {
   private void createCollection(String name, String config, String router) throws Exception {
     CollectionAdminResponse response;
     if (router.equals(ImplicitDocRouter.NAME)) {
-      CollectionAdminRequest.Create create = new CollectionAdminRequest.Create();
-      create.setConfigName(config);
-      create.setCollectionName(name);
-      create.setReplicationFactor(1);
+      CollectionAdminRequest.Create create = CollectionAdminRequest.createCollectionWithImplicitRouter(name,config,"a,b,c",1);
       create.setMaxShardsPerNode(1);
-      create.setRouterName(router);
-      create.setShards("a,b,c");
       response = create.process(solrCluster.getSolrClient());
     } else {
-      CollectionAdminRequest.Create create = new CollectionAdminRequest.Create();
-      create.setConfigName(config);
-      create.setCollectionName(name);
-      create.setNumShards(2);
-      create.setReplicationFactor(1);
+      CollectionAdminRequest.Create create = CollectionAdminRequest.createCollection(name,config,2,1);
       create.setMaxShardsPerNode(1);
       response = create.process(solrCluster.getSolrClient());
     }


[08/38] lucene-solr:jira/solr-8668: SOLR-9596: Ref guide: document SimpleTextCodecFactory

Posted by cp...@apache.org.
SOLR-9596: Ref guide: document SimpleTextCodecFactory


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

Branch: refs/heads/jira/solr-8668
Commit: 55e37cdd3deb3d2934690aa10b02a0aaef7780ff
Parents: 2d6edc6
Author: Steve Rowe <sa...@gmail.com>
Authored: Wed May 31 11:26:28 2017 -0400
Committer: Steve Rowe <sa...@gmail.com>
Committed: Wed May 31 11:27:03 2017 -0400

----------------------------------------------------------------------
 solr/solr-ref-guide/src/codec-factory.adoc | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/55e37cdd/solr/solr-ref-guide/src/codec-factory.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/codec-factory.adoc b/solr/solr-ref-guide/src/codec-factory.adoc
index bb5f0e0..88bc083 100644
--- a/solr/solr-ref-guide/src/codec-factory.adoc
+++ b/solr/solr-ref-guide/src/codec-factory.adoc
@@ -20,7 +20,16 @@
 
 A `codecFactory` can be specified in `solrconfig.xml` to determine which Lucene {lucene-javadocs}/core/org/apache/lucene/codecs/Codec.html[`Codec`] is used when writing the index to disk.
 
-If not specified, Lucene's default codec is implicitly used, but a {solr-javadocs}/solr-core/org/apache/solr/core/SchemaCodecFactory.html[`solr.SchemaCodecFactory`] is also available which supports 2 key features:
+If not specified, Lucene's default codec is implicitly used.
+
+There are two alternatives to Lucene's default codec:
+
+. {solr-javadocs}/solr-core/org/apache/solr/core/SchemaCodecFactory.html[`solr.SchemaCodecFactory`] 
+. {solr-javadocs}/solr-core/org/apache/solr/core/SimpleTextCodecFactory.html[`solr.SimpleTextCodecFactory`] 
+ 
+=== solr.SchemaCodecFactory
+
+`solr.SchemaCodecFactory` supports 2 key features:
 
 * Schema based per-fieldtype configuration for `docValuesFormat` and `postingsFormat` - see the <<field-type-definitions-and-properties.adoc#field-type-properties,Field Type Properties>> section for more details.
 * A `compressionMode` option:
@@ -35,3 +44,16 @@ Example:
   <str name="compressionMode">BEST_COMPRESSION</str>
 </codecFactory>
 ----
+
+=== solr.SimpleTextCodecFactory
+
+This factory for Lucene's `SimpleTextCodec` produces a plain text human-readable index format.
+
+CAUTION: *FOR RECREATIONAL USE ONLY*.  This codec should never be used in production.  `SimpleTextCodec` is relatively slow and takes up a large amount of disk space.  Its use should be limited to educational and debugging purposes.
+
+Example:
+
+[source,xml]
+----
+<codecFactory class="solr.SimpleTextCodecFactory"/>
+----


[24/38] lucene-solr:jira/solr-8668: SOLR-10744: Update noggit to newer version (0.8)

Posted by cp...@apache.org.
SOLR-10744: Update noggit to newer version (0.8)


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

Branch: refs/heads/jira/solr-8668
Commit: 57fe80d8a054d84ba15e91c9854d5adb8207f772
Parents: 38741ec
Author: Noble Paul <no...@apache.org>
Authored: Thu Jun 1 15:13:00 2017 +0930
Committer: Noble Paul <no...@apache.org>
Committed: Thu Jun 1 15:13:00 2017 +0930

----------------------------------------------------------------------
 lucene/ivy-versions.properties                                   | 2 +-
 solr/CHANGES.txt                                                 | 3 +++
 solr/core/src/java/org/apache/solr/handler/BlobHandler.java      | 1 -
 solr/licenses/noggit-0.6.jar.sha1                                | 1 -
 solr/licenses/noggit-0.8.jar.sha1                                | 1 +
 .../src/java/org/apache/solr/common/util/CommandOperation.java   | 4 ++++
 6 files changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/57fe80d8/lucene/ivy-versions.properties
----------------------------------------------------------------------
diff --git a/lucene/ivy-versions.properties b/lucene/ivy-versions.properties
index 3318c21..33ffb66 100644
--- a/lucene/ivy-versions.properties
+++ b/lucene/ivy-versions.properties
@@ -253,7 +253,7 @@ org.mortbay.jetty.version = 6.1.26
 /org.mortbay.jetty/jetty = ${org.mortbay.jetty.version}
 /org.mortbay.jetty/jetty-util = ${org.mortbay.jetty.version}
 
-/org.noggit/noggit = 0.6
+/org.noggit/noggit = 0.8
 /org.objenesis/objenesis = 2.5
 
 org.ow2.asm.version = 5.1

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/57fe80d8/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index e52cf17..6d0e6c7 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -205,6 +205,9 @@ Other Changes
 
 * SOLR-10793: BlobHandler should have a well-known permission name (noble)
 
+* SOLR-10744: Update noggit to newer version (0.8) (noble)
+
+
 ==================  6.7.0 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/57fe80d8/solr/core/src/java/org/apache/solr/handler/BlobHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/BlobHandler.java b/solr/core/src/java/org/apache/solr/handler/BlobHandler.java
index 93cf80c..3d9c0a9 100644
--- a/solr/core/src/java/org/apache/solr/handler/BlobHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/BlobHandler.java
@@ -71,7 +71,6 @@ import static org.apache.solr.common.params.CommonParams.JSON;
 import static org.apache.solr.common.params.CommonParams.SORT;
 import static org.apache.solr.common.params.CommonParams.VERSION;
 import static org.apache.solr.common.util.Utils.makeMap;
-import static org.apache.solr.security.PermissionNameProvider.Name.UPDATE_PERM;
 
 public class BlobHandler extends RequestHandlerBase implements PluginInfoInitialized , PermissionNameProvider {
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/57fe80d8/solr/licenses/noggit-0.6.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/noggit-0.6.jar.sha1 b/solr/licenses/noggit-0.6.jar.sha1
deleted file mode 100644
index 09b83a7..0000000
--- a/solr/licenses/noggit-0.6.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-fa94a59c44b39ee710f3c9451750119e432326c0

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/57fe80d8/solr/licenses/noggit-0.8.jar.sha1
----------------------------------------------------------------------
diff --git a/solr/licenses/noggit-0.8.jar.sha1 b/solr/licenses/noggit-0.8.jar.sha1
new file mode 100644
index 0000000..6a00438
--- /dev/null
+++ b/solr/licenses/noggit-0.8.jar.sha1
@@ -0,0 +1 @@
+ba4ad65a62d7dfcf97a8d42c82ae7d8824f9087f

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/57fe80d8/solr/solrj/src/java/org/apache/solr/common/util/CommandOperation.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/CommandOperation.java b/solr/solrj/src/java/org/apache/solr/common/util/CommandOperation.java
index 5b043e7..c80402f 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/CommandOperation.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/CommandOperation.java
@@ -219,6 +219,10 @@ public class CommandOperation {
    */
   public static List<CommandOperation> parse(Reader rdr) throws IOException {
     JSONParser parser = new JSONParser(rdr);
+    parser.setFlags(parser.getFlags() |
+        JSONParser.ALLOW_MISSING_COLON_COMMA_BEFORE_OBJECT |
+        JSONParser.OPTIONAL_OUTER_BRACES
+    );
 
     ObjectBuilder ob = new ObjectBuilder(parser);
 


[20/38] lucene-solr:jira/solr-8668: SOLR-10239: Adding documentation for MoveReplica

Posted by cp...@apache.org.
SOLR-10239: Adding documentation for MoveReplica


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

Branch: refs/heads/jira/solr-8668
Commit: 5d0aa603d724f4e2d9aa2a62883c240b0631f2dd
Parents: c824b09
Author: Cao Manh Dat <da...@apache.org>
Authored: Thu Jun 1 08:50:54 2017 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Thu Jun 1 08:50:54 2017 +0700

----------------------------------------------------------------------
 solr/solr-ref-guide/src/collections-api.adoc | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5d0aa603/solr/solr-ref-guide/src/collections-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/collections-api.adoc b/solr/solr-ref-guide/src/collections-api.adoc
index bd32819..3300b6e 100644
--- a/solr/solr-ref-guide/src/collections-api.adoc
+++ b/solr/solr-ref-guide/src/collections-api.adoc
@@ -1883,9 +1883,30 @@ This command recreates replicas in the source node to the target node. After eac
 This operation does not hold necessary locks on the replicas that belong to on the source node. So don't perform other collection operations in this period.
 ====
 
+[[CollectionsAPI-movereplica]]
 == MOVEREPLICA: Move a Replica to a New node
 
-// TODO 6.6
+This command move a replica from a node to a new node, in case of shared-file systems the `dataDir` will be reused.
+
+`/admin/collections?action=MOVEREPLICA&collection=collection&shard=shard&replica=replica&node=nodeName&toNode=nodeName`
+
+[[CollectionsAPI-Input.26]]
+=== Input
+
+*Query Parameters*
+
+// TODO: Change column width to %autowidth.spread when https://github.com/asciidoctor/asciidoctor-pdf/issues/599 is fixed
+
+[cols="20,15,10,55",options="header"]
+|===
+|Key |Type |Required |Description
+|collection |string |Yes |The name of the collection.
+|shard |string |Yes |The name of shard that replica belong to.
+|replica |string |Yes |The name of the replica.
+|node |string |Yes |The name of the node that contains the replica.
+|toNode |string |Yes |The name of the destination node.
+|async |string |No |Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.
+|===
 
 [[CollectionsAPI-async]]
 == Asynchronous Calls


[06/38] lucene-solr:jira/solr-8668: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/lucene-solr

Posted by cp...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/lucene-solr


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

Branch: refs/heads/jira/solr-8668
Commit: 97693234def7fb4fc92d8fbaab775705aaaaf565
Parents: 71411df c824b09
Author: Karl Wright <Da...@gmail.com>
Authored: Wed May 31 07:56:14 2017 -0400
Committer: Karl Wright <Da...@gmail.com>
Committed: Wed May 31 07:56:14 2017 -0400

----------------------------------------------------------------------
 dev-tools/scripts/checkJavaDocs.py              |   2 +-
 lucene/CHANGES.txt                              |  12 +
 lucene/MIGRATE.txt                              |   6 +
 .../lucene/analysis/core/KeywordTokenizer.java  |  10 +-
 .../analysis/core/KeywordTokenizerFactory.java  |  19 +-
 .../lucene/analysis/core/LetterTokenizer.java   |  14 +
 .../analysis/core/LetterTokenizerFactory.java   |  19 +-
 .../analysis/core/LowerCaseTokenizer.java       |  13 +
 .../core/LowerCaseTokenizerFactory.java         |  37 +-
 .../lucene/analysis/core/StopFilterFactory.java |   2 +-
 .../core/UnicodeWhitespaceTokenizer.java        |  13 +
 .../analysis/core/WhitespaceTokenizer.java      |  13 +
 .../core/WhitespaceTokenizerFactory.java        |  18 +-
 .../lucene/analysis/util/CharTokenizer.java     |  27 +-
 .../lucene/analysis/util/UnicodeProps.java      |   6 +-
 .../compound/hyphenation/hyphenation.dtd        |   2 +-
 .../lucene/analysis/compound/hyphenation.dtd    |   2 +-
 .../analysis/core/TestKeywordTokenizer.java     |  88 +++
 .../core/TestUnicodeWhitespaceTokenizer.java    |  51 ++
 .../analysis/util/TestCharTokenizers.java       |  95 +++
 .../icu/src/data/utr30/DiacriticFolding.txt     |   5 +
 .../icu/src/data/utr30/NativeDigitFolding.txt   |  30 +
 lucene/analysis/icu/src/data/utr30/nfc.txt      |  22 +-
 lucene/analysis/icu/src/data/utr30/nfkc.txt     |   5 +-
 lucene/analysis/icu/src/data/utr30/nfkc_cf.txt  | 225 +++++-
 .../analysis/icu/segmentation/Default.brk       | Bin 35264 -> 36768 bytes
 .../icu/segmentation/MyanmarSyllable.brk        | Bin 19776 -> 20744 bytes
 .../org/apache/lucene/analysis/icu/utr30.nrm    | Bin 53840 -> 55184 bytes
 .../icu/segmentation/TestICUTokenizerCJK.java   |   9 +-
 .../analysis/icu/GenerateUTR30DataFiles.java    |   2 +-
 .../uk/UkrainianMorfologikAnalyzer.java         |   2 +
 .../analysis/uk/TestUkrainianAnalyzer.java      |   9 +-
 .../apache/lucene/legacy/LegacyDoubleField.java | 174 -----
 .../org/apache/lucene/legacy/LegacyField.java   |  90 ---
 .../apache/lucene/legacy/LegacyFieldType.java   | 149 ----
 .../apache/lucene/legacy/LegacyFloatField.java  | 174 -----
 .../apache/lucene/legacy/LegacyIntField.java    | 175 -----
 .../apache/lucene/legacy/LegacyLongField.java   | 184 -----
 .../lucene/legacy/LegacyNumericRangeQuery.java  | 537 --------------
 .../lucene/legacy/LegacyNumericTokenStream.java | 357 ----------
 .../apache/lucene/legacy/LegacyNumericType.java |  34 -
 .../lucene/legacy/LegacyNumericUtils.java       | 510 --------------
 .../lucene/legacy/doc-files/nrq-formula-1.png   | Bin 3171 -> 0 bytes
 .../lucene/legacy/doc-files/nrq-formula-2.png   | Bin 3694 -> 0 bytes
 .../org/apache/lucene/legacy/package-info.java  |  21 -
 .../index/TestBackwardsCompatibility.java       |  52 --
 .../apache/lucene/legacy/TestLegacyField.java   | 186 -----
 .../lucene/legacy/TestLegacyFieldReuse.java     |  81 ---
 .../lucene/legacy/TestLegacyNumericUtils.java   | 571 ---------------
 .../apache/lucene/legacy/TestLegacyTerms.java   | 164 -----
 .../TestMultiValuedNumericRangeQuery.java       |  84 ---
 .../lucene/legacy/TestNumericRangeQuery32.java  | 461 ------------
 .../lucene/legacy/TestNumericRangeQuery64.java  | 490 -------------
 .../lucene/legacy/TestNumericTokenStream.java   | 188 -----
 lucene/ivy-versions.properties                  |   4 +-
 lucene/licenses/icu4j-56.1.jar.sha1             |   1 -
 lucene/licenses/icu4j-59.1.jar.sha1             |   1 +
 .../morfologik-ukrainian-search-3.7.5.jar.sha1  |   1 -
 .../morfologik-ukrainian-search-3.7.6.jar.sha1  |   1 +
 lucene/spatial-extras/build.xml                 |   2 -
 .../lucene/spatial/bbox/BBoxStrategy.java       |  59 +-
 .../prefix/BytesRefIteratorTokenStream.java     |   2 -
 .../prefix/NumberRangePrefixTreeStrategy.java   |  24 +-
 .../spatial/prefix/PrefixTreeStrategy.java      |  20 +-
 .../prefix/RecursivePrefixTreeStrategy.java     |  41 +-
 .../spatial/vector/PointVectorStrategy.java     |  52 --
 .../lucene/spatial/DistanceStrategyTest.java    |   3 -
 .../lucene/spatial/QueryEqualsHashCodeTest.java |   2 -
 .../lucene/spatial/bbox/TestBBoxStrategy.java   |  33 +-
 .../spatial/prefix/DateNRStrategyTest.java      |  43 +-
 .../spatial/vector/TestPointVectorStrategy.java |   7 +-
 .../analyzing/SuggestStopFilterFactory.java     |   2 +-
 solr/CHANGES.txt                                |  35 +-
 .../solr/analytics/util/AnalyticsParsers.java   |   2 +-
 .../util/valuesource/DateFieldSource.java       |   2 +-
 .../solr/ltr/feature/FieldLengthFeature.java    |   3 +-
 .../apache/solr/ltr/TestLTRQParserPlugin.java   |  11 +-
 .../solr/ltr/TestParallelWeightCreation.java    |   5 +-
 .../solr/ltr/TestSelectiveWeightCreation.java   |  44 +-
 .../apache/solr/cloud/CreateCollectionCmd.java  |   4 +-
 .../apache/solr/core/CorePropertiesLocator.java |   5 +-
 .../org/apache/solr/handler/StreamHandler.java  |  18 +-
 .../handler/component/HttpShardHandler.java     |  26 +-
 .../component/HttpShardHandlerFactory.java      |  28 +-
 .../solr/highlight/DefaultSolrHighlighter.java  |   8 +-
 .../org/apache/solr/legacy/BBoxStrategy.java    | 706 +++++++++++++++++++
 .../org/apache/solr/legacy/BBoxValueSource.java | 135 ++++
 .../apache/solr/legacy/DistanceValueSource.java | 133 ++++
 .../apache/solr/legacy/LegacyDoubleField.java   | 174 +++++
 .../org/apache/solr/legacy/LegacyField.java     |  90 +++
 .../org/apache/solr/legacy/LegacyFieldType.java | 149 ++++
 .../apache/solr/legacy/LegacyFloatField.java    | 174 +++++
 .../org/apache/solr/legacy/LegacyIntField.java  | 175 +++++
 .../org/apache/solr/legacy/LegacyLongField.java | 184 +++++
 .../solr/legacy/LegacyNumericRangeQuery.java    | 537 ++++++++++++++
 .../solr/legacy/LegacyNumericTokenStream.java   | 357 ++++++++++
 .../apache/solr/legacy/LegacyNumericType.java   |  34 +
 .../apache/solr/legacy/LegacyNumericUtils.java  | 510 ++++++++++++++
 .../apache/solr/legacy/PointVectorStrategy.java | 292 ++++++++
 .../solr/legacy/doc-files/nrq-formula-1.png     | Bin 0 -> 3171 bytes
 .../solr/legacy/doc-files/nrq-formula-2.png     | Bin 0 -> 3694 bytes
 .../org/apache/solr/legacy/package-info.java    |  21 +
 .../analysis/ManagedSynonymFilterFactory.java   |   5 +
 .../ManagedSynonymGraphFilterFactory.java       | 437 ++++++++++++
 .../java/org/apache/solr/schema/BBoxField.java  |   4 +-
 .../java/org/apache/solr/schema/EnumField.java  |  10 +-
 .../org/apache/solr/schema/IndexSchema.java     |   2 +-
 .../schema/SpatialPointVectorFieldType.java     |   4 +-
 .../org/apache/solr/schema/TrieDoubleField.java |   2 +-
 .../java/org/apache/solr/schema/TrieField.java  |  24 +-
 .../org/apache/solr/schema/TrieFloatField.java  |   2 +-
 .../org/apache/solr/schema/TrieIntField.java    |   2 +-
 .../org/apache/solr/schema/TrieLongField.java   |   2 +-
 .../search/LegacyNumericRangeQueryBuilder.java  |   8 +-
 .../org/apache/solr/search/QueryParsing.java    |   2 +-
 .../apache/solr/search/QueryWrapperFilter.java  |   2 +-
 .../SearchGroupShardResponseProcessor.java      |   4 +-
 .../apache/solr/search/mlt/CloudMLTQParser.java |   2 +-
 .../solr/search/mlt/SimpleMLTQParser.java       |   2 +-
 .../org/apache/solr/uninverting/FieldCache.java |  20 +-
 .../solr/uninverting/UninvertingReader.java     |  16 +-
 .../java/org/apache/solr/update/PeerSync.java   |   7 +-
 .../apache/solr/update/SolrCmdDistributor.java  |   4 +-
 .../org/apache/solr/update/SolrIndexConfig.java |   2 +-
 .../java/org/apache/solr/update/UpdateLog.java  |  12 +-
 .../org/apache/solr/update/VersionInfo.java     |   2 +-
 .../DocExpirationUpdateProcessorFactory.java    |   2 +-
 .../java/org/apache/solr/util/FileUtils.java    |  20 +
 .../src/java/org/apache/solr/util/SolrCLI.java  |   2 +-
 .../solr/collection1/conf/hyphenation.dtd       |   2 +-
 .../solr/collection1/conf/schema-rest.xml       |  30 +
 .../collection1/conf/schema-tokenizer-test.xml  | 150 ++++
 .../solr-shardhandler-loadBalancerRequests.xml  |  23 +
 .../AbstractCloudBackupRestoreTestCase.java     |   7 +-
 ...aosMonkeySafeLeaderWithPullReplicasTest.java |   3 +-
 .../apache/solr/cloud/TestConfigSetsAPI.java    |   5 +-
 .../solr/cloud/TestMiniSolrCloudClusterSSL.java |   2 +-
 .../org/apache/solr/cloud/TestPullReplica.java  |  20 +-
 .../TestSolrCloudWithDelegationTokens.java      |   2 +-
 .../org/apache/solr/cloud/TestTlogReplica.java  |  20 +-
 .../component/TestHttpShardHandlerFactory.java  | 102 +++
 .../org/apache/solr/legacy/TestLegacyField.java | 186 +++++
 .../solr/legacy/TestLegacyFieldReuse.java       |  81 +++
 .../solr/legacy/TestLegacyNumericUtils.java     | 571 +++++++++++++++
 .../org/apache/solr/legacy/TestLegacyTerms.java | 164 +++++
 .../TestMultiValuedNumericRangeQuery.java       |  84 +++
 .../solr/legacy/TestNumericRangeQuery32.java    | 461 ++++++++++++
 .../solr/legacy/TestNumericRangeQuery64.java    | 490 +++++++++++++
 .../solr/legacy/TestNumericTokenStream.java     | 188 +++++
 .../org/apache/solr/rest/TestRestManager.java   |   4 +-
 .../TestManagedSynonymGraphFilterFactory.java   | 297 ++++++++
 .../TestLegacyNumericRangeQueryBuilder.java     |   2 +-
 .../solr/search/TestMaxScoreQueryParser.java    |   2 +-
 .../apache/solr/search/TestSolr4Spatial.java    |   2 +-
 .../solr/search/function/TestOrdValues.java     |   4 +-
 .../hadoop/TestDelegationWithHadoopAuth.java    |   2 +-
 .../solr/uninverting/TestDocTermOrds.java       |   6 +-
 .../solr/uninverting/TestFieldCacheSort.java    |   8 +-
 .../solr/uninverting/TestLegacyFieldCache.java  |   8 +-
 .../solr/uninverting/TestNumericTerms32.java    |   6 +-
 .../solr/uninverting/TestNumericTerms64.java    |   6 +-
 .../solr/uninverting/TestUninvertingReader.java |   8 +-
 .../solr/util/TestMaxTokenLenTokenizer.java     | 135 ++++
 .../solr/atom/conf/atom-data-config.xml         |   2 +-
 solr/licenses/icu4j-56.1.jar.sha1               |   1 -
 solr/licenses/icu4j-59.1.jar.sha1               |   1 +
 .../conf/managed-schema                         |  10 +-
 .../solr-ref-guide/src/filter-descriptions.adoc |  30 +-
 solr/solr-ref-guide/src/language-analysis.adoc  | 128 ++--
 solr/solr-ref-guide/src/managed-resources.adoc  |  20 +-
 .../src/near-real-time-searching.adoc           |  14 +-
 solr/solr-ref-guide/src/other-parsers.adoc      |   2 +-
 .../shards-and-indexing-data-in-solrcloud.adoc  |   5 -
 .../solr-ref-guide/src/the-stats-component.adoc |  13 +-
 solr/solr-ref-guide/src/tokenizers.adoc         |   2 +-
 ...store-data-with-the-data-import-handler.adoc |   2 +-
 .../solr/client/solrj/impl/CloudSolrClient.java | 271 +------
 .../solrj/impl/ConcurrentUpdateSolrClient.java  |  51 +-
 .../impl/DelegationTokenHttpSolrClient.java     |  24 +-
 .../solr/client/solrj/impl/HttpSolrClient.java  |  43 +-
 .../client/solrj/impl/LBHttpSolrClient.java     |  76 +-
 .../impl/SolrHttpClientContextBuilder.java      |   8 -
 .../org/apache/solr/client/solrj/io/Tuple.java  |   4 +-
 .../client/solrj/io/eval/AnovaEvaluator.java    |  76 ++
 .../client/solrj/io/eval/ArrayEvaluator.java    |  63 ++
 .../client/solrj/io/eval/ColumnEvaluator.java   |  76 ++
 .../solrj/io/eval/ConvolutionEvaluator.java     |  80 +++
 .../client/solrj/io/eval/CopyOfEvaluator.java   |  82 +++
 .../solrj/io/eval/CopyOfRangeEvaluator.java     |  83 +++
 .../solrj/io/eval/CorrelationEvaluator.java     |  75 ++
 .../solrj/io/eval/CovarianceEvaluator.java      |  75 ++
 .../client/solrj/io/eval/DescribeEvaluator.java |  90 +++
 .../client/solrj/io/eval/DistanceEvaluator.java |  75 ++
 .../io/eval/EmpiricalDistributionEvaluator.java | 127 ++++
 .../solrj/io/eval/FindDelayEvaluator.java       |  90 +++
 .../solrj/io/eval/HistogramEvaluator.java       |  98 +++
 .../client/solrj/io/eval/LengthEvaluator.java   |  58 ++
 .../solrj/io/eval/MovingAverageEvaluator.java   |  78 ++
 .../solrj/io/eval/NormalizeEvaluator.java       |  74 ++
 .../solrj/io/eval/PercentileEvaluator.java      |  66 ++
 .../client/solrj/io/eval/PredictEvaluator.java  |  66 ++
 .../client/solrj/io/eval/RankEvaluator.java     |  73 ++
 .../solrj/io/eval/RegressionEvaluator.java      | 110 +++
 .../client/solrj/io/eval/ReverseEvaluator.java  |  65 ++
 .../client/solrj/io/eval/ScaleEvaluator.java    |  76 ++
 .../client/solrj/io/eval/SequenceEvaluator.java |  72 ++
 .../solrj/io/graph/ShortestPathStream.java      |  25 -
 .../client/solrj/io/stream/CloudSolrStream.java |  21 -
 .../client/solrj/io/stream/ColumnEvaluator.java |  77 --
 .../solrj/io/stream/ConvolutionEvaluator.java   |  82 ---
 .../client/solrj/io/stream/CopyOfEvaluator.java |  84 ---
 .../solrj/io/stream/CopyOfRangeEvaluator.java   |  85 ---
 .../solrj/io/stream/CorrelationEvaluator.java   |  77 --
 .../solrj/io/stream/CovarianceEvaluator.java    |  77 --
 .../solrj/io/stream/DescribeEvaluator.java      |  92 ---
 .../solrj/io/stream/DistanceEvaluator.java      |  77 --
 .../stream/EmpiricalDistributionEvaluator.java  | 129 ----
 .../client/solrj/io/stream/FacetStream.java     |  16 -
 .../solr/client/solrj/io/stream/KnnStream.java  |   9 +
 .../client/solrj/io/stream/LengthEvaluator.java |  60 --
 .../solrj/io/stream/NormalizeEvaluator.java     |  76 --
 .../solrj/io/stream/PercentileEvaluator.java    |  68 --
 .../solrj/io/stream/PredictEvaluator.java       |  68 --
 .../client/solrj/io/stream/RandomStream.java    |   4 +-
 .../client/solrj/io/stream/RankEvaluator.java   |  75 --
 .../solrj/io/stream/RegressionEvaluator.java    | 112 ---
 .../solrj/io/stream/ReverseEvaluator.java       |  67 --
 .../client/solrj/io/stream/ScaleEvaluator.java  |  78 --
 .../solr/client/solrj/io/stream/SolrStream.java |  14 -
 .../solr/client/solrj/io/stream/SqlStream.java  |   2 -
 .../client/solrj/io/stream/StatsStream.java     |  10 -
 .../solrj/io/stream/TimeSeriesStream.java       |  38 +-
 .../client/solrj/io/stream/TopicStream.java     |  19 -
 .../solrj/io/stream/expr/StreamFactory.java     |   2 +-
 .../solr/common/params/AnalysisParams.java      |   2 +-
 .../solr/common/params/HighlightParams.java     |   2 -
 .../apache/solr/common/util/ExecutorUtil.java   |  41 --
 .../org/apache/solr/common/util/NamedList.java  |  23 +-
 .../solr/common/util/SimpleOrderedMap.java      |   9 +-
 .../embedded/SolrExampleStreamingTest.java      |   2 +-
 .../solrj/impl/BasicHttpSolrClientTest.java     |   2 +-
 .../CloudSolrClientMultiConstructorTest.java    |   4 +-
 .../impl/ConcurrentUpdateSolrClientTest.java    |  23 +-
 .../solrj/io/graph/GraphExpressionTest.java     |   2 +-
 .../solrj/io/stream/StreamExpressionTest.java   | 330 +++++++++
 .../java/org/apache/solr/SolrTestCaseJ4.java    | 108 +--
 .../apache/solr/cloud/SolrCloudTestCase.java    |   6 +-
 247 files changed, 10742 insertions(+), 7173 deletions(-)
----------------------------------------------------------------------



[26/38] lucene-solr:jira/solr-8668: SOLR-10791: Remove deprecated options in SSLTestConfig

Posted by cp...@apache.org.
SOLR-10791: Remove deprecated options in SSLTestConfig


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

Branch: refs/heads/jira/solr-8668
Commit: fb3d3f1c9296734576a70b80f61b497eccc8ebd5
Parents: c88c524
Author: Chris Hostetter <ho...@apache.org>
Authored: Thu Jun 1 10:50:58 2017 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Thu Jun 1 10:50:58 2017 -0700

----------------------------------------------------------------------
 solr/CHANGES.txt                                |   2 +
 .../server/etc/test/create-solrtest.keystore.sh |  37 ------------
 solr/server/etc/test/solrtest.keystore          | Bin 2208 -> 0 bytes
 .../solrj/impl/BasicHttpSolrClientTest.java     |  16 -----
 .../org/apache/solr/util/SSLTestConfig.java     |  58 +++----------------
 5 files changed, 10 insertions(+), 103 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/fb3d3f1c/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 4159318..106a4df 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -213,6 +213,8 @@ Other Changes
 
 * SOLR-10792: Deprecate and remove implicit registration of "lucenePlusSort" aka OldLuceneQParser (hossman)
 
+* SOLR-10791: Remove deprecated options in SSLTestConfig (hossman)
+
 ==================  6.7.0 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/fb3d3f1c/solr/server/etc/test/create-solrtest.keystore.sh
----------------------------------------------------------------------
diff --git a/solr/server/etc/test/create-solrtest.keystore.sh b/solr/server/etc/test/create-solrtest.keystore.sh
deleted file mode 100755
index 36c5f0d..0000000
--- a/solr/server/etc/test/create-solrtest.keystore.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash -ex
-
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-############
- 
-# This script shows how the solrtest.keystore file used for solr tests 
-# was generated.
-#
-# Running this script should only be necessary if the keystore file
-# needs to be replaced, which shouldn't be required until sometime around
-# the year 4751.
-#
-# NOTE: the "-ext" option used in the "keytool" command requires that you have
-# the java7 version of keytool, but the generated key will work with any 
-# version of java
-
-echo "### remove old keystore"
-rm -f solrtest.keystore
-
-echo "### create keystore and keys"
-keytool -keystore solrtest.keystore -storepass "secret" -alias solrtest -keypass "secret" -genkey -keyalg RSA -dname "cn=localhost, ou=SolrTest, o=lucene.apache.org, c=US" -ext "san=ip:127.0.0.1" -validity 999999
-
-

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/fb3d3f1c/solr/server/etc/test/solrtest.keystore
----------------------------------------------------------------------
diff --git a/solr/server/etc/test/solrtest.keystore b/solr/server/etc/test/solrtest.keystore
deleted file mode 100644
index bcc6ec0..0000000
Binary files a/solr/server/etc/test/solrtest.keystore and /dev/null differ

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/fb3d3f1c/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrClientTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrClientTest.java
index 4addce3..a5b45a2 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrClientTest.java
@@ -71,7 +71,6 @@ import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.SuppressForbidden;
-import org.apache.solr.util.SSLTestConfig;
 import org.eclipse.jetty.servlet.ServletHolder;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -623,21 +622,6 @@ public class BasicHttpSolrClientTest extends SolrJettyTestBase {
   }
 
   /**
-   * A trivial test that verifies the example keystore used for SSL testing can be 
-   * found using the base class. this helps future-proof against the possibility of 
-   * something moving/breaking the keystore path in a way that results in the SSL 
-   * randomization logic being forced to silently never use SSL.  (We can't enforce 
-   * this type of check in the base class because then it would not be usable by client 
-   * code depending on the test framework
-   */
-  public void testExampleKeystorePath() {
-    assertNotNull("Example keystore is null, meaning that something has changed in the " +
-                  "structure of the example configs and/or ExternalPaths.java - " + 
-                  "SSL randomization is broken",
-                  SSLTestConfig.TEST_KEYSTORE);
-  }
-
-  /**
    * An interceptor changing the request
    */
   HttpRequestInterceptor changeRequestInterceptor = new HttpRequestInterceptor() {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/fb3d3f1c/solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java
----------------------------------------------------------------------
diff --git a/solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java b/solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java
index 7dc0275..b60efdb 100644
--- a/solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java
+++ b/solr/test-framework/src/java/org/apache/solr/util/SSLTestConfig.java
@@ -16,7 +16,6 @@
  */
 package org.apache.solr.util;
 
-import java.io.File;
 import java.util.Random;
 import java.security.KeyManagementException;
 import java.security.KeyStore;
@@ -51,14 +50,6 @@ import org.eclipse.jetty.util.ssl.SslContextFactory;
  */
 public class SSLTestConfig extends SSLConfig {
 
-  /** @deprecated No longer used except by {@link #setSSLSystemProperties} */
-  public static File TEST_KEYSTORE = ExternalPaths.SERVER_HOME == null ? null
-    : new File(ExternalPaths.SERVER_HOME, "../etc/test/solrtest.keystore");
-  
-  /** @deprecated No longer used except by {@link #setSSLSystemProperties} */
-  private static String TEST_KEYSTORE_PATH = TEST_KEYSTORE != null
-    && TEST_KEYSTORE.exists() ? TEST_KEYSTORE.getAbsolutePath() : null;
-
   private static final String TEST_KEYSTORE_RESOURCE = "SSLTestConfig.testing.keystore";
   private static final String TEST_KEYSTORE_PASSWORD = "secret";
 
@@ -87,17 +78,6 @@ public class SSLTestConfig extends SSLConfig {
     }
   }
 
-  /** 
-   * Create an SSLTestConfig using explicit paths for files 
-   * @deprecated - use {@link SSLConfig} directly
-   */
-  @Deprecated
-  public SSLTestConfig(boolean useSSL, boolean clientAuth, String keyStore, String keyStorePassword, String trustStore, String trustStorePassword) {
-    super(useSSL, clientAuth, keyStore, keyStorePassword, trustStore, trustStorePassword);
-    this.keyStore = tryNewResource(keyStore, "KeyStore");
-    this.trustStore = tryNewResource(trustStore, "TrustStore");
-  }
-
   /**
    * Helper utility for building resources from arbitrary user input paths/urls
    * if input is null, returns null; otherwise attempts to build Resource and verifies that Resource exists.
@@ -118,19 +98,21 @@ public class SSLTestConfig extends SSLConfig {
     return result;
   }
 
-  /** NOTE: This method is meaningless unless you explicitly provide paths when constructing this instance 
-   * @see #SSLTestConfig(boolean,boolean,String,String,String,String)
+  /** 
+   * NOTE: This method is meaningless in SSLTestConfig.
+   * @return null
    */
   @Override
   public String getKeyStore() {
-    return super.getKeyStore();
+    return null;
   }
-  /** NOTE: This method is meaningless unless you explicitly provide paths when constructing this instance 
-   * @see #SSLTestConfig(boolean,boolean,String,String,String,String)
+  /** 
+   * NOTE: This method is meaningless in SSLTestConfig.
+   * @return null
    */
   @Override
   public String getTrustStore() {
-    return super.getTrustStore();
+    return null;
   }
   
   /**
@@ -302,30 +284,6 @@ public class SSLTestConfig extends SSLConfig {
   }
 
   /**
-   * @deprecated this method has very little practical use, in most cases you'll want to use 
-   * {@link SSLContext#setDefault} with {@link #buildClientSSLContext} instead.
-   */
-  @Deprecated
-  public static void setSSLSystemProperties() {
-    System.setProperty("javax.net.ssl.keyStore", TEST_KEYSTORE_PATH);
-    System.setProperty("javax.net.ssl.keyStorePassword", TEST_KEYSTORE_PASSWORD);
-    System.setProperty("javax.net.ssl.trustStore", TEST_KEYSTORE_PATH);
-    System.setProperty("javax.net.ssl.trustStorePassword", TEST_KEYSTORE_PASSWORD);
-  }
-  
-  /**
-   * @deprecated this method has very little practical use, in most cases you'll want to use 
-   * {@link SSLContext#setDefault} with {@link #buildClientSSLContext} instead.
-   */
-  @Deprecated
-  public static void clearSSLSystemProperties() {
-    System.clearProperty("javax.net.ssl.keyStore");
-    System.clearProperty("javax.net.ssl.keyStorePassword");
-    System.clearProperty("javax.net.ssl.trustStore");
-    System.clearProperty("javax.net.ssl.trustStorePassword");
-  }
-
-  /**
    * A mocked up instance of SecureRandom that just uses {@link Random} under the covers.
    * This is to prevent blocking issues that arise in platform default 
    * SecureRandom instances due to too many instances / not enough random entropy.  


[21/38] lucene-solr:jira/solr-8668: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/lucene-solr

Posted by cp...@apache.org.
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/lucene-solr


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

Branch: refs/heads/jira/solr-8668
Commit: 82f2a35396b5988092d9316f54433f52685fdb80
Parents: 5d0aa60 7da9e9d
Author: Cao Manh Dat <da...@apache.org>
Authored: Thu Jun 1 08:51:17 2017 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Thu Jun 1 08:51:17 2017 +0700

----------------------------------------------------------------------
 .../spatial3d/geom/GeoPolygonFactory.java       |  63 ++
 .../lucene/spatial3d/geom/GeoPolygonTest.java   |  63 ++
 solr/CHANGES.txt                                |   7 +
 .../org/apache/solr/cloud/AddReplicaCmd.java    |   3 +-
 .../solr/core/snapshots/SolrSnapshotsTool.java  |   7 +-
 .../solr/handler/admin/ConfigSetsHandler.java   |   4 +
 .../resources/apispec/collections.Commands.json |  14 +-
 .../collections.collection.shards.Commands.json |   5 +
 .../AbstractCloudBackupRestoreTestCase.java     |  11 +-
 .../CollectionsAPIAsyncDistributedZkTest.java   |  62 +-
 .../solr/cloud/CollectionsAPISolrJTest.java     |  12 +-
 ...ConcurrentDeleteAndCreateCollectionTest.java |  12 +-
 .../org/apache/solr/cloud/DeleteStatusTest.java |  23 -
 .../org/apache/solr/cloud/ForceLeaderTest.java  |  25 +-
 .../cloud/FullSolrCloudDistribCmdsTest.java     |  16 +-
 .../apache/solr/cloud/HttpPartitionTest.java    |  36 +-
 .../cloud/LeaderFailoverAfterPartitionTest.java |  10 +-
 .../LeaderInitiatedRecoveryOnCommitTest.java    |  19 +-
 .../apache/solr/cloud/MultiThreadedOCPTest.java |  63 +-
 .../org/apache/solr/cloud/ReplaceNodeTest.java  |   4 +-
 .../solr/cloud/ReplicationFactorTest.java       |   4 +-
 .../apache/solr/cloud/RollingRestartTest.java   |   2 +-
 .../org/apache/solr/cloud/ShardSplitTest.java   |   8 +-
 .../cloud/SharedFSAutoReplicaFailoverTest.java  |  24 +-
 .../cloud/SimpleCollectionCreateDeleteTest.java |  13 +-
 .../apache/solr/cloud/TestCollectionAPI.java    |  24 +-
 .../org/apache/solr/cloud/TestPullReplica.java  |  89 +-
 .../cloud/TestRandomRequestDistribution.java    |  15 +-
 .../solr/cloud/TestRequestForwarding.java       |   6 +-
 .../cloud/TestSolrCloudWithKerberosAlt.java     |   9 +-
 .../TestSolrCloudWithSecureImpersonation.java   |   6 +-
 .../org/apache/solr/cloud/TestTlogReplica.java  |  86 +-
 .../apache/solr/handler/TestBlobHandler.java    |  10 +-
 .../solr/handler/admin/TestCollectionAPIs.java  |  38 +-
 .../solr/handler/admin/TestConfigsApi.java      |   2 +-
 .../solr/search/stats/TestDistribIDF.java       |  13 +-
 .../scripts/cloud-scripts/snapshotscli.sh       |   2 +-
 solr/solr-ref-guide/src/codec-factory.adoc      |  24 +-
 solr/solr-ref-guide/src/coreadmin-api.adoc      |   2 +-
 solr/solr-ref-guide/src/css/theme-solr.css      |   2 +-
 solr/solr-ref-guide/src/enabling-ssl.adoc       |   2 +-
 solr/solr-ref-guide/src/format-of-solr-xml.adoc |  24 +-
 .../src/solr-control-script-reference.adoc      |  11 +-
 .../solrj/request/CollectionAdminRequest.java   | 844 ++-----------------
 ...ollectionAdminRequestRequiredParamsTest.java | 137 +--
 .../request/TestCollectionAdminRequest.java     |  84 +-
 .../cloud/AbstractFullDistribZkTestBase.java    |  23 +-
 47 files changed, 693 insertions(+), 1270 deletions(-)
----------------------------------------------------------------------



[23/38] lucene-solr:jira/solr-8668: LUCENE-7859: PackedQuadPrefixTree getTokenBytes bug

Posted by cp...@apache.org.
LUCENE-7859: PackedQuadPrefixTree getTokenBytes bug


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

Branch: refs/heads/jira/solr-8668
Commit: 38741ece587f2bfb4a2f6393ea84684f44a52dd5
Parents: 4a378eb
Author: David Smiley <ds...@apache.org>
Authored: Thu Jun 1 01:13:26 2017 -0400
Committer: David Smiley <ds...@apache.org>
Committed: Thu Jun 1 01:13:26 2017 -0400

----------------------------------------------------------------------
 lucene/CHANGES.txt                              |  3 ++
 .../prefix/tree/PackedQuadPrefixTree.java       | 30 ++++++++++++--------
 .../RandomSpatialOpFuzzyPrefixTreeTest.java     | 28 ++++++++++++------
 3 files changed, 41 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/38741ece/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 0c1d351..79a30fa 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -64,6 +64,9 @@ Bug Fixes
 * LUCENE-7626: IndexWriter will no longer accept broken token offsets
   (Mike McCandless)
 
+* LUCENE-7859: Spatial-extras PackedQuadPrefixTree bug that only revealed itself
+  with the new pointsOnly optimizations in LUCENE-7845. (David Smiley)
+
 Improvements
 
 * LUCENE-7489: Better storage of sparse doc-values fields with the default

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/38741ece/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/PackedQuadPrefixTree.java
----------------------------------------------------------------------
diff --git a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/PackedQuadPrefixTree.java b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/PackedQuadPrefixTree.java
index b86a6d1..6046ed2 100644
--- a/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/PackedQuadPrefixTree.java
+++ b/lucene/spatial-extras/src/java/org/apache/lucene/spatial/prefix/tree/PackedQuadPrefixTree.java
@@ -21,13 +21,13 @@ import java.util.Collection;
 import java.util.List;
 import java.util.NoSuchElementException;
 
+import org.apache.lucene.util.BytesRef;
 import org.locationtech.spatial4j.context.SpatialContext;
 import org.locationtech.spatial4j.shape.Point;
 import org.locationtech.spatial4j.shape.Rectangle;
 import org.locationtech.spatial4j.shape.Shape;
 import org.locationtech.spatial4j.shape.SpatialRelation;
 import org.locationtech.spatial4j.shape.impl.RectangleImpl;
-import org.apache.lucene.util.BytesRef;
 
 /**
  * Uses a compact binary representation of 8 bytes to encode a spatial quad trie.
@@ -161,7 +161,7 @@ public class PackedQuadPrefixTree extends QuadPrefixTree {
       super(null, 0, 0);
       this.term = term;
       this.b_off = 0;
-      this.bytes = longToByteArray(this.term);
+      this.bytes = longToByteArray(this.term, new byte[8]);
       this.b_len = 8;
       readLeafAdjust();
     }
@@ -229,30 +229,37 @@ public class PackedQuadPrefixTree extends QuadPrefixTree {
 
     @Override
     public BytesRef getTokenBytesWithLeaf(BytesRef result) {
-      if (isLeaf) {
-        term |= 0x1L;
+      result = getTokenBytesNoLeaf(result);
+      if (isLeaf()) {
+        result.bytes[8 - 1] |= 0x1L; // set leaf
       }
-      return getTokenBytesNoLeaf(result);
+      return result;
     }
 
     @Override
     public BytesRef getTokenBytesNoLeaf(BytesRef result) {
-      if (result == null)
-        return new BytesRef(bytes, b_off, b_len);
-      result.bytes = longToByteArray(this.term);
+      if (result == null) {
+        result = new BytesRef(8);
+      } else if (result.bytes.length < 8) {
+        result.bytes = new byte[8];
+      }
+      result.bytes = longToByteArray(this.term, result.bytes);
       result.offset = 0;
-      result.length = result.bytes.length;
+      result.length = 8;
+      // no leaf
+      result.bytes[8 - 1] &= ~1; // clear last bit (leaf bit)
       return result;
     }
 
     @Override
     public int compareToNoLeaf(Cell fromCell) {
       PackedQuadCell b = (PackedQuadCell) fromCell;
+      //TODO clear last bit without the condition
       final long thisTerm = (((0x1L)&term) == 0x1L) ? term-1 : term;
       final long fromTerm = (((0x1L)&b.term) == 0x1L) ? b.term-1 : b.term;
       final int result = Long.compareUnsigned(thisTerm, fromTerm);
       assert Math.signum(result)
-          == Math.signum(compare(longToByteArray(thisTerm), 0, 8, longToByteArray(fromTerm), 0, 8)); // TODO remove
+          == Math.signum(compare(longToByteArray(thisTerm, new byte[8]), 0, 8, longToByteArray(fromTerm, new byte[8]), 0, 8)); // TODO remove
       return result;
     }
 
@@ -343,8 +350,7 @@ public class PackedQuadPrefixTree extends QuadPrefixTree {
           | ((long)b7 & 255L) << 8 | (long)b8 & 255L;
     }
 
-    private byte[] longToByteArray(long value) {
-      byte[] result = new byte[8];
+    private byte[] longToByteArray(long value, byte[] result) {
       for(int i = 7; i >= 0; --i) {
         result[i] = (byte)((int)(value & 255L));
         value >>= 8;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/38741ece/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java
----------------------------------------------------------------------
diff --git a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java
index c7e107c..cfc9980 100644
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java
+++ b/lucene/spatial-extras/src/test/org/apache/lucene/spatial/prefix/RandomSpatialOpFuzzyPrefixTreeTest.java
@@ -29,14 +29,6 @@ import java.util.Map;
 import java.util.Set;
 
 import com.carrotsearch.randomizedtesting.annotations.Repeat;
-import org.locationtech.spatial4j.context.SpatialContext;
-import org.locationtech.spatial4j.context.SpatialContextFactory;
-import org.locationtech.spatial4j.shape.Point;
-import org.locationtech.spatial4j.shape.Rectangle;
-import org.locationtech.spatial4j.shape.Shape;
-import org.locationtech.spatial4j.shape.ShapeCollection;
-import org.locationtech.spatial4j.shape.SpatialRelation;
-import org.locationtech.spatial4j.shape.impl.RectangleImpl;
 import org.apache.lucene.document.Document;
 import org.apache.lucene.document.Field;
 import org.apache.lucene.document.StoredField;
@@ -52,6 +44,14 @@ import org.apache.lucene.spatial.prefix.tree.SpatialPrefixTree;
 import org.apache.lucene.spatial.query.SpatialArgs;
 import org.apache.lucene.spatial.query.SpatialOperation;
 import org.junit.Test;
+import org.locationtech.spatial4j.context.SpatialContext;
+import org.locationtech.spatial4j.context.SpatialContextFactory;
+import org.locationtech.spatial4j.shape.Point;
+import org.locationtech.spatial4j.shape.Rectangle;
+import org.locationtech.spatial4j.shape.Shape;
+import org.locationtech.spatial4j.shape.ShapeCollection;
+import org.locationtech.spatial4j.shape.SpatialRelation;
+import org.locationtech.spatial4j.shape.impl.RectangleImpl;
 
 import static com.carrotsearch.randomizedtesting.RandomizedTest.randomBoolean;
 import static com.carrotsearch.randomizedtesting.RandomizedTest.randomInt;
@@ -152,6 +152,18 @@ public class RandomSpatialOpFuzzyPrefixTreeTest extends StrategyTestCase {
     doTest(SpatialOperation.Contains);
   }
 
+  @Test
+  public void testPackedQuadPointsOnlyBug() throws IOException {
+    setupQuadGrid(1, true); // packed quad.  maxLevels doesn't matter.
+    setupCtx2D(ctx);
+    ((PrefixTreeStrategy) strategy).setPointsOnly(true);
+    Point point = ctx.makePoint(169.0, 107.0);
+    adoc("0", point);
+    commit();
+    Query query = strategy.makeQuery(new SpatialArgs(SpatialOperation.Intersects, point));
+    assertEquals(1, executeQuery(query, 1).numFound);
+  }
+
   /** See LUCENE-5062, {@link ContainsPrefixTreeQuery#multiOverlappingIndexedShapes}. */
   @Test
   public void testContainsPairOverlap() throws IOException {


[14/38] lucene-solr:jira/solr-8668: SOLR-10360: Solr HDFS snapshot export fails due to FileNotFoundException error when using MR1 instead of yarn.

Posted by cp...@apache.org.
SOLR-10360: Solr HDFS snapshot export fails due to FileNotFoundException error when using MR1 instead of yarn.

This closes #173


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

Branch: refs/heads/jira/solr-8668
Commit: 872b0dba2d383255ffc020a2b429e395d9817175
Parents: d148bd4
Author: Mark Miller <ma...@apache.org>
Authored: Wed May 31 14:24:18 2017 -0400
Committer: Mark Miller <ma...@apache.org>
Committed: Wed May 31 14:24:18 2017 -0400

----------------------------------------------------------------------
 solr/CHANGES.txt                                  | 3 +++
 solr/server/scripts/cloud-scripts/snapshotscli.sh | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/872b0dba/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 1192d36..a2dc820 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -250,6 +250,9 @@ Bug Fixes
 * SOLR-10719: Creating a core.properties fails if the parent of core.properties is a symlinked dierctory
   (Erick Erickson)
 
+* SOLR-10360: Solr HDFS snapshot export fails due to FileNotFoundException error when using MR1 instead of
+  yarn. (Hrishikesh via Mark Miller)
+
 Optimizations
 ----------------------
 * SOLR-10634: JSON Facet API: When a field/terms facet will retrieve all buckets (i.e. limit:-1)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/872b0dba/solr/server/scripts/cloud-scripts/snapshotscli.sh
----------------------------------------------------------------------
diff --git a/solr/server/scripts/cloud-scripts/snapshotscli.sh b/solr/server/scripts/cloud-scripts/snapshotscli.sh
index 41ae4aa..f885721 100755
--- a/solr/server/scripts/cloud-scripts/snapshotscli.sh
+++ b/solr/server/scripts/cloud-scripts/snapshotscli.sh
@@ -86,7 +86,7 @@ copy_snapshot_files() {
     for shardId in $(hdfs dfs -stat "%n" "${copylisting_dir_path}/*"); do
       oPath="${destPath}/${snapshotName}/snapshot.${shardId}"
       echo "Copying the index files for ${shardId} to ${oPath}"
-      ${distCpCmd} -f " ${copylisting_dir_path}/${shardId}" "${oPath}" > /dev/null
+      ${distCpCmd} -f "${copylisting_dir_path}/${shardId}" "${oPath}" > /dev/null
     done
   else
     echo "Directory ${copylisting_dir_path} does not exist."


[07/38] lucene-solr:jira/solr-8668: Ref Guide: finish bin/solr auth docs for SOLR-8440

Posted by cp...@apache.org.
Ref Guide: finish bin/solr auth docs for SOLR-8440


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

Branch: refs/heads/jira/solr-8668
Commit: 2d6edc69b365b8bcc0450b647b2facfac6e777c7
Parents: 9769323
Author: Cassandra Targett <ct...@apache.org>
Authored: Wed May 31 09:28:47 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Wed May 31 09:28:47 2017 -0500

----------------------------------------------------------------------
 .../src/solr-control-script-reference.adoc               | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2d6edc69/solr/solr-ref-guide/src/solr-control-script-reference.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-control-script-reference.adoc b/solr/solr-ref-guide/src/solr-control-script-reference.adoc
index d5fc5c8..fd27d0a 100644
--- a/solr/solr-ref-guide/src/solr-control-script-reference.adoc
+++ b/solr/solr-ref-guide/src/solr-control-script-reference.adoc
@@ -425,7 +425,7 @@ This option is useful if you are running multiple standalone Solr instances on t
 
 The `bin/solr` script allows enabling or disabling Basic Authentication, allowing you to configure authentication from the command line.
 
-Currently, this script only enables Basic Authentication.
+Currently, this script only enables Basic Authentication, and is only available when using SolrCloud mode.
 
 === Enabling Basic Authentication
 
@@ -435,7 +435,7 @@ TIP: For more information about Solr's authentication plugins, see the section <
 
 The `bin/solr auth enable` command makes several changes to enable Basic Authentication:
 
-* Creates a `security.json` file and, if using SolrCloud, uploads it to ZooKeeper. The `security.json` file will look similar to:
+* Creates a `security.json` file and uploads it to ZooKeeper. The `security.json` file will look similar to:
 +
 [source,json]
 ----
@@ -484,15 +484,14 @@ When *true*, blocks all unauthenticated users from accessing Solr. This defaults
 `-updateIncludeFileOnly`::
 When *true*, only the settings in `bin/solr.in.sh` or `bin\solr.in.cmd` will be updated, and `security.json` will not be created.
 
-// TODO 6.6 clarify when this is required
 `-z`::
-Defines the ZooKeeper connect string.
+Defines the ZooKeeper connect string. This is useful if you want to enable authentication before all your Solr nodes have come up.
 
 `-d`::
-Defines the Solr server directory, by default `$SOLR_HOME/server`. It is not common to need to override the default.
+Defines the Solr server directory, by default `$SOLR_HOME/server`. It is not common to need to override the default, and is only needed if you have customized the `$SOLR_HOME` directory path.
 
 `-s`::
-Defines the location of `solr.solr.home`, which by default is `server/solr`. If you have multiple instances of Solr on the same host, you likely need to define this.
+Defines the location of `solr.solr.home`, which by default is `server/solr`. If you have multiple instances of Solr on the same host, or if you have customized the `$SOLR_HOME` directory path, you likely need to define this.
 
 === Disabling Basic Authentication
 


[18/38] lucene-solr:jira/solr-8668: SOLR-10290: Replace the bright green in the bottom nav links with a lighter tone of the header

Posted by cp...@apache.org.
SOLR-10290: Replace the bright green in the bottom nav links with a lighter tone of the header


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

Branch: refs/heads/jira/solr-8668
Commit: f34155fb2014393da50a836a1b78416c406b0dfd
Parents: 22c2ed0
Author: Cassandra Targett <ct...@apache.org>
Authored: Wed May 31 16:08:09 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Wed May 31 16:08:41 2017 -0500

----------------------------------------------------------------------
 solr/solr-ref-guide/src/css/theme-solr.css | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f34155fb/solr/solr-ref-guide/src/css/theme-solr.css
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/css/theme-solr.css b/solr/solr-ref-guide/src/css/theme-solr.css
index ae0d6bf..daa8fbe 100644
--- a/solr/solr-ref-guide/src/css/theme-solr.css
+++ b/solr/solr-ref-guide/src/css/theme-solr.css
@@ -55,7 +55,7 @@ a[data-toggle="tooltip"] {
 /* Used for nav buttons */
 .btn-primary {
     color: #ffffff;
-    background-color: #0A7C38;
+    background-color: #F35B38;
     border-color: #E6E7E8;
 }
 


[38/38] lucene-solr:jira/solr-8668: Merge branch 'master' into jira/solr-8668

Posted by cp...@apache.org.
Merge branch 'master' into jira/solr-8668


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

Branch: refs/heads/jira/solr-8668
Commit: 51fe774c53904500ecb8f2319d81d000ddfe7ecd
Parents: d8d7e28 445ceda
Author: Christine Poerschke <cp...@apache.org>
Authored: Fri Jun 2 11:10:26 2017 +0100
Committer: Christine Poerschke <cp...@apache.org>
Committed: Fri Jun 2 11:10:26 2017 +0100

----------------------------------------------------------------------
 dev-tools/scripts/checkJavadocLinks.py          |   5 +-
 lucene/CHANGES.txt                              |   6 +
 lucene/NOTICE.txt                               |   2 +-
 lucene/ivy-versions.properties                  |   2 +-
 .../prefix/tree/PackedQuadPrefixTree.java       |  30 +-
 .../RandomSpatialOpFuzzyPrefixTreeTest.java     |  28 +-
 .../spatial3d/geom/GeoPolygonFactory.java       |  63 ++
 .../lucene/spatial3d/geom/GeoPolygonTest.java   |  63 ++
 solr/CHANGES.txt                                |  28 +
 solr/NOTICE.txt                                 |   4 +-
 .../org/apache/solr/cloud/AddReplicaCmd.java    |   3 +-
 .../src/java/org/apache/solr/cloud/Assign.java  |   2 +-
 .../apache/solr/cloud/CreateCollectionCmd.java  |   4 +-
 .../apache/solr/cloud/rule/ReplicaAssigner.java |   2 +-
 .../solr/core/snapshots/SolrSnapshotsTool.java  |   7 +-
 .../org/apache/solr/handler/BlobHandler.java    |  17 +-
 .../solr/handler/admin/ConfigSetsHandler.java   |   4 +
 .../apache/solr/search/LuceneQParserPlugin.java |   2 +-
 .../solr/search/OldLuceneQParserPlugin.java     |   3 +
 .../org/apache/solr/search/QParserPlugin.java   |   1 -
 .../resources/apispec/collections.Commands.json |  14 +-
 .../collections.collection.shards.Commands.json |   5 +
 .../solr/collection1/conf/solrconfig.xml        |   3 +
 .../AbstractCloudBackupRestoreTestCase.java     |  11 +-
 .../CollectionsAPIAsyncDistributedZkTest.java   |  62 +-
 .../solr/cloud/CollectionsAPISolrJTest.java     |  12 +-
 ...ConcurrentDeleteAndCreateCollectionTest.java |  12 +-
 .../org/apache/solr/cloud/DeleteStatusTest.java |  23 -
 .../org/apache/solr/cloud/ForceLeaderTest.java  |  25 +-
 .../cloud/FullSolrCloudDistribCmdsTest.java     |  16 +-
 .../apache/solr/cloud/HttpPartitionTest.java    |  36 +-
 .../cloud/LeaderFailoverAfterPartitionTest.java |  10 +-
 .../LeaderInitiatedRecoveryOnCommitTest.java    |  19 +-
 .../apache/solr/cloud/MultiThreadedOCPTest.java |  63 +-
 .../org/apache/solr/cloud/ReplaceNodeTest.java  |   4 +-
 .../solr/cloud/ReplicationFactorTest.java       |   4 +-
 .../apache/solr/cloud/RollingRestartTest.java   |   2 +-
 .../org/apache/solr/cloud/ShardSplitTest.java   |   8 +-
 .../cloud/SharedFSAutoReplicaFailoverTest.java  |  24 +-
 .../cloud/SimpleCollectionCreateDeleteTest.java |  13 +-
 .../apache/solr/cloud/TestCollectionAPI.java    |  24 +-
 .../org/apache/solr/cloud/TestPullReplica.java  |  79 +-
 .../cloud/TestRandomRequestDistribution.java    |  15 +-
 .../solr/cloud/TestRequestForwarding.java       |   6 +-
 .../cloud/TestSolrCloudWithKerberosAlt.java     |   9 +-
 .../TestSolrCloudWithSecureImpersonation.java   |   6 +-
 .../org/apache/solr/cloud/TestTlogReplica.java  |  78 +-
 .../apache/solr/handler/TestBlobHandler.java    |  10 +-
 .../solr/handler/admin/TestCollectionAPIs.java  |  38 +-
 .../solr/handler/admin/TestConfigsApi.java      |   2 +-
 .../apache/solr/search/QueryEqualityTest.java   |   1 +
 .../solr/search/stats/TestDistribIDF.java       |  13 +-
 solr/licenses/noggit-0.6.jar.sha1               |   1 -
 solr/licenses/noggit-0.8.jar.sha1               |   1 +
 .../server/etc/test/create-solrtest.keystore.sh |  37 -
 solr/server/etc/test/solrtest.keystore          | Bin 2208 -> 0 bytes
 .../scripts/cloud-scripts/snapshotscli.sh       |   2 +-
 solr/solr-ref-guide/src/codec-factory.adoc      |  24 +-
 solr/solr-ref-guide/src/collections-api.adoc    |  23 +-
 solr/solr-ref-guide/src/coreadmin-api.adoc      |   2 +-
 solr/solr-ref-guide/src/css/theme-solr.css      |   2 +-
 solr/solr-ref-guide/src/enabling-ssl.adoc       |   2 +-
 solr/solr-ref-guide/src/format-of-solr-xml.adoc |  24 +-
 .../src/near-real-time-searching.adoc           |  14 +-
 solr/solr-ref-guide/src/other-parsers.adoc      |  11 -
 .../src/solr-control-script-reference.adoc      |  11 +-
 solr/solr-ref-guide/src/stream-sources.adoc     |  88 +-
 .../src/the-extended-dismax-query-parser.adoc   |   3 +-
 .../solrj/io/stream/TimeSeriesStream.java       |  38 +-
 .../solrj/request/CollectionAdminRequest.java   | 844 ++-----------------
 .../solr/common/util/CommandOperation.java      |   4 +
 ...ollectionAdminRequestRequiredParamsTest.java | 137 +--
 .../solrj/impl/BasicHttpSolrClientTest.java     |  16 -
 .../solrj/io/stream/StreamExpressionTest.java   |  81 ++
 .../request/TestCollectionAdminRequest.java     |  84 +-
 .../cloud/AbstractFullDistribZkTestBase.java    |  23 +-
 .../org/apache/solr/util/SSLTestConfig.java     |  58 +-
 77 files changed, 1049 insertions(+), 1404 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/51fe774c/solr/core/src/test/org/apache/solr/cloud/TestSolrCloudWithKerberosAlt.java
----------------------------------------------------------------------


[33/38] lucene-solr:jira/solr-8668: SOLR-10559: Add tuple documentation

Posted by cp...@apache.org.
SOLR-10559: Add tuple documentation


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

Branch: refs/heads/jira/solr-8668
Commit: a827a9d909b38ea9bcd466e1b5ce3f7685cc6a3e
Parents: 057451a
Author: Joel Bernstein <jb...@apache.org>
Authored: Thu Jun 1 17:11:50 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Thu Jun 1 17:11:50 2017 -0400

----------------------------------------------------------------------
 solr/solr-ref-guide/src/stream-sources.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a827a9d9/solr/solr-ref-guide/src/stream-sources.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-sources.adoc b/solr/solr-ref-guide/src/stream-sources.adoc
index 2bb0805..e8887b4 100644
--- a/solr/solr-ref-guide/src/stream-sources.adoc
+++ b/solr/solr-ref-guide/src/stream-sources.adoc
@@ -485,7 +485,7 @@ topic(checkpointCollection,
 
 The `tuple` function emits a single Tuple with name/value pairs. The values can be set to variables assigned in a `let` expression, literals, Stream Evaluators or
 Stream Expressions. In the case of Stream Evaluators the tuple will output the return value from the evaluator.
-This could be a numeric, list or map. If a Stream Expression is set to a value, the `tuple` function will flatten
+This could be a numeric, list or map. If a value is set to a Stream Expression, the `tuple` function will flatten
 the tuple stream from the Stream Expression into a list of Tuples.
 
 === tuple Parameters