You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2017/10/31 14:01:43 UTC
[01/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11467: Remove
additional logging to track test failures
Repository: lucene-solr
Updated Branches:
refs/heads/jira/solr-11285-sim 92e5a6cf7 -> 2772945fb
SOLR-11467: Remove additional logging to track test failures
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/0ddb8a03
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0ddb8a03
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0ddb8a03
Branch: refs/heads/jira/solr-11285-sim
Commit: 0ddb8a03d39c0902198b780752e0cf0934c8041a
Parents: cb20bbd
Author: Varun Thacker <va...@apache.org>
Authored: Wed Oct 25 14:43:33 2017 -0700
Committer: Varun Thacker <va...@apache.org>
Committed: Wed Oct 25 14:43:33 2017 -0700
----------------------------------------------------------------------
.../org/apache/solr/handler/CdcrReplicator.java | 19 ----------------
.../apache/solr/handler/CdcrRequestHandler.java | 11 ----------
.../update/processor/CdcrUpdateProcessor.java | 3 ---
.../apache/solr/cloud/CdcrBootstrapTest.java | 23 ++------------------
4 files changed, 2 insertions(+), 54 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0ddb8a03/solr/core/src/java/org/apache/solr/handler/CdcrReplicator.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/CdcrReplicator.java b/solr/core/src/java/org/apache/solr/handler/CdcrReplicator.java
index c40a2e5..a151a43 100644
--- a/solr/core/src/java/org/apache/solr/handler/CdcrReplicator.java
+++ b/solr/core/src/java/org/apache/solr/handler/CdcrReplicator.java
@@ -21,7 +21,6 @@ import java.lang.invoke.MethodHandles;
import java.nio.charset.Charset;
import java.util.List;
-import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
import org.apache.solr.client.solrj.request.UpdateRequest;
@@ -63,9 +62,6 @@ public class CdcrReplicator implements Runnable {
}
try {
- // check what's there in target before sending further
- printDocsFromTargetForAdditionalDebugging();
-
// create update request
UpdateRequest req = new UpdateRequest();
// Add the param to indicate the {@link CdcrUpdateProcessor} to keep the provided version number
@@ -81,10 +77,6 @@ public class CdcrReplicator implements Runnable {
Object o = subReader.next();
if (o == null) break; // we have reached the end of the update logs, we should close the batch
- //additional logging
- List entry = (List) o;
- log.info("cdcr: current tlog entry in replicator: " + entry);
-
if (isDelete(o)) {
/*
@@ -148,17 +140,6 @@ public class CdcrReplicator implements Runnable {
state.resetConsecutiveErrors();
}
-
- private void printDocsFromTargetForAdditionalDebugging() throws IOException, SolrServerException, CdcrReplicatorException {
- try {
- log.info("cdcr: docs in target: "+ state + " in replicator: "
- + state.getClient().query(new SolrQuery("*:*")).getResults());
- } catch (Exception e) {
- log.warn("cdcr: exception while querying to target: " + e);
- }
- }
-
-
private boolean isDelete(Object o) {
List entry = (List) o;
int operationAndFlags = (Integer) entry.get(0);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0ddb8a03/solr/core/src/java/org/apache/solr/handler/CdcrRequestHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/CdcrRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/CdcrRequestHandler.java
index 7f57eee..430237e 100644
--- a/solr/core/src/java/org/apache/solr/handler/CdcrRequestHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/CdcrRequestHandler.java
@@ -416,8 +416,6 @@ public class CdcrRequestHandler extends RequestHandlerBase implements SolrCoreAw
for (final Future<Long> future : parallelExecutor.invokeAll(callables)) {
long version = future.get();
- //additional logging
- log.info("cdcr: shardcheckpoint: versions on target: " + version);
if (version < checkpoint) { // we must take the lowest checkpoint from all the shards
checkpoint = version;
}
@@ -631,23 +629,16 @@ public class CdcrRequestHandler extends RequestHandlerBase implements SolrCoreAw
}
CountDownLatch latch = new CountDownLatch(1); // latch to make sure BOOTSTRAP_STATUS gives correct response
- //additional logging
- log.info("cdcr: bootstrap executing for collection: " + collectionName + " and shard: " + shard);
-
Runnable runnable = () -> {
Lock recoveryLock = req.getCore().getSolrCoreState().getRecoveryLock();
boolean locked = recoveryLock.tryLock();
SolrCoreState coreState = core.getSolrCoreState();
try {
if (!locked) {
- //additional logging
- log.info("cdcr: couldn't acquire lock for bootstrap, issue CANCEL");
handleCancelBootstrap(req, rsp);
} else if (leaderStateManager.amILeader()) {
coreState.setCdcrBootstrapRunning(true);
latch.countDown(); // free the latch as current bootstrap is executing
- //additional logging
- log.info("cdcr: acquire lock for bootstrap, latch removed");
//running.set(true);
String masterUrl = req.getParams().get(ReplicationHandler.MASTER_URL);
BootstrapCallable bootstrapCallable = new BootstrapCallable(masterUrl, core);
@@ -674,8 +665,6 @@ public class CdcrRequestHandler extends RequestHandlerBase implements SolrCoreAw
latch.countDown(); // free the latch as current bootstrap is executing
}
}
- //additional logging
- log.info("cdcr: bootstrap status after action: " + coreState.getCdcrBootstrapRunning());
};
try {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0ddb8a03/solr/core/src/java/org/apache/solr/update/processor/CdcrUpdateProcessor.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/update/processor/CdcrUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/CdcrUpdateProcessor.java
index 9cb7a8a..ee45467 100644
--- a/solr/core/src/java/org/apache/solr/update/processor/CdcrUpdateProcessor.java
+++ b/solr/core/src/java/org/apache/solr/update/processor/CdcrUpdateProcessor.java
@@ -67,9 +67,6 @@ public class CdcrUpdateProcessor extends DistributedUpdateProcessor {
cmd.setFlags(cmd.getFlags() & ~UpdateCommand.PEER_SYNC);
}
- //additional logging
- log.info("cdcr: version received at target: " + cmd.getVersion());
-
return result;
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0ddb8a03/solr/core/src/test/org/apache/solr/cloud/CdcrBootstrapTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/CdcrBootstrapTest.java b/solr/core/src/test/org/apache/solr/cloud/CdcrBootstrapTest.java
index 0925a68..580c047 100644
--- a/solr/core/src/test/org/apache/solr/cloud/CdcrBootstrapTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/CdcrBootstrapTest.java
@@ -163,7 +163,7 @@ public class CdcrBootstrapTest extends SolrTestCaseJ4 {
MiniSolrCloudCluster target = new MiniSolrCloudCluster(1, createTempDir("cdcr-target"), buildJettyConfig("/solr"));
try {
target.waitForAllNodes(30);
- log.info("Target zkHost = " + target.getZkServer().getZkAddress());
+ System.out.println("Target zkHost = " + target.getZkServer().getZkAddress());
System.setProperty("cdcr.target.zkHost", target.getZkServer().getZkAddress());
MiniSolrCloudCluster source = new MiniSolrCloudCluster(1, createTempDir("cdcr-source"), buildJettyConfig("/solr"));
@@ -261,9 +261,6 @@ public class CdcrBootstrapTest extends SolrTestCaseJ4 {
QueryResponse response = sourceSolrClient.query(new SolrQuery("*:*"));
assertEquals("", numDocs, response.getResults().getNumFound());
- //additional logging
- log.info("cdcr: numDocs after initial indexing in source: " + numDocs);
-
// setup the target cluster
target.uploadConfigSet(configset("cdcr-target"), "cdcr-target");
CollectionAdminRequest.createCollection("cdcr-target", "cdcr-target", 1, 1)
@@ -272,16 +269,8 @@ public class CdcrBootstrapTest extends SolrTestCaseJ4 {
targetSolrClient.setDefaultCollection("cdcr-target");
Thread.sleep(1000);
- //additional logging
- log.info("cdcr: numDocs in target-1 : " + targetSolrClient.query(new SolrQuery("*:*")).getResults().getNumFound());
-
cdcrStart(targetSolrClient);
cdcrStart(sourceSolrClient);
-
- //additional logging
- log.info("cdcr: cdcr is enabled on source and target both, bootstrap should be triggered");
- log.info("cdcr: current numDocs in target-2: " + targetSolrClient.query(new SolrQuery("*:*")).getResults().getNumFound());
-
int c = 0;
for (int k = 0; k < docs; k++) {
UpdateRequest req = new UpdateRequest();
@@ -292,20 +281,13 @@ public class CdcrBootstrapTest extends SolrTestCaseJ4 {
req.add(doc);
}
req.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
- log.info("Adding 100 docs with commit=true, numDocs=" + numDocs);
+ log.info("Adding " + docs + " docs with commit=true, numDocs=" + numDocs);
req.process(sourceSolrClient);
}
- //additional logging
- log.info("cdcr: current numDocs in target-3: " + targetSolrClient.query(new SolrQuery("*:*")).getResults().getNumFound());
-
response = sourceSolrClient.query(new SolrQuery("*:*"));
assertEquals("", numDocs, response.getResults().getNumFound());
- //additional logging
- log.info("cdcr: numDocs after second indexing in source: " + numDocs);
- log.info("cdcr: current numDocs in target-4: " + targetSolrClient.query(new SolrQuery("*:*")).getResults().getNumFound());
-
response = getCdcrQueue(sourceSolrClient);
log.info("Cdcr queue response: " + response.getResponse());
long foundDocs = waitForTargetToSync(numDocs, targetSolrClient);
@@ -326,7 +308,6 @@ public class CdcrBootstrapTest extends SolrTestCaseJ4 {
try {
targetSolrClient.commit();
response = targetSolrClient.query(new SolrQuery("*:*"));
- log.info("cdcr: numDocs in waitForTargetToSync: " + response.getResults().getNumFound());
if (response.getResults().getNumFound() == numDocs) {
break;
}
[47/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-10397: Remove
unused imports
Posted by ab...@apache.org.
SOLR-10397: Remove unused imports
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/0f901200
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0f901200
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0f901200
Branch: refs/heads/jira/solr-11285-sim
Commit: 0f9012009b36c1339e63d1b8e104b920d178be13
Parents: ce61a59
Author: Cao Manh Dat <da...@apache.org>
Authored: Tue Oct 31 15:07:52 2017 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Tue Oct 31 15:07:52 2017 +0700
----------------------------------------------------------------------
.../solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java | 2 --
1 file changed, 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0f901200/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java
index 6d8cc96..28b9aaf 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java
@@ -28,7 +28,6 @@ import org.apache.solr.client.solrj.embedded.JettySolrRunner;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.request.QueryRequest;
import org.apache.solr.cloud.SolrCloudTestCase;
-import org.apache.solr.common.cloud.ClusterStateUtil;
import org.apache.solr.common.cloud.DocCollection;
import org.apache.solr.common.cloud.Replica;
import org.apache.solr.common.cloud.ZkStateReader;
@@ -36,7 +35,6 @@ import org.apache.solr.common.params.CollectionParams;
import org.apache.solr.common.params.MapSolrParams;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.params.SolrParams;
-import org.apache.solr.core.CoreContainer;
import org.apache.solr.util.LogLevel;
import org.apache.solr.util.TimeOut;
import org.junit.BeforeClass;
[12/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-10874: Fix
AIOOBE caused by FloatPayloadValueSource calling PostingsEnum.nextPosition()
more than the given term's frequency in overridden FloatDocValues.floatVal().
Posted by ab...@apache.org.
SOLR-10874: Fix AIOOBE caused by FloatPayloadValueSource calling PostingsEnum.nextPosition() more than the given term's frequency in overridden FloatDocValues.floatVal().
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/c440361a
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/c440361a
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/c440361a
Branch: refs/heads/jira/solr-11285-sim
Commit: c440361a17af3c91ea0d6db3f0805da7762ea2cd
Parents: 95b7530
Author: Steve Rowe <sa...@gmail.com>
Authored: Thu Oct 26 14:44:22 2017 -0400
Committer: Steve Rowe <sa...@gmail.com>
Committed: Thu Oct 26 15:20:42 2017 -0400
----------------------------------------------------------------------
solr/CHANGES.txt | 4 +++
.../solr/search/FloatPayloadValueSource.java | 12 ++++++--
.../solr/search/function/TestFunctionQuery.java | 29 ++++++++++++++++++++
3 files changed, 42 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c440361a/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 1c7f894..f2ae5fb 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -70,6 +70,10 @@ Bug Fixes
* SOLR-11326: A bootstrap of a target cluster does not need to download the tlog files from the source cluster
(Amrit Sarkar, Varun Thacker)
+
+* SOLR-10874: Fix AIOOBE caused by FloatPayloadValueSource calling PostingsEnum.nextPosition()
+ more than the given term's frequency in overridden FloatDocValues.floatVal().
+ (Michael Kosten, Erik Hatcher, Steve Rowe)
Optimizations
----------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c440361a/solr/core/src/java/org/apache/solr/search/FloatPayloadValueSource.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/FloatPayloadValueSource.java b/solr/core/src/java/org/apache/solr/search/FloatPayloadValueSource.java
index 23e07e2..9b2d969 100644
--- a/solr/core/src/java/org/apache/solr/search/FloatPayloadValueSource.java
+++ b/solr/core/src/java/org/apache/solr/search/FloatPayloadValueSource.java
@@ -64,6 +64,7 @@ public class FloatPayloadValueSource extends ValueSource {
PostingsEnum docs ;
int atDoc;
int lastDocRequested = -1;
+ float docScore = 0.f;
{ reset(); }
@@ -141,6 +142,10 @@ public class FloatPayloadValueSource extends ValueSource {
// out-of-order access.... reset
reset();
}
+ else if (doc == lastDocRequested) {
+ return docScore;
+ }
+
lastDocRequested = doc;
if (atDoc < doc) {
@@ -150,7 +155,8 @@ public class FloatPayloadValueSource extends ValueSource {
if (atDoc > doc) {
// term doesn't match this document... either because we hit the
// end, or because the next doc is after this doc.
- return defaultValues.floatVal(doc);
+ docScore = defaultValues.floatVal(doc);
+ return docScore;
}
// a match!
@@ -172,8 +178,8 @@ public class FloatPayloadValueSource extends ValueSource {
}
}
-
- return (numPayloadsSeen > 0) ? payloadFunction.docScore(doc, indexedField, numPayloadsSeen, currentScore) : defaultValues.floatVal(doc);
+ docScore = (numPayloadsSeen > 0) ? payloadFunction.docScore(doc, indexedField, numPayloadsSeen, currentScore) : defaultValues.floatVal(doc);
+ return docScore;
} catch (IOException e) {
throw new RuntimeException("caught exception in function "+description()+" : doc="+doc, e);
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c440361a/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java b/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java
index 8383a67..dc23c4c 100644
--- a/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java
+++ b/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java
@@ -29,6 +29,7 @@ import org.apache.lucene.search.similarities.Similarity;
import org.apache.lucene.search.similarities.TFIDFSimilarity;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.common.SolrException;
+import org.apache.solr.common.params.CommonParams;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -503,6 +504,34 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
assertQ(req("fl","*,score","q", "{!func}payload(vals_dpf,x,0.0,max)"), "//float[@name='score']='37.0'");
assertQ(req("fl","*,score","q", "{!func}payload(vals_dpf,x,0.0,average)"), "//float[@name='score']='26.0'");
assertQ(req("fl","*,score","q", "{!func}payload(vals_dpf,x,0.0,first)"), "//float[@name='score']='22.0'");
+
+ // Test with debug
+ assertQ(req("fl","*,score","q", "{!func}payload(vals_dpf,A)", CommonParams.DEBUG, "true"), "//float[@name='score']='1.0'");
+ }
+
+ @Test
+ public void testRetrievePayloads() throws Exception {
+ clearIndex();
+ int numDocs = 100 + random().nextInt(100);
+ int numLocations = 1000 + random().nextInt(2000);
+ for (int docNum = 0 ; docNum < numDocs ; ++docNum) {
+ StringBuilder amountsBuilder = new StringBuilder();
+ for (int location = 1 ; location <= numLocations ; ++location) {
+ String amount = "" + location + '.' + random().nextInt(100);
+ amountsBuilder.append(location).append('|').append(amount).append(' ');
+ }
+ assertU(adoc("id","" + docNum,
+ "default_amount_f", "" + (10000 + random().nextInt(10000)) + ".0",
+ "amounts_dpf", amountsBuilder.toString()));
+ }
+ assertU(commit());
+ assertJQ(req("q","*:*",
+ "fl","id,location:$locationId,amount:$amount",
+ "sort","$amount asc",
+ "amount","payload(amounts_dpf,$locationId,default_amount_f)",
+ "locationId",""+(1+random().nextInt(numLocations)),
+ "wt","json"),
+ "/response/numFound==" + numDocs);
}
@Test
[14/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11509: Upgrade
notes for 7.1 Ref Guide
Posted by ab...@apache.org.
SOLR-11509: Upgrade notes for 7.1 Ref 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/be4a0846
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/be4a0846
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/be4a0846
Branch: refs/heads/jira/solr-11285-sim
Commit: be4a0846b676fdeb5ef5085d0cddfed39619f89e
Parents: c440361
Author: Cassandra Targett <ct...@apache.org>
Authored: Thu Oct 26 14:56:38 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Thu Oct 26 14:58:08 2017 -0500
----------------------------------------------------------------------
solr/solr-ref-guide/src/solr-upgrade-notes.adoc | 25 +++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/be4a0846/solr/solr-ref-guide/src/solr-upgrade-notes.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-upgrade-notes.adoc b/solr/solr-ref-guide/src/solr-upgrade-notes.adoc
index 39cec2f..752c1e0 100644
--- a/solr/solr-ref-guide/src/solr-upgrade-notes.adoc
+++ b/solr/solr-ref-guide/src/solr-upgrade-notes.adoc
@@ -27,12 +27,35 @@ When planning your Solr upgrade, consider the customizations you have made to yo
Detailed steps for upgrading a Solr cluster can be found in the section <<upgrading-a-solr-cluster.adoc#upgrading-a-solr-cluster,Upgrading a Solr Cluster>>.
+== Upgrading from Solr 7.0
+Users should be aware of the following major changes from v7.0:
+
+* The feature to automatically add replicas if a replica goes down, previously available only when storing indexes in HDFS, has been ported to the autoscaling framework. Due to this, `autoAddReplicas` is now available to all users even if their indexes are on local disks.
++
+Existing users of this feature should not have to change anything. However, they should note these changes:
+
+** Behavior: Changing the `autoAddReplicas` property from disabled (`false`) to enabled (`true`) using <<collections-api.adoc#modifycollection,MODIFYCOLLECTION API>> no longer replaces down replicas for the collection immediately. Instead, replicas are only added if a node containing them went down while `autoAddReplicas` was enabled. The parameters `autoReplicaFailoverBadNodeExpiration` and `autoReplicaFailoverWorkLoopDelay` are no longer used.
+** Deprecations: Enabling/disabling autoAddReplicas cluster-wide with the API will be deprecated; use suspend/resume trigger APIs with `name=".auto_add_replicas"` instead.
++
+More information about the changes to this feature can be found in the section <<solrcloud-autoscaling-auto-add-replicas.adoc#solrcloud-autoscaling-auto-add-replicas,SolrCloud Automatically Adding Replicas>>.
+
+* Shard and cluster metric reporter configuration now require a class attribute.
+** If a reporter configures the `group="shard"` attribute then please also configure the `class="org.apache.solr.metrics.reporters.solr.SolrShardReporter"` attribute.
+** If a reporter configures the `group="cluster"` attribute then please also configure the `class="org.apache.solr.metrics.reporters.solr.SolrClusterReporter"` attribute.
++
+See the section <<metrics-reporting.adoc#shard-and-cluster-reporters,Shard and Cluster Reporters>> for more information.
+
+* All Stream Evaluators in `solrj.io.eval` have been refactored to have a simpler and more robust structure. This simplifies and condenses the code required to implement a new Evaluator and makes it much easier for evaluators to handle differing data types (primitives, objects, arrays, lists, and so forth).
+* In the ReplicationHandler, the `master.commitReserveDuration` sub-element is deprecated. Instead please configure a direct `commitReserveDuration` element for use in all modes (master, slave, cloud).
+* The `RunExecutableListener` was removed for security reasons. If you want to listen to events caused by updates, commits, or optimize, write your own listener as native Java class as part of a Solr plugin.
+* In the XML query parser (`defType=xmlparser` or `{!xmlparser ... }`) the resolving of external entities is now disallowed by default.
+
== Upgrading from Any 6.x Release
The upgrade from Solr 6.x to Solr 7 introduces several *major* changes that you should be aware of before upgrading. Please do a thorough review of the section <<major-changes-in-solr-7.adoc#major-changes-in-solr-7,Major Changes in Solr 7>> before starting your upgrade.
== Upgrading from Older Versions of Solr
-Users upgrading from older versions are strongly encouraged to consult {solr-javadocs}/changes/Changes.html[`CHANGES.txt`] for the details of _all_ changes since the version they are upgrading from.
+Users upgrading from versions of Solr prior to 6.x are strongly encouraged to consult {solr-javadocs}/changes/Changes.html[`CHANGES.txt`] for the details of _all_ changes since the version they are upgrading from.
A summary of the significant changes between Solr 5.x and Solr 6.0 can be found in the <<major-changes-from-solr-5-to-solr-6.adoc#major-changes-from-solr-5-to-solr-6,Major Changes from Solr 5 to Solr 6>> section.
[44/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11380: SolrJ
must stream docs to server instead of writing to a buffer first
Posted by ab...@apache.org.
SOLR-11380: SolrJ must stream docs to server instead of writing to a buffer first
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/706b6c91
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/706b6c91
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/706b6c91
Branch: refs/heads/jira/solr-11285-sim
Commit: 706b6c91718a1d5e4e7fd8d677798bb7ee3cb2ad
Parents: 52b4625
Author: Noble Paul <no...@apache.org>
Authored: Tue Oct 31 13:16:31 2017 +1030
Committer: Noble Paul <no...@apache.org>
Committed: Tue Oct 31 13:16:31 2017 +1030
----------------------------------------------------------------------
solr/CHANGES.txt | 2 +
.../handler/BinaryUpdateRequestHandlerTest.java | 11 +-
.../client/solrj/impl/BinaryRequestWriter.java | 81 +++-----
.../solr/client/solrj/impl/HttpSolrClient.java | 206 +++++++++++--------
.../client/solrj/request/RequestWriter.java | 38 +++-
5 files changed, 192 insertions(+), 146 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/706b6c91/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 4c2c149..c5df7fd 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -118,6 +118,8 @@ Other Changes
* SOLR-11562: Restore Solr logo ASCII-art in startup log by removing unnecessary default confdir logging (janhoy)
+* SOLR-11380: SolrJ must stream docs to server instead of writing to a buffer first (noble)
+
================== 7.1.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/706b6c91/solr/core/src/test/org/apache/solr/handler/BinaryUpdateRequestHandlerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/BinaryUpdateRequestHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/BinaryUpdateRequestHandlerTest.java
index dfece60..0c02109 100644
--- a/solr/core/src/test/org/apache/solr/handler/BinaryUpdateRequestHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/BinaryUpdateRequestHandlerTest.java
@@ -16,11 +16,15 @@
*/
package org.apache.solr.handler;
+import java.io.ByteArrayOutputStream;
+
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.client.solrj.impl.BinaryRequestWriter;
+import org.apache.solr.client.solrj.request.RequestWriter;
import org.apache.solr.client.solrj.request.UpdateRequest;
import org.apache.solr.common.SolrInputDocument;
import org.apache.solr.common.params.UpdateParams;
+import org.apache.solr.common.util.ContentStreamBase;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.handler.loader.ContentStreamLoader;
import org.apache.solr.request.SolrQueryRequest;
@@ -54,8 +58,11 @@ public class BinaryUpdateRequestHandlerTest extends SolrTestCaseJ4 {
SolrQueryRequest req = req();
ContentStreamLoader csl = handler.newLoader(req, p);
- csl.load(req, rsp, brw.getContentStream(ureq), p);
-
+ RequestWriter.ContentWriter cw = brw.getContentWriter(ureq);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ cw.write(baos);
+ ContentStreamBase.ByteArrayStream cs = new ContentStreamBase.ByteArrayStream(baos.toByteArray(), null, "application/javabin");
+ csl.load(req, rsp, cs, p);
AddUpdateCommand add = p.addCommands.get(0);
System.out.println(add.solrDoc);
assertEquals(false, add.overwrite);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/706b6c91/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java
index 310c282..1f32e07 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java
@@ -16,17 +16,17 @@
*/
package org.apache.solr.client.solrj.impl;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Collection;
+
import org.apache.solr.client.solrj.SolrRequest;
import org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec;
import org.apache.solr.client.solrj.request.RequestWriter;
import org.apache.solr.client.solrj.request.UpdateRequest;
import org.apache.solr.common.util.ContentStream;
-import java.io.*;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
/**
* A RequestWriter which writes requests in the javabin format
*
@@ -37,6 +37,32 @@ import java.util.List;
public class BinaryRequestWriter extends RequestWriter {
@Override
+ public ContentWriter getContentWriter(SolrRequest req) {
+ if (req instanceof UpdateRequest) {
+ UpdateRequest updateRequest = (UpdateRequest) req;
+ if (isNull(updateRequest.getDocuments()) &&
+ isNull(updateRequest.getDeleteByIdMap()) &&
+ isNull(updateRequest.getDeleteQuery())
+ && (updateRequest.getDocIterator() == null)) {
+ return null;
+ }
+ return new ContentWriter() {
+ @Override
+ public void write(OutputStream os) throws IOException {
+ new JavaBinUpdateRequestCodec().marshal(updateRequest, os);
+ }
+
+ @Override
+ public String getContentType() {
+ return "application/javabin";
+ }
+ };
+ } else {
+ return super.getContentWriter(req);
+ }
+ }
+
+ @Override
public Collection<ContentStream> getContentStreams(SolrRequest req) throws IOException {
if (req instanceof UpdateRequest) {
UpdateRequest updateRequest = (UpdateRequest) req;
@@ -46,13 +72,10 @@ public class BinaryRequestWriter extends RequestWriter {
&& (updateRequest.getDocIterator() == null) ) {
return null;
}
- List<ContentStream> l = new ArrayList<>();
- l.add(new LazyContentStream(updateRequest));
- return l;
+ throw new RuntimeException("This Should not happen");
} else {
return super.getContentStreams(req);
}
-
}
@@ -62,46 +85,6 @@ public class BinaryRequestWriter extends RequestWriter {
}
@Override
- public ContentStream getContentStream(final UpdateRequest request) throws IOException {
- final BAOS baos = new BAOS();
- new JavaBinUpdateRequestCodec().marshal(request, baos);
-
- return new ContentStream() {
- @Override
- public String getName() {
- return null;
- }
-
- @Override
- public String getSourceInfo() {
- return "javabin";
- }
-
- @Override
- public String getContentType() {
- return "application/javabin";
- }
-
- @Override
- public Long getSize() // size if we know it, otherwise null
- {
- return new Long(baos.size());
- }
-
- @Override
- public InputStream getStream() {
- return new ByteArrayInputStream(baos.getbuf(), 0, baos.size());
- }
-
- @Override
- public Reader getReader() {
- throw new RuntimeException("No reader available . this is a binarystream");
- }
- };
- }
-
-
- @Override
public void write(SolrRequest request, OutputStream os) throws IOException {
if (request instanceof UpdateRequest) {
UpdateRequest updateRequest = (UpdateRequest) request;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/706b6c91/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java
index bf849fc..c292534 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrClient.java
@@ -18,6 +18,7 @@ package org.apache.solr.client.solrj.impl;
import java.io.IOException;
import java.io.InputStream;
+import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.lang.invoke.MethodHandles;
import java.net.ConnectException;
@@ -52,6 +53,7 @@ import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.conn.HttpClientConnectionManager;
+import org.apache.http.entity.BasicHttpEntity;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.InputStreamEntity;
import org.apache.http.entity.mime.FormBodyPart;
@@ -327,7 +329,8 @@ public class HttpSolrClient extends SolrClient {
request = ((V2RequestSupport) request).getV2Request();
}
SolrParams params = request.getParams();
- Collection<ContentStream> streams = requestWriter.getContentStreams(request);
+ RequestWriter.ContentWriter contentWriter = requestWriter.getContentWriter(request);
+ Collection<ContentStream> streams = contentWriter == null ? requestWriter.getContentStreams(request) : null;
String path = requestWriter.getPath(request);
if (path == null || !path.startsWith("/")) {
path = DEFAULT_PATH;
@@ -362,7 +365,7 @@ public class HttpSolrClient extends SolrClient {
}
if (SolrRequest.METHOD.GET == request.getMethod()) {
- if (streams != null) {
+ if (streams != null || contentWriter != null) {
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "GET can't send streams!");
}
@@ -389,65 +392,32 @@ public class HttpSolrClient extends SolrClient {
|| (streams != null && streams.size() > 1)) && !hasNullStreamName;
LinkedList<NameValuePair> postOrPutParams = new LinkedList<>();
- if (streams == null || isMultipart) {
- // send server list and request list as query string params
- ModifiableSolrParams queryParams = calculateQueryParams(this.queryParams, wparams);
- queryParams.add(calculateQueryParams(request.getQueryParams(), wparams));
- String fullQueryUrl = url + queryParams.toQueryString();
+
+ if(contentWriter != null) {
+ String fullQueryUrl = url + wparams.toQueryString();
HttpEntityEnclosingRequestBase postOrPut = SolrRequest.METHOD.POST == request.getMethod() ?
new HttpPost(fullQueryUrl) : new HttpPut(fullQueryUrl);
-
- if (!isMultipart) {
- postOrPut.addHeader("Content-Type",
- "application/x-www-form-urlencoded; charset=UTF-8");
- }
-
- List<FormBodyPart> parts = new LinkedList<>();
- Iterator<String> iter = wparams.getParameterNamesIterator();
- while (iter.hasNext()) {
- String p = iter.next();
- String[] vals = wparams.getParams(p);
- if (vals != null) {
- for (String v : vals) {
- if (isMultipart) {
- parts.add(new FormBodyPart(p, new StringBody(v, StandardCharsets.UTF_8)));
- } else {
- postOrPutParams.add(new BasicNameValuePair(p, v));
- }
- }
- }
- }
-
- // TODO: remove deprecated - first simple attempt failed, see {@link MultipartEntityBuilder}
- if (isMultipart && streams != null) {
- for (ContentStream content : streams) {
- String contentType = content.getContentType();
- if (contentType == null) {
- contentType = BinaryResponseParser.BINARY_CONTENT_TYPE; // default
- }
- String name = content.getName();
- if (name == null) {
- name = "";
- }
- parts.add(new FormBodyPart(name,
- new InputStreamBody(
- content.getStream(),
- ContentType.parse(contentType),
- content.getName())));
+ postOrPut.addHeader("Content-Type",
+ contentWriter.getContentType());
+ postOrPut.setEntity(new BasicHttpEntity(){
+ @Override
+ public boolean isStreaming() {
+ return true;
}
- }
- if (parts.size() > 0) {
- MultipartEntity entity = new MultipartEntity(HttpMultipartMode.STRICT);
- for (FormBodyPart p : parts) {
- entity.addPart(p);
+ @Override
+ public void writeTo(OutputStream outstream) throws IOException {
+ contentWriter.write(outstream);
}
- postOrPut.setEntity(entity);
- } else {
- //not using multipart
- postOrPut.setEntity(new UrlEncodedFormEntity(postOrPutParams, StandardCharsets.UTF_8));
- }
+ });
+ return postOrPut;
+ } else if (streams == null || isMultipart) {
+ // send server list and request list as query string params
+ ModifiableSolrParams queryParams = calculateQueryParams(this.queryParams, wparams);
+ queryParams.add(calculateQueryParams(request.getQueryParams(), wparams));
+ String fullQueryUrl = url + queryParams.toQueryString();
+ HttpEntityEnclosingRequestBase postOrPut = fillContentStream(request, streams, wparams, isMultipart, postOrPutParams, fullQueryUrl);
return postOrPut;
}
// It is has one stream, it is the post body, put the params in the URL
@@ -455,49 +425,111 @@ public class HttpSolrClient extends SolrClient {
String fullQueryUrl = url + wparams.toQueryString();
HttpEntityEnclosingRequestBase postOrPut = SolrRequest.METHOD.POST == request.getMethod() ?
new HttpPost(fullQueryUrl) : new HttpPut(fullQueryUrl);
+ fillSingleContentStream(streams, postOrPut);
- // Single stream as body
- // Using a loop just to get the first one
- final ContentStream[] contentStream = new ContentStream[1];
- for (ContentStream content : streams) {
- contentStream[0] = content;
- break;
+ return postOrPut;
+ }
+ }
+
+ throw new SolrServerException("Unsupported method: " + request.getMethod());
+
+ }
+
+ private void fillSingleContentStream(Collection<ContentStream> streams, HttpEntityEnclosingRequestBase postOrPut) throws IOException {
+ // Single stream as body
+ // Using a loop just to get the first one
+ final ContentStream[] contentStream = new ContentStream[1];
+ for (ContentStream content : streams) {
+ contentStream[0] = content;
+ break;
+ }
+ if (contentStream[0] instanceof RequestWriter.LazyContentStream) {
+ Long size = contentStream[0].getSize();
+ postOrPut.setEntity(new InputStreamEntity(contentStream[0].getStream(), size == null ? -1 : size) {
+ @Override
+ public Header getContentType() {
+ return new BasicHeader("Content-Type", contentStream[0].getContentType());
}
- if (contentStream[0] instanceof RequestWriter.LazyContentStream) {
- Long size = contentStream[0].getSize();
- postOrPut.setEntity(new InputStreamEntity(contentStream[0].getStream(), size == null ? -1 : size) {
- @Override
- public Header getContentType() {
- return new BasicHeader("Content-Type", contentStream[0].getContentType());
- }
- @Override
- public boolean isRepeatable() {
- return false;
- }
+ @Override
+ public boolean isRepeatable() {
+ return false;
+ }
- });
- } else {
- Long size = contentStream[0].getSize();
- postOrPut.setEntity(new InputStreamEntity(contentStream[0].getStream(), size == null ? -1 : size) {
- @Override
- public Header getContentType() {
- return new BasicHeader("Content-Type", contentStream[0].getContentType());
- }
+ });
+ } else {
+ Long size = contentStream[0].getSize();
+ postOrPut.setEntity(new InputStreamEntity(contentStream[0].getStream(), size == null ? -1 : size) {
+ @Override
+ public Header getContentType() {
+ return new BasicHeader("Content-Type", contentStream[0].getContentType());
+ }
- @Override
- public boolean isRepeatable() {
- return false;
- }
- });
+ @Override
+ public boolean isRepeatable() {
+ return false;
+ }
+ });
+ }
+ }
+
+ private HttpEntityEnclosingRequestBase fillContentStream(SolrRequest request, Collection<ContentStream> streams, ModifiableSolrParams wparams, boolean isMultipart, LinkedList<NameValuePair> postOrPutParams, String fullQueryUrl) throws IOException {
+ HttpEntityEnclosingRequestBase postOrPut = SolrRequest.METHOD.POST == request.getMethod() ?
+ new HttpPost(fullQueryUrl) : new HttpPut(fullQueryUrl);
+
+ if (!isMultipart) {
+ postOrPut.addHeader("Content-Type",
+ "application/x-www-form-urlencoded; charset=UTF-8");
+ }
+
+ List<FormBodyPart> parts = new LinkedList<>();
+ Iterator<String> iter = wparams.getParameterNamesIterator();
+ while (iter.hasNext()) {
+ String p = iter.next();
+ String[] vals = wparams.getParams(p);
+ if (vals != null) {
+ for (String v : vals) {
+ if (isMultipart) {
+ parts.add(new FormBodyPart(p, new StringBody(v, StandardCharsets.UTF_8)));
+ } else {
+ postOrPutParams.add(new BasicNameValuePair(p, v));
+ }
}
- return postOrPut;
}
}
- throw new SolrServerException("Unsupported method: " + request.getMethod());
+ // TODO: remove deprecated - first simple attempt failed, see {@link MultipartEntityBuilder}
+ if (isMultipart && streams != null) {
+ for (ContentStream content : streams) {
+ String contentType = content.getContentType();
+ if (contentType == null) {
+ contentType = BinaryResponseParser.BINARY_CONTENT_TYPE; // default
+ }
+ String name = content.getName();
+ if (name == null) {
+ name = "";
+ }
+ parts.add(new FormBodyPart(name,
+ new InputStreamBody(
+ content.getStream(),
+ ContentType.parse(contentType),
+ content.getName())));
+ }
+ }
+ if (parts.size() > 0) {
+ MultipartEntity entity = new MultipartEntity(HttpMultipartMode.STRICT);
+ for (FormBodyPart p : parts) {
+ entity.addPart(p);
+ }
+ postOrPut.setEntity(entity);
+ } else {
+ //not using multipart
+ postOrPut.setEntity(new UrlEncodedFormEntity(postOrPutParams, StandardCharsets.UTF_8));
+ }
+ return postOrPut;
}
+
private static final List<String> errPath = Arrays.asList("metadata", "error-class");//Utils.getObjectByPath(err, false,"metadata/error-class")
protected NamedList<Object> executeMethod(HttpRequestBase method, final ResponseParser processor, final boolean isV2Api) throws SolrServerException {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/706b6c91/solr/solrj/src/java/org/apache/solr/client/solrj/request/RequestWriter.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/RequestWriter.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/RequestWriter.java
index 89c29d6..8cefa0b 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/RequestWriter.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/RequestWriter.java
@@ -16,18 +16,23 @@
*/
package org.apache.solr.client.solrj.request;
-import org.apache.solr.client.solrj.SolrRequest;
-import org.apache.solr.client.solrj.util.ClientUtils;
-import org.apache.solr.common.util.ContentStream;
-import org.apache.solr.common.util.ContentStreamBase;
-
-import java.io.*;
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.Reader;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
-import java.nio.charset.Charset;
-import java.nio.charset.StandardCharsets;
+
+import org.apache.solr.client.solrj.SolrRequest;
+import org.apache.solr.client.solrj.util.ClientUtils;
+import org.apache.solr.common.util.ContentStream;
+import org.apache.solr.common.util.ContentStreamBase;
/**
* A RequestWriter is used to write requests to Solr.
@@ -40,6 +45,23 @@ import java.nio.charset.StandardCharsets;
public class RequestWriter {
public static final Charset UTF_8 = StandardCharsets.UTF_8;
+
+ public interface ContentWriter {
+
+ void write(OutputStream os) throws IOException;
+
+ String getContentType();
+ }
+
+ /**
+ * Use this to do a push writing instead of pull. If this method returns null
+ * {@link org.apache.solr.client.solrj.request.RequestWriter#getContentStream(UpdateRequest)} is
+ * invoked to do a pull write.
+ */
+ public ContentWriter getContentWriter(SolrRequest req) {
+ return null;
+ }
+
public Collection<ContentStream> getContentStreams(SolrRequest req) throws IOException {
if (req instanceof UpdateRequest) {
UpdateRequest updateRequest = (UpdateRequest) req;
[02/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-9735: Fix
autoscaling.Commands.json structure
Posted by ab...@apache.org.
SOLR-9735: Fix autoscaling.Commands.json structure
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/b5d3d242
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b5d3d242
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b5d3d242
Branch: refs/heads/jira/solr-11285-sim
Commit: b5d3d242ef909cb80d6ccf2a187f06cbcb642bc8
Parents: 0ddb8a0
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Thu Oct 26 15:14:11 2017 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Thu Oct 26 15:14:11 2017 +0530
----------------------------------------------------------------------
.../resources/apispec/autoscaling.Commands.json | 43 ++++++++++----------
1 file changed, 21 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b5d3d242/solr/solrj/src/resources/apispec/autoscaling.Commands.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/autoscaling.Commands.json b/solr/solrj/src/resources/apispec/autoscaling.Commands.json
index 30ebc7a..d6e11b4 100644
--- a/solr/solrj/src/resources/apispec/autoscaling.Commands.json
+++ b/solr/solrj/src/resources/apispec/autoscaling.Commands.json
@@ -14,7 +14,7 @@
},
"commands": {
"set-trigger": {
- "type":"object",
+ "type": "object",
"description": "The set-trigger command allows you to add and update triggers on various system metrics",
"properties": {
"name": {
@@ -49,11 +49,10 @@
}
}
},
- "required": [
- "name",
- "event"
- ]
- }
+ "required": [
+ "name",
+ "event"
+ ]
},
"remove-trigger": {
"description": "Remove a trigger",
@@ -88,21 +87,21 @@
"type": "array",
"description": "The stage of the trigger for which to listen",
"items": {
- "type" : "string"
+ "type": "string"
}
},
"beforeAction": {
"type": "array",
"description": "The name of the action before which the listener should be notified",
"items": {
- "type" : "string"
+ "type": "string"
}
},
"afterAction": {
"type": "array",
"description": "The name of the action after which the listener should be notified",
"items": {
- "type" : "string"
+ "type": "string"
}
},
"class": {
@@ -160,23 +159,23 @@
"name"
]
},
- "set-policy" : {
- "type":"object",
+ "set-policy": {
+ "type": "object",
"description": "The set-policy command allows you to add and update policies that apply to collections",
- /* "patternProperties": {
- "^.+$": {
- "type": "array"
- }
- },*/
+ /* "patternProperties": {
+ "^.+$": {
+ "type": "array"
+ }
+ },*/
"additionalProperties": true
},
- "set-cluster-policy" : {
- "type" : "array",
- "description" : "The set-cluster-policy command allows you to add and update cluster-level policy that acts as the base for all collection level policies, if any"
+ "set-cluster-policy": {
+ "type": "array",
+ "description": "The set-cluster-policy command allows you to add and update cluster-level policy that acts as the base for all collection level policies, if any"
},
- "set-cluster-preferences" : {
- "type" : "array",
- "description" : "The set-cluster-preferences command allows you to add and update cluster-level preferences that are used to sort nodes for selection in cluster operations"
+ "set-cluster-preferences": {
+ "type": "array",
+ "description": "The set-cluster-preferences command allows you to add and update cluster-level preferences that are used to sort nodes for selection in cluster operations"
},
"remove-policy": {
"description": "Remove a policy",
[40/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11565: Add unit
Stream Evaluator to support unitizing of vectors
Posted by ab...@apache.org.
SOLR-11565: Add unit Stream Evaluator to support unitizing of vectors
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/3edb2347
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/3edb2347
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/3edb2347
Branch: refs/heads/jira/solr-11285-sim
Commit: 3edb23471b4801d34b0b9a675606115b4f28463b
Parents: 489ca23
Author: Joel Bernstein <jb...@apache.org>
Authored: Mon Oct 30 20:02:23 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Mon Oct 30 20:17:22 2017 -0400
----------------------------------------------------------------------
.../org/apache/solr/handler/StreamHandler.java | 1 +
.../client/solrj/io/eval/UnitEvaluator.java | 77 ++++++++++++++++++++
.../solrj/io/stream/StreamExpressionTest.java | 34 +++++++++
3 files changed, 112 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3edb2347/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/StreamHandler.java b/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
index 21a17bc..4a5ef33 100644
--- a/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
@@ -270,6 +270,7 @@ public class StreamHandler extends RequestHandlerBase implements SolrCoreAware,
.withFunctionName("loess", LoessEvaluator.class)
.withFunctionName("matrix", MatrixEvaluator.class)
.withFunctionName("transpose", TransposeEvaluator.class)
+ .withFunctionName("unit", UnitEvaluator.class)
// Boolean Stream Evaluators
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3edb2347/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/UnitEvaluator.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/UnitEvaluator.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/UnitEvaluator.java
new file mode 100644
index 0000000..8be990d
--- /dev/null
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/UnitEvaluator.java
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ */
+package org.apache.solr.client.solrj.io.eval;
+
+import java.io.IOException;
+
+import java.util.Locale;
+
+import org.apache.commons.math3.linear.RealVector;
+import org.apache.commons.math3.linear.ArrayRealVector;
+import org.apache.solr.client.solrj.io.stream.expr.StreamExpression;
+import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
+import java.util.List;
+import java.util.ArrayList;
+
+public class UnitEvaluator extends RecursiveObjectEvaluator implements OneValueWorker {
+ protected static final long serialVersionUID = 1L;
+
+ public UnitEvaluator(StreamExpression expression, StreamFactory factory) throws IOException{
+ super(expression, factory);
+
+ if(1 != containedEvaluators.size()){
+ throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - expecting exactly 1 value but found %d",expression,containedEvaluators.size()));
+ }
+ }
+
+ @Override
+ public Object doWork(Object value) throws IOException{
+ if(null == value){
+ return null;
+ } else if(value instanceof Matrix) {
+ Matrix matrix = (Matrix) value;
+ double[][] data = matrix.getData();
+ double[][] unitData = new double[data.length][];
+ for(int i=0; i<data.length; i++) {
+ double[] row = data[i];
+ ArrayRealVector vector = new ArrayRealVector(row);
+ double[] unitRow = vector.unitVector().toArray();
+ unitData[i] = unitRow;
+ }
+
+ return new Matrix(unitData);
+ } else if(value instanceof List) {
+ List<Number> values = (List<Number>)value;
+ double[] doubles = new double[values.size()];
+ for(int i=0; i<doubles.length; i++) {
+ doubles[i] = values.get(i).doubleValue();
+ }
+
+ ArrayRealVector vector = new ArrayRealVector(doubles);
+ RealVector unitVector = vector.unitVector();
+ List<Number> unitList = new ArrayList(doubles.length);
+ double[] unitArray = unitVector.toArray();
+ for(double d : unitArray) {
+ unitList.add(d);
+ }
+
+ return unitList;
+ } else {
+ throw new IOException("The unit function expects either a numeric array or matrix as a parameter");
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3edb2347/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 cbf96f5..8196cf5 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
@@ -6096,6 +6096,40 @@ public class StreamExpressionTest extends SolrCloudTestCase {
assertEquals(array3.get(1).doubleValue(), 6.0, 0.0);
}
+ @Test
+ public void testUnit() throws Exception {
+ String cexpr = "let(echo=true, a=unit(matrix(array(1,2,3), array(4,5,6))), b=unit(array(4,5,6)))";
+ ModifiableSolrParams paramsLoc = new ModifiableSolrParams();
+ paramsLoc.set("expr", cexpr);
+ paramsLoc.set("qt", "/stream");
+ String url = cluster.getJettySolrRunners().get(0).getBaseUrl().toString()+"/"+COLLECTIONORALIAS;
+ TupleStream solrStream = new SolrStream(url, paramsLoc);
+ StreamContext context = new StreamContext();
+ solrStream.setStreamContext(context);
+ List<Tuple> tuples = getTuples(solrStream);
+ assertTrue(tuples.size() == 1);
+ List<List<Number>> out = (List<List<Number>>)tuples.get(0).get("a");
+ assertEquals(out.size(), 2);
+ List<Number> array1 = out.get(0);
+ assertEquals(array1.size(), 3);
+ assertEquals(array1.get(0).doubleValue(), 0.2672612419124244, 0.0);
+ assertEquals(array1.get(1).doubleValue(), 0.5345224838248488, 0.0);
+ assertEquals(array1.get(2).doubleValue(), 0.8017837257372732, 0.0);
+
+ List<Number> array2 = out.get(1);
+ assertEquals(array2.size(), 3);
+ assertEquals(array2.get(0).doubleValue(), 0.4558423058385518, 0.0);
+ assertEquals(array2.get(1).doubleValue(), 0.5698028822981898, 0.0);
+ assertEquals(array2.get(2).doubleValue(), 0.6837634587578276, 0.0);
+
+ List<Number> array3 = (List<Number>)tuples.get(0).get("b");
+ assertEquals(array3.size(), 3);
+ assertEquals(array2.get(0).doubleValue(), 0.4558423058385518, 0.0);
+ assertEquals(array2.get(1).doubleValue(), 0.5698028822981898, 0.0);
+ assertEquals(array2.get(2).doubleValue(), 0.6837634587578276, 0.0);
+ }
+
+
@Test
public void testAddAll() throws Exception {
[36/50] [abbrv] lucene-solr:jira/solr-11285-sim: SEARCH-11566: Add
transpose Stream Evaluator to support transposing of matrices
Posted by ab...@apache.org.
SEARCH-11566: Add transpose Stream Evaluator to support transposing of matrices
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/b7332f65
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b7332f65
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b7332f65
Branch: refs/heads/jira/solr-11285-sim
Commit: b7332f65b785ab3007d4c2c482f8e9f11077e9df
Parents: 84fa17d
Author: Joel Bernstein <jb...@apache.org>
Authored: Mon Oct 30 12:57:33 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Mon Oct 30 12:59:13 2017 -0400
----------------------------------------------------------------------
.../org/apache/solr/handler/StreamHandler.java | 1 +
.../solrj/io/eval/FieldValueEvaluator.java | 2 +
.../solr/client/solrj/io/eval/Matrix.java | 4 ++
.../solrj/io/eval/TransposeEvaluator.java | 52 ++++++++++++++++++++
.../solrj/io/stream/StreamExpressionTest.java | 32 ++++++++++++
5 files changed, 91 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7332f65/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/StreamHandler.java b/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
index 046a7f5..21a17bc 100644
--- a/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
@@ -269,6 +269,7 @@ public class StreamHandler extends RequestHandlerBase implements SolrCoreAware,
.withFunctionName("harmonicFit", HarmonicFitEvaluator.class)
.withFunctionName("loess", LoessEvaluator.class)
.withFunctionName("matrix", MatrixEvaluator.class)
+ .withFunctionName("transpose", TransposeEvaluator.class)
// Boolean Stream Evaluators
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7332f65/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/FieldValueEvaluator.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/FieldValueEvaluator.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/FieldValueEvaluator.java
index 81943bf..066fcc9 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/FieldValueEvaluator.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/FieldValueEvaluator.java
@@ -70,6 +70,8 @@ public class FieldValueEvaluator extends SourceEvaluator {
list.add(obj);
}
return list;
+ } else if(value instanceof Matrix) {
+ return value;
}
else if(value instanceof Iterable && !(value instanceof List<?>)){
Iterable<?> iter = (Iterable<?>)value;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7332f65/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/Matrix.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/Matrix.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/Matrix.java
index abde021..cba6c1f 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/Matrix.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/Matrix.java
@@ -29,6 +29,10 @@ public class Matrix implements Iterable {
this.data = data;
}
+ public double[][] getData() {
+ return this.data;
+ }
+
public Iterator iterator() {
return new MatrixIterator(data);
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7332f65/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/TransposeEvaluator.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/TransposeEvaluator.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/TransposeEvaluator.java
new file mode 100644
index 0000000..b206cc5
--- /dev/null
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/TransposeEvaluator.java
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+package org.apache.solr.client.solrj.io.eval;
+
+import java.io.IOException;
+
+import java.util.Locale;
+
+import org.apache.commons.math3.linear.Array2DRowRealMatrix;
+import org.apache.solr.client.solrj.io.stream.expr.StreamExpression;
+import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
+
+public class TransposeEvaluator extends RecursiveObjectEvaluator implements OneValueWorker {
+ protected static final long serialVersionUID = 1L;
+
+ public TransposeEvaluator(StreamExpression expression, StreamFactory factory) throws IOException{
+ super(expression, factory);
+
+ if(1 != containedEvaluators.size()){
+ throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - expecting exactly 1 value but found %d",expression,containedEvaluators.size()));
+ }
+ }
+
+ @Override
+ public Object doWork(Object value) throws IOException{
+ if(null == value){
+ return null;
+ } else if(value instanceof Matrix) {
+ Matrix matrix = (Matrix) value;
+ double[][] data = matrix.getData();
+ Array2DRowRealMatrix amatrix = new Array2DRowRealMatrix(data);
+ Array2DRowRealMatrix tmatrix = (Array2DRowRealMatrix)amatrix.transpose();
+ return new Matrix(tmatrix.getData());
+ } else {
+ throw new IOException("matrix parameter expected for transpose function");
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b7332f65/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 a035f3e..cbf96f5 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
@@ -6065,6 +6065,38 @@ public class StreamExpressionTest extends SolrCloudTestCase {
assertEquals(array2.get(2).doubleValue(), 4.0, 0.0);
}
+
+ @Test
+ public void testTranspose() throws Exception {
+ String cexpr = "let(a=matrix(array(1,2,3), array(4,5,6)), b=transpose(a))";
+ ModifiableSolrParams paramsLoc = new ModifiableSolrParams();
+ paramsLoc.set("expr", cexpr);
+ paramsLoc.set("qt", "/stream");
+ String url = cluster.getJettySolrRunners().get(0).getBaseUrl().toString()+"/"+COLLECTIONORALIAS;
+ TupleStream solrStream = new SolrStream(url, paramsLoc);
+ StreamContext context = new StreamContext();
+ solrStream.setStreamContext(context);
+ List<Tuple> tuples = getTuples(solrStream);
+ assertTrue(tuples.size() == 1);
+ List<List<Number>> out = (List<List<Number>>)tuples.get(0).get("b");
+ assertEquals(out.size(), 3);
+ List<Number> array1 = out.get(0);
+ assertEquals(array1.size(), 2);
+ assertEquals(array1.get(0).doubleValue(), 1.0, 0.0);
+ assertEquals(array1.get(1).doubleValue(), 4.0, 0.0);
+
+ List<Number> array2 = out.get(1);
+ assertEquals(array2.size(), 2);
+ assertEquals(array2.get(0).doubleValue(), 2.0, 0.0);
+ assertEquals(array2.get(1).doubleValue(), 5.0, 0.0);
+
+ List<Number> array3 = out.get(2);
+ assertEquals(array3.size(), 2);
+ assertEquals(array3.get(0).doubleValue(), 3.0, 0.0);
+ assertEquals(array3.get(1).doubleValue(), 6.0, 0.0);
+ }
+
+
@Test
public void testAddAll() throws Exception {
String cexpr = "addAll(array(1, 2, 3), array(4.5, 5.5, 6.5), array(7,8,9))";
[28/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11562: Restore
Solr ASCII-art in log at startup by removing Default config logging
Posted by ab...@apache.org.
SOLR-11562: Restore Solr ASCII-art in log at startup by removing Default config logging
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/b44497fd
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b44497fd
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b44497fd
Branch: refs/heads/jira/solr-11285-sim
Commit: b44497fdb721fb67c3c8f20dd0a781f6beaaa8a6
Parents: f1a6b68
Author: Jan Høydahl <ja...@apache.org>
Authored: Sat Oct 28 21:39:23 2017 +0200
Committer: Jan Høydahl <ja...@apache.org>
Committed: Sat Oct 28 21:39:23 2017 +0200
----------------------------------------------------------------------
solr/CHANGES.txt | 2 ++
solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b44497fd/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index a5e48ac..b292625 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -111,6 +111,8 @@ Other Changes
* SOLR-11165: Ref guide documentation for Autoscaling APIs, triggers, listeners, actions for Solr 7.1
(ab, Cassandra Targett, Noble Paul, shalin)
+* SOLR-11562: Restore Solr logo ASCII-art in startup log by removing unnecessary default confdir logging (janhoy)
+
================== 7.1.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/b44497fd/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
index 17c3b56..8f8bda8 100644
--- a/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
+++ b/solr/core/src/java/org/apache/solr/servlet/SolrDispatchFilter.java
@@ -229,7 +229,7 @@ public class SolrDispatchFilter extends BaseSolrFilter {
private void logWelcomeBanner() {
log.info(" ___ _ Welcome to Apache Solr™ version {}", solrVersion());
log.info("/ __| ___| |_ _ Starting in {} mode on port {}", isCloudMode() ? "cloud" : "standalone", getSolrPort());
- log.info("\\__ \\/ _ \\ | '_| Install dir: {}, Default config dir: {}", System.getProperty(SOLR_INSTALL_DIR_ATTRIBUTE), System.getProperty(SOLR_DEFAULT_CONFDIR_ATTRIBUTE));
+ log.info("\\__ \\/ _ \\ | '_| Install dir: {}", System.getProperty(SOLR_INSTALL_DIR_ATTRIBUTE));
log.info("|___/\\___/_|_| Start time: {}", Instant.now().toString());
}
[10/50] [abbrv] lucene-solr:jira/solr-11285-sim: Ref Guide: copy edit
new autoscaling pages;
fixes in lots of other pages for "eg" and "ie" misspellings
Posted by ab...@apache.org.
Ref Guide: copy edit new autoscaling pages; fixes in lots of other pages for "eg" and "ie" misspellings
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/79baebb8
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/79baebb8
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/79baebb8
Branch: refs/heads/jira/solr-11285-sim
Commit: 79baebb8b9c0632172119487eb730b1f9a841d0e
Parents: 3be50df
Author: Cassandra Targett <ct...@apache.org>
Authored: Thu Oct 26 13:47:12 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Thu Oct 26 13:48:39 2017 -0500
----------------------------------------------------------------------
solr/solr-ref-guide/src/about-this-guide.adoc | 2 +-
solr/solr-ref-guide/src/about-tokenizers.adoc | 2 +-
solr/solr-ref-guide/src/collections-api.adoc | 2 +-
.../src/command-line-utilities.adoc | 2 +-
solr/solr-ref-guide/src/config-api.adoc | 6 +-
.../solr-ref-guide/src/configuring-logging.adoc | 2 +-
solr/solr-ref-guide/src/copying-fields.adoc | 2 +-
solr/solr-ref-guide/src/coreadmin-api.adoc | 4 +-
solr/solr-ref-guide/src/docvalues.adoc | 2 +-
solr/solr-ref-guide/src/enabling-ssl.adoc | 4 +-
.../solr-ref-guide/src/filter-descriptions.adoc | 4 +-
.../src/getting-started-with-solrcloud.adoc | 2 +-
solr/solr-ref-guide/src/highlighting.adoc | 6 +-
solr/solr-ref-guide/src/index-replication.adoc | 2 +-
solr/solr-ref-guide/src/language-analysis.adoc | 2 +-
solr/solr-ref-guide/src/learning-to-rank.adoc | 6 +-
solr/solr-ref-guide/src/metrics-reporting.adoc | 6 +-
.../src/near-real-time-searching.adoc | 2 +-
solr/solr-ref-guide/src/schema-api.adoc | 8 +--
.../src/solr-control-script-reference.adoc | 2 +-
.../src/solrcloud-autoscaling-api.adoc | 31 ++++----
...solrcloud-autoscaling-auto-add-replicas.adoc | 35 +++++----
.../solrcloud-autoscaling-fault-tolerance.adoc | 31 ++++----
.../src/solrcloud-autoscaling-listeners.adoc | 76 +++++++++-----------
.../src/solrcloud-autoscaling-overview.adoc | 43 +++++------
...olrcloud-autoscaling-policy-preferences.adoc | 10 +--
.../solrcloud-autoscaling-trigger-actions.adoc | 12 ++--
.../src/solrcloud-autoscaling-triggers.adoc | 66 +++++++++--------
.../src/solrcloud-autoscaling.adoc | 16 ++---
solr/solr-ref-guide/src/spatial-search.adoc | 10 +--
.../src/stream-decorator-reference.adoc | 2 +-
.../src/the-extended-dismax-query-parser.adoc | 2 +-
solr/solr-ref-guide/src/using-solrj.adoc | 4 +-
...king-with-currencies-and-exchange-rates.adoc | 2 +-
solr/solr-ref-guide/src/working-with-dates.adoc | 2 +-
...rking-with-external-files-and-processes.adoc | 2 +-
.../src/zookeeper-access-control.adoc | 8 +--
37 files changed, 208 insertions(+), 212 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/about-this-guide.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/about-this-guide.adoc b/solr/solr-ref-guide/src/about-this-guide.adoc
index 27616ad..91d83d3 100644
--- a/solr/solr-ref-guide/src/about-this-guide.adoc
+++ b/solr/solr-ref-guide/src/about-this-guide.adoc
@@ -53,7 +53,7 @@ When running the various examples mentioned through out this tutorial (i.e., `bi
Special notes are included throughout these pages. There are several types of notes:
-=== Information blocks
+=== Information Blocks
NOTE: These provide additional information that's useful for you to know.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/about-tokenizers.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/about-tokenizers.adoc b/solr/solr-ref-guide/src/about-tokenizers.adoc
index 077edb6..c88fb62 100644
--- a/solr/solr-ref-guide/src/about-tokenizers.adoc
+++ b/solr/solr-ref-guide/src/about-tokenizers.adoc
@@ -37,7 +37,7 @@ A `TypeTokenFilterFactory` is available that creates a `TypeTokenFilter` that fi
For a complete list of the available TokenFilters, see the section <<tokenizers.adoc#tokenizers,Tokenizers>>.
-== When To use a CharFilter vs. a TokenFilter
+== When to Use a CharFilter vs. a TokenFilter
There are several pairs of CharFilters and TokenFilters that have related (i.e., `MappingCharFilter` and `ASCIIFoldingFilter`) or nearly identical (i.e., `PatternReplaceCharFilterFactory` and `PatternReplaceFilterFactory`) functionality and it may not always be obvious which is the best choice.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/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 2fc6849..1821d4d 100644
--- a/solr/solr-ref-guide/src/collections-api.adoc
+++ b/solr/solr-ref-guide/src/collections-api.adoc
@@ -1545,7 +1545,7 @@ The name of the collection the replica belongs to. This parameter is required.
The name of the shard the replica belongs to. This parameter is required.
`replica`::
-The replica, e.g. `core_node1`. This parameter is required.
+The replica, e.g., `core_node1`. This parameter is required.
`property`::
The property to add. This will have the literal `property.` prepended to distinguish it from system-maintained properties. So these two forms are equivalent:
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/command-line-utilities.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/command-line-utilities.adoc b/solr/solr-ref-guide/src/command-line-utilities.adoc
index 77fda96..0dee64b 100644
--- a/solr/solr-ref-guide/src/command-line-utilities.adoc
+++ b/solr/solr-ref-guide/src/command-line-utilities.adoc
@@ -113,7 +113,7 @@ If you are on Windows machine, simply replace `zkcli.sh` with `zkcli.bat` in the
.Bootstrap with chroot
[NOTE]
====
-Using the boostrap command with a zookeeper chroot in the `-zkhost` parameter, e.g. `-zkhost 127.0.0.1:2181/solr`, will automatically create the chroot path before uploading the configs.
+Using the boostrap command with a zookeeper chroot in the `-zkhost` parameter, e.g., `-zkhost 127.0.0.1:2181/solr`, will automatically create the chroot path before uploading the configs.
====
=== Put Arbitrary Data into a New ZooKeeper file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/config-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/config-api.adoc b/solr/solr-ref-guide/src/config-api.adoc
index a10b00f..3ad0985 100644
--- a/solr/solr-ref-guide/src/config-api.adoc
+++ b/solr/solr-ref-guide/src/config-api.adoc
@@ -39,14 +39,14 @@ All configuration items, can be retrieved by sending a GET request to the `/conf
curl http://localhost:8983/solr/techproducts/config
----
-To restrict the returned results to a top level section, e.g. `query`, `requestHandler` or `updateHandler`, append the name of the section to the `/config` endpoint following a slash. E.g. to retrieve configuration for all request handlers:
+To restrict the returned results to a top level section, e.g., `query`, `requestHandler` or `updateHandler`, append the name of the section to the `/config` endpoint following a slash. E.g. to retrieve configuration for all request handlers:
[source,bash]
----
curl http://localhost:8983/solr/techproducts/config/requestHandler
----
-To further restrict returned results to a single component within a top level section, use the `componentName` request param, e.g. to return configuration for the `/select` request handler:
+To further restrict returned results to a single component within a top level section, use the `componentName` request param, e.g., to return configuration for the `/select` request handler:
[source,bash]
----
@@ -509,7 +509,7 @@ Directly editing any files without 'touching' the directory *will not* make it v
It is possible for components to watch for the configset 'touch' events by registering a listener using `SolrCore#registerConfListener()`.
-=== Listening to config Changes
+=== Listening to Config Changes
Any component can register a listener using:
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/configuring-logging.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/configuring-logging.adoc b/solr/solr-ref-guide/src/configuring-logging.adoc
index fc77824..43bbb2b 100644
--- a/solr/solr-ref-guide/src/configuring-logging.adoc
+++ b/solr/solr-ref-guide/src/configuring-logging.adoc
@@ -58,7 +58,7 @@ Log levels settings are as follows:
Multiple settings at one time are allowed.
-=== Log level API
+=== Loglevel API
There is also a way of sending REST commands to the logging endpoint to do the same. Example:
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/copying-fields.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/copying-fields.adoc b/solr/solr-ref-guide/src/copying-fields.adoc
index dd34740..730230a 100644
--- a/solr/solr-ref-guide/src/copying-fields.adoc
+++ b/solr/solr-ref-guide/src/copying-fields.adoc
@@ -47,7 +47,7 @@ Both the source and the destination of `copyField` can contain either leading or
The `copyField` command can use a wildcard (*) character in the `dest` parameter only if the `source` parameter contains one as well. `copyField` uses the matching glob from the source field for the `dest` field name into which the source content is copied.
====
-Copying is done at the stream source level and no copy feeds into another copy. This means that copy fields cannot be chained i.e. _you cannot_ copy from `here` to `there` and then from `there` to `elsewhere`. However, the same source field can be copied to multiple destination fields:
+Copying is done at the stream source level and no copy feeds into another copy. This means that copy fields cannot be chained i.e., _you cannot_ copy from `here` to `there` and then from `there` to `elsewhere`. However, the same source field can be copied to multiple destination fields:
[source,xml]
----
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/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 6758701..0f5eeb1 100644
--- a/solr/solr-ref-guide/src/coreadmin-api.adoc
+++ b/solr/solr-ref-guide/src/coreadmin-api.adoc
@@ -290,14 +290,14 @@ The `core` index will be split into two pieces and written into the two director
[source,bash]
http://localhost:8983/solr/admin/cores?action=SPLIT&core=core0&targetCore=core1&split.key=A!
-Here all documents having the same route key as the `split.key` i.e. 'A!' will be split from the `core` index and written to the `targetCore`.
+Here all documents having the same route key as the `split.key` i.e., 'A!' will be split from the `core` index and written to the `targetCore`.
==== Usage with ranges parameter:
[source,bash]
http://localhost:8983/solr/admin/cores?action=SPLIT&core=core0&targetCore=core1&targetCore=core2&targetCore=core3&ranges=0-1f4,1f5-3e8,3e9-5dc
-This example uses the `ranges` parameter with hash ranges 0-500, 501-1000 and 1001-1500 specified in hexadecimal. Here the index will be split into three pieces with each targetCore receiving documents matching the hash ranges specified i.e. core1 will get documents with hash range 0-500, core2 will receive documents with hash range 501-1000 and finally, core3 will receive documents with hash range 1001-1500. At least one hash range must be specified. Please note that using a single hash range equal to a route key's hash range is NOT equivalent to using the `split.key` parameter because multiple route keys can hash to the same range.
+This example uses the `ranges` parameter with hash ranges 0-500, 501-1000 and 1001-1500 specified in hexadecimal. Here the index will be split into three pieces with each targetCore receiving documents matching the hash ranges specified i.e., core1 will get documents with hash range 0-500, core2 will receive documents with hash range 501-1000 and finally, core3 will receive documents with hash range 1001-1500. At least one hash range must be specified. Please note that using a single hash range equal to a route key's hash range is NOT equivalent to using the `split.key` parameter because multiple route keys can hash to the same range.
The `targetCore` must already exist and must have a compatible schema with the `core` index. A commit is automatically called on the `core` index before it is split.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/docvalues.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/docvalues.adoc b/solr/solr-ref-guide/src/docvalues.adoc
index a13ccf4..c8c65e6 100644
--- a/solr/solr-ref-guide/src/docvalues.adoc
+++ b/solr/solr-ref-guide/src/docvalues.adoc
@@ -79,7 +79,7 @@ If `docValues="true"` for a field, then DocValues will automatically be used any
=== Retrieving DocValues During Search
-Field values retrieved during search queries are typically returned from stored values. However, non-stored docValues fields will be also returned along with other stored fields when all fields (or pattern matching globs) are specified to be returned (e.g. "`fl=*`") for search queries depending on the effective value of the `useDocValuesAsStored` parameter for each field. For schema versions >= 1.6, the implicit default is `useDocValuesAsStored="true"`. See <<field-type-definitions-and-properties.adoc#field-type-definitions-and-properties,Field Type Definitions and Properties>> & <<defining-fields.adoc#defining-fields,Defining Fields>> for more details.
+Field values retrieved during search queries are typically returned from stored values. However, non-stored docValues fields will be also returned along with other stored fields when all fields (or pattern matching globs) are specified to be returned (e.g., "`fl=*`") for search queries depending on the effective value of the `useDocValuesAsStored` parameter for each field. For schema versions >= 1.6, the implicit default is `useDocValuesAsStored="true"`. See <<field-type-definitions-and-properties.adoc#field-type-definitions-and-properties,Field Type Definitions and Properties>> & <<defining-fields.adoc#defining-fields,Defining Fields>> for more details.
When `useDocValuesAsStored="false"`, non-stored DocValues fields can still be explicitly requested by name in the <<common-query-parameters.adoc#fl-field-list-parameter,fl param>>, but will not match glob patterns (`"*"`). Note that returning DocValues along with "regular" stored fields at query time has performance implications that stored fields may not because DocValues are column-oriented and may therefore incur additional cost to retrieve for each returned document. Also note that while returning non-stored fields from DocValues, the values of a multi-valued field are returned in sorted order (and not insertion order). If you require the multi-valued fields to be returned in the original insertion order, then make your multi-valued field as stored (such a change requires re-indexing).
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/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 3c1b9dc..dba8522 100644
--- a/solr/solr-ref-guide/src/enabling-ssl.adoc
+++ b/solr/solr-ref-guide/src/enabling-ssl.adoc
@@ -154,7 +154,7 @@ server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:2181 -cmd clusterprop -n
server\scripts\cloud-scripts\zkcli.bat -zkhost localhost:2181 -cmd clusterprop -name urlScheme -val https
----
-If you have set up your ZooKeeper cluster to use a <<taking-solr-to-production.adoc#zookeeper-chroot,chroot for Solr>>, make sure you use the correct `zkhost` string with `zkcli`, e.g. `-zkhost localhost:2181/solr`.
+If you have set up your ZooKeeper cluster to use a <<taking-solr-to-production.adoc#zookeeper-chroot,chroot for Solr>>, make sure you use the correct `zkhost` string with `zkcli`, e.g., `-zkhost localhost:2181/solr`.
=== Run SolrCloud with SSL
@@ -317,7 +317,7 @@ java -Djavax.net.ssl.keyStorePassword=secret -Djavax.net.ssl.keyStore=../../serv
=== Query Using curl
-Use curl to query the SolrCloud collection created above, from a directory containing the PEM formatted certificate and key created above (e.g. `example/etc/`) - if you have not enabled client authentication (system property `-Djetty.ssl.clientAuth=true)`, then you can remove the `-E solr-ssl.pem:secret` option:
+Use curl to query the SolrCloud collection created above, from a directory containing the PEM formatted certificate and key created above (e.g., `example/etc/`) - if you have not enabled client authentication (system property `-Djetty.ssl.clientAuth=true)`, then you can remove the `-E solr-ssl.pem:secret` option:
[source,bash]
----
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/filter-descriptions.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/filter-descriptions.adoc b/solr/solr-ref-guide/src/filter-descriptions.adoc
index 16aa5c2..751edea 100644
--- a/solr/solr-ref-guide/src/filter-descriptions.adoc
+++ b/solr/solr-ref-guide/src/filter-descriptions.adoc
@@ -345,7 +345,7 @@ This filter stems plural English words to their singular form.
== English Possessive Filter
-This filter removes singular possessives (trailing *'s*) from words. Note that plural possessives, e.g. the *s'* in "divers' snorkels", are not removed by this filter.
+This filter removes singular possessives (trailing *'s*) from words. Note that plural possessives, e.g., the *s'* in "divers' snorkels", are not removed by this filter.
*Factory class:* `solr.EnglishPossessiveFilterFactory`
@@ -1608,7 +1608,7 @@ This filter splits tokens at word delimiters.
.Word Delimiter Filter has been Deprecated
[WARNING]
====
-Word Delimiter Filter has been deprecated in favor of Word Delimiter Graph Filter, which is required to produce a correct token graph so that e.g. phrase queries can work correctly.
+Word Delimiter Filter has been deprecated in favor of Word Delimiter Graph Filter, which is required to produce a correct token graph so that e.g., phrase queries can work correctly.
====
*Factory class:* `solr.WordDelimiterFilterFactory`
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/getting-started-with-solrcloud.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/getting-started-with-solrcloud.adoc b/solr/solr-ref-guide/src/getting-started-with-solrcloud.adoc
index 30dd9b1..11e8350 100644
--- a/solr/solr-ref-guide/src/getting-started-with-solrcloud.adoc
+++ b/solr/solr-ref-guide/src/getting-started-with-solrcloud.adoc
@@ -145,7 +145,7 @@ bin/solr restart -c -p 7574 -z localhost:9983 -s example/cloud/node2/solr
Notice that you need to specify the ZooKeeper address (`-z localhost:9983`) when starting node2 so that it can join the cluster with node1.
-=== Adding a node to a cluster
+=== Adding a Node to a Cluster
Adding a node to an existing cluster is a bit advanced and involves a little more understanding of Solr. Once you startup a SolrCloud cluster using the startup scripts, you can add a new node to it by:
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/highlighting.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/highlighting.adoc b/solr/solr-ref-guide/src/highlighting.adoc
index 137eef4..1d60f16 100644
--- a/solr/solr-ref-guide/src/highlighting.adoc
+++ b/solr/solr-ref-guide/src/highlighting.adoc
@@ -82,7 +82,7 @@ The default is `<em>`.
The default is `</em>`.
`hl.encoder`::
-If blank, the default, then the stored text will be returned without any escaping/encoding performed by the highlighter. If set to `html` then special HMTL/XML characters will be encoded (e.g. `&` becomes `\&`). The pre/post snippet characters are never encoded.
+If blank, the default, then the stored text will be returned without any escaping/encoding performed by the highlighter. If set to `html` then special HMTL/XML characters will be encoded (e.g., `&` becomes `\&`). The pre/post snippet characters are never encoded.
`hl.maxAnalyzedChars`::
The character limit to look for highlights, after which no highlighting will be done. This is mostly only a performance concern for an _analysis_ based offset source since it's the slowest. See <<Schema Options and Performance Considerations>>.
@@ -146,7 +146,7 @@ There are four highlighters available that can be chosen at runtime with the `hl
+
The Unified Highlighter is the newest highlighter (as of Solr 6.4), which stands out as the most flexible and performant of the options. We recommend that you try this highlighter even though it isn't the default (yet).
+
-This highlighter supports the most common highlighting parameters and can handle just about any query accurately, even SpanQueries (e.g. as seen from the `surround` parser). A strong benefit to this highlighter is that you can opt to configure Solr to put more information in the underlying index to speed up highlighting of large documents; multiple configurations are supported, even on a per-field basis. There is little or no such flexibility for the other highlighters. More on this below.
+This highlighter supports the most common highlighting parameters and can handle just about any query accurately, even SpanQueries (e.g., as seen from the `surround` parser). A strong benefit to this highlighter is that you can opt to configure Solr to put more information in the underlying index to speed up highlighting of large documents; multiple configurations are supported, even on a per-field basis. There is little or no such flexibility for the other highlighters. More on this below.
<<The Original Highlighter,Original Highlighter>>:: (`hl.method=original`, the default)
+
@@ -304,7 +304,7 @@ If `true`, multi-valued fields will return all values in the order they were sav
`hl.payloads`::
When `hl.usePhraseHighlighter` is `true` and the indexed field has payloads but not term vectors (generally quite rare), the index's payloads will be read into the highlighter's memory index along with the postings.
+
-If this may happen and you know you don't need them for highlighting (i.e. your queries don't filter by payload) then you can save a little memory by setting this to false.
+If this may happen and you know you don't need them for highlighting (i.e., your queries don't filter by payload) then you can save a little memory by setting this to false.
The Original Highlighter has a plugin architecture that enables new functionality to be registered in `solrconfig.xml`. The "```techproducts```" configset shows most of these settings explicitly. You can use it as a guide to provide your own components to include a `SolrFormatter`, `SolrEncoder`, and `SolrFragmenter.`
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/index-replication.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/index-replication.adoc b/solr/solr-ref-guide/src/index-replication.adoc
index 03e25c7..bef8e28 100644
--- a/solr/solr-ref-guide/src/index-replication.adoc
+++ b/solr/solr-ref-guide/src/index-replication.adoc
@@ -101,7 +101,7 @@ Integer specifying how many backups to keep. This can be used to delete all but
The configuration files to replicate, separated by a comma.
`commitReserveDuration`::
-If your commits are very frequent and your network is slow, you can tweak this parameter to increase the amount of time expected to be required to transfer data. The default is `00:00:10` i.e. 10 seconds.
+If your commits are very frequent and your network is slow, you can tweak this parameter to increase the amount of time expected to be required to transfer data. The default is `00:00:10` i.e., 10 seconds.
The example below shows a possible 'master' configuration for the `ReplicationHandler`, including a fixed number of backups and an invariant setting for the `maxWriteMBPerSec` request parameter to prevent slaves from saturating its network interface
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/language-analysis.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/language-analysis.adoc b/solr/solr-ref-guide/src/language-analysis.adoc
index d624e6b..ee1c862 100644
--- a/solr/solr-ref-guide/src/language-analysis.adoc
+++ b/solr/solr-ref-guide/src/language-analysis.adoc
@@ -165,7 +165,7 @@ Expert options:
`caseFirst`:: Valid values are `lower` or `upper`. Useful to control which is sorted first when case is not ignored.
-`numeric`:: (true/false) If true, digits are sorted according to numeric value, e.g. foobar-9 sorts before foobar-10. The default is false.
+`numeric`:: (true/false) If true, digits are sorted according to numeric value, e.g., foobar-9 sorts before foobar-10. The default is false.
`variableTop`:: Single character or contraction. Controls what is variable for `alternate`.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/learning-to-rank.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/learning-to-rank.adoc b/solr/solr-ref-guide/src/learning-to-rank.adoc
index bfdca52..c3b0a83 100644
--- a/solr/solr-ref-guide/src/learning-to-rank.adoc
+++ b/solr/solr-ref-guide/src/learning-to-rank.adoc
@@ -46,7 +46,7 @@ A feature is a value, a number, that represents some quantity or quality of the
==== Normalizer
-Some ranking models expect features on a particular scale. A normalizer can be used to translate arbitrary feature values into normalized values e.g. on a 0..1 or 0..100 scale.
+Some ranking models expect features on a particular scale. A normalizer can be used to translate arbitrary feature values into normalized values e.g., on a 0..1 or 0..100 scale.
=== Training Models
@@ -82,7 +82,7 @@ The ltr contrib module includes a <<transforming-result-documents.adoc#transform
==== Feature Selection and Model Training
-Feature selection and model training take place offline and outside Solr. The ltr contrib module supports two generalized forms of models as well as custom models. Each model class's javadocs contain an example to illustrate configuration of that class. In the form of JSON files your trained model or models (e.g. different models for different customer geographies) can then be directly uploaded into Solr using provided REST APIs.
+Feature selection and model training take place offline and outside Solr. The ltr contrib module supports two generalized forms of models as well as custom models. Each model class's javadocs contain an example to illustrate configuration of that class. In the form of JSON files your trained model or models (e.g., different models for different customer geographies) can then be directly uploaded into Solr using provided REST APIs.
[cols=",,",options="header",]
|===
@@ -609,7 +609,7 @@ The feature store and the model store are both <<managed-resources.adoc#managed-
* Conventions used:
** `<store>.json` file contains features for the `<store>` feature store
** `<model>.json` file contains model name `<model>`
-** a 'generation' id (e.g. `YYYYMM` year-month) is part of the feature store and model names
+** a 'generation' id (e.g., `YYYYMM` year-month) is part of the feature store and model names
** The model's features and weights are sorted alphabetically by name, this makes it easy to see what the commonalities and differences between the two models are.
** The stores features are sorted alphabetically by name, this makes it easy to see what the commonalities and differences between the two feature stores are.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/metrics-reporting.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/metrics-reporting.adoc b/solr/solr-ref-guide/src/metrics-reporting.adoc
index e64ca33..451f93e 100644
--- a/solr/solr-ref-guide/src/metrics-reporting.adoc
+++ b/solr/solr-ref-guide/src/metrics-reporting.adoc
@@ -299,10 +299,10 @@ and re-reported elsewhere as necessary.
In case of shard reporter the target node is the shard leader, in case of cluster reporter the
target node is the Overseer leader.
-=== Shard reporter
+=== Shard Reporter
This reporter uses predefined `shard` group, and the implementing class must be (a subclass of)
`solr.SolrShardReporter`. It publishes selected metrics from replicas to the node where shard leader is
-located. Reports use a target registry name that is the replica's registry name with a `.leader` suffix, eg. for a
+located. Reports use a target registry name that is the replica's registry name with a `.leader` suffix, e.g., for a
SolrCore name `collection1_shard1_replica_n3` the target registry name is
`solr.core.collection1.shard1.replica_n3.leader`.
@@ -334,7 +334,7 @@ Example configuration:
</reporter>
----
-=== Cluster reporter
+=== Cluster Reporter
This reporter uses predefined `cluster` group and the implementing class must be (a subclass of)
`solr.SolrClusterReporter`. It publishes selected metrics from any local registry to the Overseer leader node.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/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 b4d55c6..fb50bb7 100644
--- a/solr/solr-ref-guide/src/near-real-time-searching.adoc
+++ b/solr/solr-ref-guide/src/near-real-time-searching.adoc
@@ -61,7 +61,7 @@ One point of confusion is how much data is contained in a tlog. A tlog does not
WARNING: Implicit in the above is that transaction logs will grow forever if hard commits are disabled. Therefore it is important that hard commits be enabled when indexing.
-=== Configuring commits
+=== Configuring Commits
As mentioned above, it is usually preferable to configure your commits (both hard and soft) in `solrconfig.xml` and avoid sending commits from an external source. Check your `solrconfig.xml` file since the defaults are likely not tuned to your needs. Here is an example NRT configuration for the two flavors of commit, a hard commit every 60 seconds and a soft commit every 30 seconds. Note that these are _not_ the values in some of the examples!
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/schema-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/schema-api.adoc b/solr/solr-ref-guide/src/schema-api.adoc
index 9865df0..48ab0dd 100644
--- a/solr/solr-ref-guide/src/schema-api.adoc
+++ b/solr/solr-ref-guide/src/schema-api.adoc
@@ -40,7 +40,7 @@ When modifying the schema with the API, a core reload will automatically occur i
.Re-index after schema modifications!
[IMPORTANT]
====
-If you modify your schema, you will likely need to re-index all documents. If you do not, you may lose access to documents, or not be able to interpret them properly, e.g. after replacing a field type.
+If you modify your schema, you will likely need to re-index all documents. If you do not, you may lose access to documents, or not be able to interpret them properly, e.g., after replacing a field type.
Modifying your schema will never modify any documents that are already indexed. You must re-index documents in order to apply schema changes to them. Queries and updates made after the change may encounter errors that were not present before the change. Completely deleting the index and rebuilding it is usually the only option to fix such errors.
====
@@ -595,7 +595,7 @@ If neither the `fl` query parameter nor the `fieldname` path parameter is specif
If `false`, the default, matching dynamic fields will not be returned.
`showDefaults`::
-If `true`, all default field properties from each field's field type will be included in the response (e.g. `tokenized` for `solr.TextField`). If `false`, the default, only explicitly specified field properties will be included.
+If `true`, all default field properties from each field's field type will be included in the response (e.g., `tokenized` for `solr.TextField`). If `false`, the default, only explicitly specified field properties will be included.
==== List Fields Response
@@ -670,7 +670,7 @@ The query parameters can be added to the API request after a '?'.
Defines the format of the response. The options are `json` or `xml`. If not specified, JSON will be returned by default.
`showDefaults`::
-If `true`, all default field properties from each dynamic field's field type will be included in the response (e.g. `tokenized` for `solr.TextField`). If `false`, the default, only explicitly specified field properties will be included.
+If `true`, all default field properties from each dynamic field's field type will be included in the response (e.g., `tokenized` for `solr.TextField`). If `false`, the default, only explicitly specified field properties will be included.
==== List Dynamic Field Response
@@ -753,7 +753,7 @@ The query parameters can be added to the API request after a '?'.
Defines the format of the response. The options are `json` or `xml`. If not specified, JSON will be returned by default.
`showDefaults`::
-If `true`, all default field properties from each dynamic field's field type will be included in the response (e.g. `tokenized` for `solr.TextField`). If `false`, the default, only explicitly specified field properties will be included.
+If `true`, all default field properties from each dynamic field's field type will be included in the response (e.g., `tokenized` for `solr.TextField`). If `false`, the default, only explicitly specified field properties will be included.
==== List Field Type Response
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/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 d8f85557..5665a96 100644
--- a/solr/solr-ref-guide/src/solr-control-script-reference.adoc
+++ b/solr/solr-ref-guide/src/solr-control-script-reference.adoc
@@ -463,7 +463,7 @@ Other collections can share the same configuration by specifying the name of the
==== Data-driven Schema and Shared Configurations
-The `_default` schema can mutate as data is indexed, since it has schemaless functionality (i.e. data-driven changes to the schema). Consequently, we recommend that you do not share data-driven configurations between collections unless you are certain that all collections should inherit the changes made when indexing data into one of the collections. You can turn off schemaless functionality (i.e. data-driven changes to the schema) for a collection by the following (assuming the collection name is `mycollection`):
+The `_default` schema can mutate as data is indexed, since it has schemaless functionality (i.e., data-driven changes to the schema). Consequently, we recommend that you do not share data-driven configurations between collections unless you are certain that all collections should inherit the changes made when indexing data into one of the collections. You can turn off schemaless functionality (i.e., data-driven changes to the schema) for a collection by the following (assuming the collection name is `mycollection`):
`curl http://host:8983/solr/mycollection/config -d '{"set-user-property": {"update.autoCreateFields":"false"}}'`
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc
index 6f59043..fc47a66 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc
@@ -24,7 +24,7 @@ The Autoscaling API is used to manage autoscaling policies, preferences, trigger
== Read API
-The autoscaling Read API is available at `/admin/autoscaling` or `/solr/cluster/autoscaling`. It returns information about the configured cluster preferences, cluster policy, collection-specific policies triggers and listeners.
+The autoscaling Read API is available at `/solr/admin/autoscaling` or `/api/cluster/autoscaling` (v2 API style). It returns information about the configured cluster preferences, cluster policy, collection-specific policies triggers and listeners.
This API does not take any parameters.
@@ -145,26 +145,27 @@ However, since the first node in the first example had more than 1 replica for a
In the above example the node with port 8983 has two replicas for `shard1` in violation of our policy.
== History API
-History of autoscaling events is available at `/admin/autoscaling/history`. It returns information
+
+The history of autoscaling events is available at `/admin/autoscaling/history`. It returns information
about past autoscaling events and details about their processing. This history is kept in
-the `.system` collection, and populated by a trigger listener `SystemLogListener` - by default this
+the `.system` collection, and is populated by a trigger listener `SystemLogListener`. By default this
listener is added to all new triggers.
History events are regular Solr documents so they can be also accessed directly by
-searching on the `.system` collection. History handler acts as a regular search handler, so all
+searching on the `.system` collection. The history handler acts as a regular search handler, so all
query parameters supported by `/select` handler for that collection are supported here too.
However, the history handler makes this
process easier by offering a simpler syntax and knowledge of field names
used by `SystemLogListener` for serialization of event data.
-History documents contain also the action context, if it was available, which gives
-further insight into e.g. exact operations that were computed and/or executed.
+History documents contain the action context, if it was available, which gives
+further insight into e.g., exact operations that were computed and/or executed.
Specifically, the following query parameters can be used (they are turned into
filter queries, so an implicit AND is applied):
* `trigger` - trigger name
-* `eventType` - event type / trigger type (eg. `nodeAdded`)
+* `eventType` - event type / trigger type (e.g., `nodeAdded`)
* `collection` - collection name involved in event processing
* `stage` - event processing stage
* `action` - trigger action
@@ -236,18 +237,18 @@ filter queries, so an implicit AND is applied):
.Broken v2 API support
[WARNING]
====
-Due to a bug in Solr 7.1.0, the History API is available only at the path /admin/autoscaling/history. Using the /api/cluster/autoscaling/history endpoint returns an error.
+Due to a bug in Solr 7.1.0, the History API is available only at the path `/admin/autoscaling/history`. Using the `/api/cluster/autoscaling/history` endpoint returns an error.
====
== Write API
-The Write API is available at the same `/admin/autoscaling` and `/api/cluster/autoscaling` endpoints as the read API but can only be used with the *POST* HTTP verb.
+The Write API is available at the same `/admin/autoscaling` and `/api/cluster/autoscaling` endpoints as the Read API but can only be used with the *POST* HTTP verb.
The payload of the POST request is a JSON message with commands to set and remove components. Multiple commands can be specified together in the payload. The commands are executed in the order specified and the changes are atomic, i.e., either all succeed or none.
=== Create and Modify Cluster Preferences
-Cluster preferences are specified as a list of sort preferences. Multiple sorting preferences can be specified and they are applied in order.
+Cluster preferences are specified as a list of sort preferences. Multiple sorting preferences can be specified and they are applied in the order they are set.
They are defined using the `set-cluster-preferences` command.
@@ -336,7 +337,7 @@ Refer to the <<solrcloud-autoscaling-policy-preferences.adoc#policy-specificatio
}
----
-Output:
+*Output*:
[source,json]
----
{
@@ -422,7 +423,7 @@ If you attempt to remove a policy that is being used by a collection, this comma
=== Create/Update Trigger
-The set-trigger command can be used to create a new trigger or overwrite an existing one.
+The `set-trigger` command can be used to create a new trigger or overwrite an existing one.
You can see the section <<solrcloud-autoscaling-triggers.adoc#trigger-configuration,Trigger Configuration>> for a full list of configuration options.
@@ -464,7 +465,7 @@ You can see the section <<solrcloud-autoscaling-triggers.adoc#trigger-configurat
=== Remove Trigger
-The remove-trigger command can be used to remove a trigger. It accepts a single parameter: the name of the trigger.
+The `remove-trigger` command can be used to remove a trigger. It accepts a single parameter: the name of the trigger.
.Removing the nodeLost Trigger
[source,json]
@@ -478,7 +479,7 @@ The remove-trigger command can be used to remove a trigger. It accepts a single
=== Create/Update Trigger Listener
-The set-listener command can be used to create or modify a listener for a trigger.
+The `set-listener` command can be used to create or modify a listener for a trigger.
You can see the section <<solrcloud-autoscaling-listeners.adoc#listener-configuration,Trigger Listener Configuration>> for a full list of configuration options.
@@ -497,7 +498,7 @@ You can see the section <<solrcloud-autoscaling-listeners.adoc#listener-configur
=== Remove Trigger Listener
-The remove-listener command can be used to remove an existing listener. It accepts a single parameter: the name of the listener.
+The `remove-listener` command can be used to remove an existing listener. It accepts a single parameter: the name of the listener.
.Removing the foo listener
[source,json]
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc
index d5c9716..55b45a1 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc
@@ -21,28 +21,27 @@
Solr provides a way to automatically add replicas for a collection when the number of active replicas drops below
the replication factor specified at the time of the creation of the collection.
-== `autoAddReplicas` parameter
+== The autoAddReplicas Parameter
-The boolean `autoAddReplicas` parameter can be passed to the Create Collection API to enable this feature for a given collection.
+The boolean `autoAddReplicas` parameter can be passed to the CREATE command of the Collection API to enable this feature for a given collection.
-.Creating a collection with autoAddReplicas feature
-`http://localhost:8983/solr/admin/collections?action=CREATE&name=my_collection&numShards=1&replicationFactor=5&autoAddReplicas=true`
+.Create a collection with autoAddReplicas enabled
+[source,text]
+http://localhost:8983/solr/admin/collections?action=CREATE&name=my_collection&numShards=1&replicationFactor=5&autoAddReplicas=true
-The modify collection API can be used to enable/disable this feature for any collection.
+The MODIFYCOLLECTION command can be used to enable/disable this feature for any collection.
-.Modifying collection to disable autoAddReplicas feature
-`http://localhost:8983/solr/admin/collections?action=MODIFYCOLLECTION&name=my_collection&autoAddReplicas=false`
+.Modify collection to disable autoAddReplicas
+[source,text]
+http://localhost:8983/solr/admin/collections?action=MODIFYCOLLECTION&name=my_collection&autoAddReplicas=false
-== Implementation using `.autoAddReplicas` trigger
+== Implementation Using .autoAddReplicas Trigger
A Trigger named `.autoAddReplicas` is automatically created whenever any collection has the autoAddReplicas feature enabled.
-Only one trigger is sufficient to server all collections having this feature enabled. The `.autoAddReplicas` trigger watches
-for nodes that are lost from the cluster and uses the default TriggerActions to create new replicas to replace the ones
-which were hosted by the lost node. If the old node comes back online, it unloads the moved replicas and is free to host other
-replicas as and when required.
-Since the trigger provides the autoAddReplicas feature for all collections, the suspend-trigger and resume-trigger APIs
-can be used to disable and enable this feature for all collections in one API call.
+Only one trigger is sufficient to serve all collections having this feature enabled. The `.autoAddReplicas` trigger watches for nodes that are lost from the cluster and uses the default `TriggerActions` to create new replicas to replace the ones which were hosted by the lost node. If the old node comes back online, it unloads the moved replicas and the node is free to host other replicas as and when required.
+
+Since the trigger provides the autoAddReplicas feature for all collections, the `suspend-trigger` and `resume-trigger` Autoscaling API commands can be used to disable and enable this feature for all collections in one API call. See <<solrcloud-autoscaling-auto-add-replicas.adoc#>>
.Suspending autoAddReplicas for all collections
[source,json]
@@ -64,13 +63,13 @@ can be used to disable and enable this feature for all collections in one API ca
}
----
-== Using cluster property to enable/disable autoAddReplicas
+== Using Cluster Property to Enable autoAddReplicas
A cluster property, also named `autoAddReplicas`, can be set to `false` to disable this feature for all collections.
-If this cluster property is missing or set to `true` the autoAddReplicas is enabled for all collections.
+If this cluster property is missing or set to `true`, the autoAddReplicas is enabled for all collections.
.Deprecation Warning
[WARNING]
====
-Using cluster property to enable/disable autoAddReplicas is deprecated and only supported for back compatibility. Please use the suspend-trigger and resume-trigger APIs instead.
-====
\ No newline at end of file
+Using a cluster property to enable or disable autoAddReplicas is deprecated and only supported for back compatibility. Please use the `suspend-trigger` and `resume-trigger` API commands instead.
+====
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/solrcloud-autoscaling-fault-tolerance.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-fault-tolerance.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-fault-tolerance.adoc
index 5792e66..9f0b816 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-fault-tolerance.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-fault-tolerance.adoc
@@ -18,43 +18,44 @@
// specific language governing permissions and limitations
// under the License.
-== Node added / lost markers
-Since triggers execute on the node that runs Overseer, should this node go down the `nodeLost`
+The autoscaling framework uses a few strategies to ensure it's able to still trigger actions in the event of unexpected changes to the system.
+
+== Node Added or Lost Markers
+Since triggers execute on the node that runs the Overseer, should the Overseer node go down the `nodeLost`
event would be lost because there would be no mechanism to generate it. Similarly, if a node has
-been added between the Overseer leader change was completed the `nodeAdded` event would not be
+been added before the Overseer leader change was completed, the `nodeAdded` event would not be
generated.
For this reason Solr implements additional mechanisms to ensure that these events are generated
reliably.
-When a node joins a cluster its presence is marked as an ephemeral ZK path in the `/live_nodes/<nodeName>`
-ZooKeeper directory, but now also an ephemeral path is created under `/autoscaling/nodeAdded/<nodeName>`.
+With standard SolrCloud behavior, when a node joins a cluster its presence is marked as an ephemeral ZooKeeper path in the `/live_nodes/<nodeName>` ZooKeeper directory. Now an ephemeral path is also created under `/autoscaling/nodeAdded/<nodeName>`.
When a new instance of Overseer leader is started it will run the `nodeAdded` trigger (if it's configured)
-and discover the presence of this ZK path, at which point it will remove it and generate a `nodeAdded` event.
+and discover the presence of this ZooKeeper path, at which point it will remove it and generate a `nodeAdded` event.
-When a node leaves the cluster up to three remaining nodes will try to create a persistent ZK path
+When a node leaves the cluster, up to three remaining nodes will try to create a persistent ZooKeeper path
`/autoscaling/nodeLost/<nodeName>` and eventually one of them succeeds. When a new instance of Overseer leader
-is started it will run the `nodeLost` trigger (if it's configured) and discover the presence of this ZK
+is started it will run the `nodeLost` trigger (if it's configured) and discover the presence of this ZooKeeper
path, at which point it will remove it and generate a `nodeLost` event.
-== Trigger state checkpointing
-Triggers generate events based on their internal state. If Overseer leader goes down while the trigger is
+== Trigger State Checkpointing
+Triggers generate events based on their internal state. If the Overseer leader goes down while the trigger is
about to generate a new event, it's likely that the event would be lost because a new trigger instance
running on the new Overseer leader would start from a clean slate.
-For this reason after each time a trigger is executed its internal state is persisted to ZooKeeper, and
+For this reason, after each time a trigger is executed its internal state is persisted to ZooKeeper, and
on Overseer start its internal state is restored.
-== Trigger event queues
+== Trigger Event Queues
Autoscaling framework limits the rate at which events are processed using several different mechanisms.
One is the locking mechanism that prevents concurrent
processing of events, and another is a single-threaded executor that runs trigger actions.
-This means that the processing of an event may take significant time, and during this time it's possible that
+This means that the processing of an event may take significant time, and during this time it's possible that the
Overseer may go down. In order to avoid losing events that were already generated but not yet fully
-processed events are queued before processing is started.
+processed, events are queued before processing is started.
Separate ZooKeeper queues are created for each trigger, and events produced by triggers are put on these
per-trigger queues. When a new Overseer leader is started it will first check
these queues and process events accumulated there, and only then it will continue to run triggers
-normally. Queued events that fail processing during this "replay" stage are discarded.
\ No newline at end of file
+normally. Queued events that fail processing during this "replay" stage are discarded.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc
index 282839a..ce96b94 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc
@@ -18,19 +18,18 @@
// specific language governing permissions and limitations
// under the License.
-Trigger listener API allows users to provide additional behavior related to trigger events as they are being processed.
+Trigger Listeners allow users to configure additional behavior related to trigger events as they are being processed.
-For example, users may want to record autoscaling events to an external system, or notify administrator when a
-particular type of event occurs, or when its processing reaches certain stage (eg. failed).
+For example, users may want to record autoscaling events to an external system, or notify an administrator when a
+particular type of event occurs or when its processing reaches certain stage (e.g., failed).
-Listener configuration always refers to a specific trigger configuration - listener is notified of
+Listener configuration always refers to a specific trigger configuration because a listener is notified of
events generated by that specific trigger. Several (or none) named listeners can be registered for a trigger,
and they will be notified in the order in which they were defined.
-Listener configuration can specify what processing stages are of interest - when an event enters this processing stage
-the listener will be notified. Currently the following stages are recognized:
+Listener configuration can specify what processing stages are of interest, and when an event enters this processing stage the listener will be notified. Currently the following stages are recognized:
-* STARTED - when event has been generated by a trigger and its processing is starting.
+* STARTED - when an event has been generated by a trigger and its processing is starting.
* ABORTED - when event was being processed while the source trigger closed.
* BEFORE_ACTION - when a `TriggerAction` is about to be invoked. Action name and the current `ActionContext` are passed to the listener.
* AFTER_ACTION - after a `TriggerAction` has been successfully invoked. Action name, `ActionContext` and the list of action
@@ -38,28 +37,27 @@ the listener will be notified. Currently the following stages are recognized:
* FAILED - when event processing failed (or when a `TriggerAction` failed)
* SUCCEEDED - when event processing completes successfully
-Listener configuration can also specify what particular actions are of interest, both
-before and/or after they are invoked.
+Listener configuration can also specify what particular actions are of interest, both before and/or after they are invoked.
-== Listener configuration
+== Listener Configuration
Currently the following listener configuration properties are supported:
-* `name` - (string, required) unique listener configuration name.
-* `trigger` - (string, required) name of an existing trigger configuration.
-* `class` - (string, required) listener implementation class name.
-* `stage` - (list of strings, optional, ignored case) list of processing stages that
+* `name` - (string, required) A unique listener configuration name.
+* `trigger` - (string, required) The name of an existing trigger configuration.
+* `class` - (string, required) A listener implementation class name.
+* `stage` - (list of strings, optional, ignored case) A list of processing stages that
this listener should be notified. Default is empty list.
-* `beforeAction` - (list of strings, optional) list of action names (as defined in trigger configuration) before
+* `beforeAction` - (list of strings, optional) A list of action names (as defined in trigger configuration) before
which the listener will be notified. Default is empty list.
-* `afterAction` - (list of strings, optional) list of action names after which the listener will be notified.
+* `afterAction` - (list of strings, optional) A list of action names after which the listener will be notified.
Default is empty list.
-* additional implementation-specific properties may be provided.
+* Additional implementation-specific properties may be provided.
Note: when both `stage` and `beforeAction` / `afterAction` lists are non-empty then the listener will be notified both
when a specified stage is entered and before / after specified actions.
-=== Managing listener configurations
-Listener configurations can be managed using autoscaling Write API, and using `set-listener` and `remove-listener`
+=== Managing Listener Configurations
+Listener configurations can be managed using the Autoscaling Write API, and using `set-listener` and `remove-listener`
commands.
For example:
@@ -85,17 +83,15 @@ For example:
}
----
+== Listener Implementations
+Trigger listeners must implement the `TriggerListener` interface. Solr provides some
+implementations of trigger listeners, which cover common use cases. These implementations are described below, together with their configuration parameters.
-== Listener implementations
-Trigger listeners must implement `TriggerListener` interface. Solr provides some
-implementations of trigger listeners, which cover common use cases. These implementations are described in sections
-below, together with their configuration parameters.
-
-=== `SystemLogListener`
+=== SystemLogListener
This trigger listener sends trigger events and processing context as documents for indexing in
SolrCloud `.system` collection.
-When a trigger configuration is first created a corresponding trigger listener configuration that
+When a trigger configuration is first created, a corresponding trigger listener configuration that
uses `SystemLogListener` is also automatically created, to make sure that all events and
actions related to the autoscaling framework are logged to the `.system` collection.
@@ -121,7 +117,6 @@ Documents created by this listener have several predefined fields:
* `event_str` - JSON representation of all event properties
* `context_str` - JSON representation of all `ActionContext` properties, if available
-
The following fields are created using the information from trigger event:
* `event.id_s` - event id
@@ -145,23 +140,22 @@ trigger named `foo`):
}
----
-=== `HttpTriggerListener`
-This listener uses HTTP POST to send a representation of event and context to a specified URL.
-URL, payload and headers may contain property substitution patterns, which are then replaced with values takes from the
-current event or context properties.
+=== HttpTriggerListener
+This listener uses HTTP POST to send a representation of the event and context to a specified URL.
+The URL, payload, and headers may contain property substitution patterns, which are then replaced with values taken from the current event or context properties.
-Templates use the same syntax as property substitution in Solr configuration files, eg.
+Templates use the same syntax as property substitution in Solr configuration files, e.g.,
`${foo.bar:baz}` means that the value of `foo.bar` property should be taken, and `baz` should be used
if the value is absent.
Supported configuration properties:
-* `url` - (string, required) a URL template
-* `payload` - (string, optional) payload template. If absent a JSON map of all properties listed above will be used.
-* `contentType` - (string, optional) payload content type. If absent then application/json will be used.
-* `header.*` - (string, optional) header template(s). The name of the property without "header." prefix defines the literal header name.
-* `timeout` - (int, optional) connection and socket timeout in milliseconds. Default is 60 seconds.
-* `followRedirects` - (boolean, optional) setting to follow redirects. Default is false.
+* `url` - (string, required) A URL template.
+* `payload` - (string, optional) A payload template. If absent, a JSON map of all properties listed above will be used.
+* `contentType` - (string, optional) A payload content type. If absent then `application/json` will be used.
+* `header.*` - (string, optional) A header template(s). The name of the property without "header." prefix defines the literal header name.
+* `timeout` - (int, optional) Connection and socket timeout in milliseconds. Default is `60000` milliseconds (60 seconds).
+* `followRedirects` - (boolean, optional) Allows following redirects. Default is `false`.
The following properties are available in context and can be referenced from templates:
@@ -173,7 +167,7 @@ The following properties are available in context and can be referenced from tem
* `error` - optional error string (from Throwable.toString())
* `message` - optional message
-Example configuration:
+.Example HttpTriggerListener
[source,json]
----
{
@@ -185,12 +179,12 @@ Example configuration:
"header.X-Trigger": "${config.trigger}",
"payload": "actionName=${actionName}, source=${event.source}, type=${event.eventType}",
"contentType": "text/plain",
- "stage": ["STARTED", "ABORTED", SUCCEEDED", "FAILED"],
+ "stage": ["STARTED", "ABORTED", "SUCCEEDED", "FAILED"],
"beforeAction": ["compute_plan", "execute_plan"],
"afterAction": ["compute_plan", "execute_plan"]
}
----
+
This configuration specifies that each time one of the listed stages is reached, or before and after each of the listed
actions is executed, the listener will send the templated payload to a URL that also depends on the config and the current event,
and with a custom header that indicates the trigger name.
-
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/solrcloud-autoscaling-overview.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-overview.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-overview.adoc
index b3f2763..753bb54 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-overview.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-overview.adoc
@@ -24,56 +24,57 @@ Autoscaling in Solr aims to provide good defaults so a SolrCloud cluster remains
A simple example is automatically adding a replica for a SolrCloud collection when a node containing an existing replica goes down.
-The goal of autoscaling feature is to make SolrCloud cluster management easier, automatic and intelligent. It aims to provide good defaults such that the cluster remains balanced and stable in the face of various events such as a node joining the cluster or leaving the cluster. This is achieved by satisfying a set of rules and sorting preferences that help Solr select the target of cluster management operations.
+The goal of autoscaling in SolrCloud is to make cluster management easier, more automatic, and more intelligent. It aims to provide good defaults such that the cluster remains balanced and stable in the face of various events such as a node joining the cluster or leaving the cluster. This is achieved by satisfying a set of rules and sorting preferences that help Solr select the target of cluster management operations.
There are three distinct problems that this feature solves:
-* When to run cluster management tasks? e.g. we might want to add a replica when an existing replica is no longer alive.
-* Which cluster management task to run? e.g. do we add a new replica or should we move an existing one to a new node
-* How to run the cluster management tasks such that the cluster remains balanced and stable?
+* When to run cluster management tasks? For example, we might want to add a replica when an existing replica is no longer alive.
+* Which cluster management task to run? For example, do we add a new replica or should we move an existing one to a new node?
+* How do we run the cluster management tasks so the cluster remains balanced and stable?
Before we get into the details of how each of these problems are solved, let's take a quick look at the easiest way to setup autoscaling for your cluster.
-== QuickStart: Automatically adding replicas
+== Quick Start: Automatically Adding Replicas
-Say that we want to create a collection which always requires us to have three replicas available for each shard all the time. We can set the replicationFactor=3 while creating the collection but what happens if a node containing one or more of the replicas either crashed or was shutdown for maintenance. In such a case, we'd like to create additional replicas to replace the ones that are no longer available to preserve the original number of replicas.
+Say that we want to create a collection which always requires us to have three replicas available for each shard all the time. We can set the `replicationFactor=3` while creating the collection, but what happens if a node containing one or more of the replicas either crashed or was shutdown for maintenance? In such a case, we'd like to create additional replicas to replace the ones that are no longer available to preserve the original number of replicas.
-We have an easy way to enable this behavior without needing to understand the autoscaling feature in depth. We can create a collection with such behavior by adding an additional parameter `autoAddReplicas=true` to the create collection API. For example:
+We have an easy way to enable this behavior without needing to understand the autoscaling features in depth. We can create a collection with such behavior by adding an additional parameter `autoAddReplicas=true` with the CREATE command of the Collection API. For example:
-`/admin/collections?action=CREATE&name=_name_of_collection_&numShards=1&replicationFactor=3&autoAddReplicas=true`
+[source,text]
+/admin/collections?action=CREATE&name=_name_of_collection_&numShards=1&replicationFactor=3&autoAddReplicas=true
A collection created with `autoAddReplicas=true` will be monitored by Solr such that if a node containing a replica of this collection goes down, Solr will add new replicas on other nodes after waiting for up to thirty seconds for the node to come back.
-You can see the section <<solrcloud-autoscaling-auto-add-replicas.adoc#solrcloud-autoscaling-auto-add-replicas,SolrCloud AutoScaling Automatically Adding Replicas>> to learn more about how to enable or disable this feature as well as other details.
+You can see the section <<solrcloud-autoscaling-auto-add-replicas.adoc#solrcloud-autoscaling-auto-add-replicas, Autoscaling Automatically Adding Replicas>> to learn more about how to enable or disable this feature as well as other details.
The selection of the node that will host the new replica is made according to the default cluster preferences that we will learn more about in the next sections.
-
== Cluster Preferences
Cluster preferences, as the name suggests, apply to all cluster management operations regardless of which collection they affect.
A preference is a set of conditions that help Solr select nodes that either maximize or minimize given metrics. For example, a preference such as `{minimize:cores}` will help Solr select nodes such that the number of cores on each node is minimized. We write cluster preferences in a way that reduces the overall load on the system. You can add more than one preferences to break ties.
-The default cluster preferences consist of the above example (`{minimize : cores}`) which is to minimize the number of cores on all nodes.
+The default cluster preferences consist of the above example (`{minimize:cores}`) which is to minimize the number of cores on all nodes.
You can learn more about preferences in the <<solrcloud-autoscaling-policy-preferences.adoc#solrcloud-autoscaling-policy-preferences,Autoscaling Cluster Preferences>> section.
== Cluster Policy
-A cluster policy is a set of conditions that a node, shard, or collection must satisfy before it can be chosen as the target of a cluster management operation. These conditions are applied across the cluster regardless of the collection being managed. For example, the condition `{"cores":"<10", "node":"#ANY"}` means that any node must have less than 10 Solr cores in total regardless of which collection they belong to.
+A cluster policy is a set of conditions that a node, shard, or collection must satisfy before it can be chosen as the target of a cluster management operation. These conditions are applied across the cluster regardless of the collection being managed. For example, the condition `{"cores":"<10", "node":"#ANY"}` means that any node must have less than 10 Solr cores in total, regardless of which collection they belong to.
-There are many metrics on which the condition can be based, e.g., system load average, heap usage, free disk space, etc. The full list of supported metrics can be found in the section describing <<solrcloud-autoscaling-policy-preferences.adoc#policy-attributes,Policy Attributes>>.
+There are many metrics on which the condition can be based, e.g., system load average, heap usage, free disk space, etc. The full list of supported metrics can be found in the section describing <<solrcloud-autoscaling-policy-preferences.adoc#policy-attributes,Autoscaling Policy Attributes>>.
When a node, shard, or collection does not satisfy the policy, we call it a *violation*. Solr ensures that cluster management operations minimize the number of violations. Cluster management operations are currently invoked manually. In the future, these cluster management operations may be invoked automatically in response to cluster events such as a node being added or lost.
== Collection-Specific Policies
-A collection may need conditions in addition to those specified in the cluster policy. In such cases, we can create named policies that can be used for specific collections. Firstly, we can use the `set-policy` API to create a new policy and then specify the `policy=<policy_name>` parameter to the CREATE command of the Collection API.
+A collection may need conditions in addition to those specified in the cluster policy. In such cases, we can create named policies that can be used for specific collections. Firstly, we can use the `set-policy` API to create a new policy and then specify the `policy=<policy_name>` parameter to the CREATE command of the Collection API:
-`/admin/collections?action=CREATE&name=coll1&numShards=1&replicationFactor=2&policy=policy1`
+[source,text]
+/admin/collections?action=CREATE&name=coll1&numShards=1&replicationFactor=2&policy=policy1
-The above create collection command will associate a policy named `policy1` with the collection named `coll1`. Only a single policy may be associated with a collection.
+The above CREATE collection command will associate a policy named `policy1` with the collection named `coll1`. Only a single policy may be associated with a collection.
Note that the collection-specific policy is applied *in addition to* the cluster policy, i.e., it is not an override but an augmentation. Therefore the collection will follow all conditions laid out in the cluster preferences, cluster policy, and the policy named `policy1`.
@@ -81,9 +82,11 @@ You can learn more about collection-specific policies in the section <<solrclou
== Triggers
-Now that we have an idea about how cluster management operations use policy and preferences help Solr keep the cluster balanced and stable, we can talk about when to invoke such operations. Triggers are used to watch for events such as a node joining or leaving the cluster. When the event happens, the trigger executes a set of `actions` that compute and execute a *plan* i.e. a set of operations to change the cluster so that the policy and preferences are respected.
+Now that we have an idea about how cluster management operations use policies and preferences help Solr keep the cluster balanced and stable, we can talk about when to invoke such operations.
+
+Triggers are used to watch for events such as a node joining or leaving the cluster. When the event happens, the trigger executes a set of actions that compute and execute a *plan*, i.e., a set of operations to change the cluster so that the policy and preferences are respected.
-The `autoAddReplicas` parameter passed to the create collection API in the quickstart section automatically creates a trigger that watches for a node going away. When the trigger fires, it executes a set of actions that compute and execute a plan to move all replicas hosted by the lost node to new nodes in the cluster. The target nodes are chosen based on the policy and preferences.
+The `autoAddReplicas` parameter passed with the CREATE Collection API command in the <<Quick Start: Automatically Adding Replicas,Quick Start>> section above automatically creates a trigger that watches for a node going away. When the trigger fires, it executes a set of actions that compute and execute a plan to move all replicas hosted by the lost node to new nodes in the cluster. The target nodes are chosen based on the policy and preferences.
You can learn more about Triggers in the section <<solrcloud-autoscaling-triggers.adoc#solrcloud-autoscaling-triggers,Autoscaling Triggers>>.
@@ -95,9 +98,9 @@ You can learn more about Trigger Actions in the section <<solrcloud-autoscaling-
== Listeners
-An AutoScaling *Listener* can be attached to a trigger. Solr calls the listener each time the trigger fires as well as before and after the actions performed by the trigger. Listeners are useful as a call back mechanism to perform tasks such as logging or informing external systems about events. For example, a listener is automatically added by Solr to each Trigger to log details of the trigger fire and actions to the `.system` collection.
+An Autoscaling *listener* can be attached to a trigger. Solr calls the listener each time the trigger fires as well as before and after the actions performed by the trigger. Listeners are useful as a call back mechanism to perform tasks such as logging or informing external systems about events. For example, a listener is automatically added by Solr to each trigger to log details of the trigger fire and actions to the `.system` collection.
-You can learn more about Listeners in the section <<solrcloud-autoscaling-policy-preferences.adoc#solrcloud-autoscaling-policy-preferences,AutoScaling Listeners>>.
+You can learn more about Listeners in the section <<solrcloud-autoscaling-policy-preferences.adoc#solrcloud-autoscaling-policy-preferences,Autoscaling Listeners>>.
== Autoscaling APIs
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/solrcloud-autoscaling-policy-preferences.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-policy-preferences.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-policy-preferences.adoc
index ad2e429..ce05228 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-policy-preferences.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-policy-preferences.adoc
@@ -26,17 +26,17 @@ The autoscaling policy and preferences are a set of rules and sorting preference
A preference is a hint to Solr on how to sort nodes based on their utilization. The default cluster preference is to sort by the total number of Solr cores (or replicas) hosted by a node. Therefore, by default, when selecting a node to add a replica, Solr can apply the preferences and choose the node with the least number of cores.
-More than one preferences can be added to break ties. For example, we may choose to use free disk space to break ties if the number of cores on two nodes are the same so the node with the higher free disk space can be chosen as the target of the cluster operation.
+More than one preference can be added to break ties. For example, we may choose to use free disk space to break ties if the number of cores on two nodes are the same. The node with the higher free disk space can be chosen as the target of the cluster operation.
-Each preference is of the following form:
+Each preference takes the following form:
[source,json]
{"<sort_order>":"<sort_param>", "precision":"<precision_val>"}
`sort_order`::
-The value can be either `maximize` or `minimize`. `minimize` sorts the nodes with least value as the least loaded. For example, `{"minimize":"cores"}` sorts the nodes with the least number of cores as the least loaded node. A sort order such as `{"maximize":"freedisk"}` sorts the nodes with maximum free disk space as the least loaded node.
+The value can be either `maximize` or `minimize`. Choose `minimize` to sort the nodes with least value as the least loaded. For example, `{"minimize":"cores"}` sorts the nodes with the least number of cores as the least loaded node. A sort order such as `{"maximize":"freedisk"}` sorts the nodes with maximum free disk space as the least loaded node.
+
-The objective of the system is to make every node the least loaded. So, in case of a `MOVEREPLICA` operation, it usually targets the _most loaded_ node and takes load off of it. In a sort of more loaded to less loaded, `minimize` is akin to sort in descending order and `maximize` is akin to sorting in ascending order.
+The objective of the system is to make every node the least loaded. So, in case of a `MOVEREPLICA` operation, it usually targets the _most loaded_ node and takes load off of it. In a sort of more loaded to less loaded, `minimize` is akin to sorting in descending order and `maximize` is akin to sorting in ascending order.
+
This is a required parameter.
@@ -53,7 +53,7 @@ Precision tells the system the minimum (absolute) difference between 2 values to
+
For example, a precision of 10 for `freedisk` means that two nodes whose free disk space is within 10GB of each other should be treated as equal for the purpose of sorting. This helps create ties without which specifying multiple preferences is not useful. This is an optional parameter whose value must be a positive integer. The maximum value of `precision` must be less than the maximum value of the `sort_value`, if any.
-See the section <<solrcloud-autoscaling-api.adoc#create-and-modify-cluster-preferences,set-cluster-preferences API>> for details on how to manage cluster preferences.
+See the section <<solrcloud-autoscaling-api.adoc#create-and-modify-cluster-preferences,Create and Modify Cluster Preferences>> for details on how to manage cluster preferences with the API.
=== Examples of Cluster Preferences
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/solrcloud-autoscaling-trigger-actions.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-trigger-actions.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-trigger-actions.adoc
index 89dfd17..06d0c6f 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-trigger-actions.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-trigger-actions.adoc
@@ -23,14 +23,14 @@ health and good use of resources.
Currently two implementations are provided: `ComputePlanAction` and `ExecutePlanAction`.
-== Compute plan action
+== Compute Plan Action
The `ComputePlanAction` uses the policy and preferences to calculate the optimal set of Collection API
commands which can re-balance the cluster in response to trigger events.
Currently, it has no configurable parameters.
-== Execute plan action
+== Execute Plan Action
The `ExecutePlanAction` executes the Collection API commands emitted by the `ComputePlanAction` against
the cluster using SolrJ. It executes the commands serially, waiting for each of them to succeed before
@@ -38,9 +38,9 @@ continuing with the next one.
Currently, it has no configurable parameters.
-If any one of the command fails, then the complete chain of actions are
-executed again at the next run of the trigger. If the Overseer node fails while ExecutePlanAction is running
-then the new overseer node will run the chain of actions for the same event again after waiting for any
+If any one of the commands fail, then the complete chain of actions are
+executed again at the next run of the trigger. If the Overseer node fails while `ExecutePlanAction` is running,
+then the new Overseer node will run the chain of actions for the same event again after waiting for any
running Collection API operations belonging to the event to complete.
-Please see <<solrcloud-autoscaling-fault-tolerance.adoc#solrcloud-autoscaling-fault-tolerance,SolrCloud AutoScaling Fault Tolerance>> for more details on fault tolerance within the Autoscaling framework.
\ No newline at end of file
+Please see <<solrcloud-autoscaling-fault-tolerance.adoc#solrcloud-autoscaling-fault-tolerance,SolrCloud Autoscaling Fault Tolerance>> for more details on fault tolerance within the autoscaling framework.
[08/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11552:
ref-guide tools should fail build if any page exists with #parents != 1
Posted by ab...@apache.org.
SOLR-11552: ref-guide tools should fail build if any page exists with #parents != 1
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/3be50df7
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/3be50df7
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/3be50df7
Branch: refs/heads/jira/solr-11285-sim
Commit: 3be50df7b6212e48f13a132d8abcd14a8dbd3255
Parents: 706f039
Author: Chris Hostetter <ho...@apache.org>
Authored: Thu Oct 26 10:37:29 2017 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Thu Oct 26 10:37:29 2017 -0700
----------------------------------------------------------------------
.../tools/BuildNavAndPDFBody.java | 42 +++++++++++++++++---
1 file changed, 36 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3be50df7/solr/solr-ref-guide/tools/BuildNavAndPDFBody.java
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/tools/BuildNavAndPDFBody.java b/solr/solr-ref-guide/tools/BuildNavAndPDFBody.java
index cb2361a..d62f538 100644
--- a/solr/solr-ref-guide/tools/BuildNavAndPDFBody.java
+++ b/solr/solr-ref-guide/tools/BuildNavAndPDFBody.java
@@ -67,9 +67,21 @@ public class BuildNavAndPDFBody {
if (null == mainPage) {
throw new RuntimeException("no main-page found with shortname: " + mainPageShortname);
}
- mainPage.buildKidsRecursive(allPages);
+ // NOTE: mainPage claims to be it's own parent to prevent anyone decendent from introducing a loop
+ mainPage.buildPageTreeRecursive(mainPage, allPages);
- // TODO: use depthFirstWalk to prune allPages to validate that we don't have any loops or orphan pages
+ { // validate that there are no orphan pages
+ int orphans = 0;
+ for (Page p : allPages.values()) {
+ if (null == p.getParent()) {
+ orphans++;
+ System.err.println("ERROR: Orphan page: " + p.file);
+ }
+ }
+ if (0 != orphans) {
+ throw new RuntimeException("Found " + orphans + " orphan pages (which are not in the 'page-children' attribute of any other pages)");
+ }
+ }
// Build up the PDF file,
@@ -213,7 +225,14 @@ public class BuildNavAndPDFBody {
public final String permalink;
public final List<String> kidShortnames;
/** NOTE: not populated on construction
- * @see #buildKidsRecursive
+ * @see #buildPageTreeRecursive
+ */
+ private Page parent;
+ public Page getParent() {
+ return parent;
+ }
+ /** NOTE: not populated on construction
+ * @see #buildPageTreeRecursive
*/
public final List<Page> kids;
private final List<Page> mutableKids;
@@ -258,15 +277,26 @@ public class BuildNavAndPDFBody {
this.kids = Collections.<Page>unmodifiableList(mutableKids);
}
- /** Recursively populates {@link #kids} from {@link #kidShortnames} via the <code>allPages</code> Map */
- public void buildKidsRecursive(Map<String,Page> allPages) {
+ /**
+ * Recursively sets {@link #getParent} and populates {@link #kids} from {@link #kidShortnames}
+ * via the <code>allPages</code> Map
+ */
+ public void buildPageTreeRecursive(Page parent, Map<String,Page> allPages) {
+ if (null != parent) {
+ if (null != this.parent) {
+ // as long as we also check (later) that every page has a parent, this check (prior to recusion)
+ // also ensures we never have any loops
+ throw new RuntimeException(file.getName() + " is listed as the child of (at least) 2 pages: '" + parent.shortname + "' and '" + this.parent.shortname + "'");
+ }
+ this.parent = parent;
+ }
for (String kidShortname : kidShortnames) {
Page kid = allPages.get(kidShortname);
if (null == kid) {
throw new RuntimeException("Unable to locate " + kidShortname + "; child of " + shortname + "("+file.toString());
}
mutableKids.add(kid);
- kid.buildKidsRecursive(allPages);
+ kid.buildPageTreeRecursive(this, allPages);
}
}
[30/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11541:
refguide: purge unneccessary page-shortname and page-permalink attributes
from all source docs
Posted by ab...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/meta-docs/asciidoc-syntax.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/meta-docs/asciidoc-syntax.adoc b/solr/solr-ref-guide/src/meta-docs/asciidoc-syntax.adoc
index 0161225..8a34d54 100644
--- a/solr/solr-ref-guide/src/meta-docs/asciidoc-syntax.adoc
+++ b/solr/solr-ref-guide/src/meta-docs/asciidoc-syntax.adoc
@@ -156,25 +156,14 @@ To link to _another page_ or a section on another page, you must refer to the fu
Unfortunately, when you want to refer the reader to another page without deep-linking to a section, you cannot simply put the other file name in angle brackets and call it a day. This is due to the PDF conversion - once all the pages are combined into one big page for one big PDF, the lack of a specific reference causes inter-page links to fail.
-So, *you must always link to a specific section*. If all you want is a reference to the top of another page, you can use the `page-shortname` attribute found at the top of every page as your anchor reference.
+So, *you must always link to a specific section*. If all you want is a reference to the top of another page, you can use the implicit `id` of the page -- the filename w/o the `.adoc` extension -- as your anchor reference.
Example::
-The file `upgrading-solr.adoc` has a `page-shortname` at the top that looks like this:
-+
-[source]
-----
-= Upgrading Solr
-:page-shortname: upgrading-solr
-:page-permalink: upgrading-solr.html
-----
-+
-To construct a link to this page, we need to refer to the file name (`upgrading-solr.adoc`), then use the `page-shortname` as our anchor reference. As in:
+To construct a link to the `upgrading-solr.adoc` page, we need to refer to the file name (`upgrading-solr.adoc`), then use the page id (`upgrading-solr`) as the anchor reference. As in:
+
[source]
For more information about upgrades, see <<upgrading-solr.adoc#upgrading-solr>>.
-TIP: As of July 2017, all pages have a `page-shortname` that is equivalent to the filename (without the `.adoc` part).
-
==== Link to a Section on Another Page
Linking to a section is the same conceptually as linking to the top of a page, you just need to take a little extra care to format the anchor ID in your link reference properly.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/meta-docs/jekyll.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/meta-docs/jekyll.adoc b/solr/solr-ref-guide/src/meta-docs/jekyll.adoc
index 264a5cd..adc401a 100644
--- a/solr/solr-ref-guide/src/meta-docs/jekyll.adoc
+++ b/solr/solr-ref-guide/src/meta-docs/jekyll.adoc
@@ -49,8 +49,6 @@ Many guides to Jekyll also say that defining the layout in the front matter is r
The Solr Ref Guide uses the front matter to define some custom attributes on a per page basis:
-* `page-shortname` - uniquely identifying the page
-* `page-permalink` - permanent URL of a page,
* `page-children` - ordered list of child pages, this is used to build the site navigation menu that appears to the left of each page's content (and to order the pages in the PDF)
There are also some optional custom attributes that can be defined in pages to affect the Table of Contents presentation in jekyll:
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/metrics-reporting.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/metrics-reporting.adoc b/solr/solr-ref-guide/src/metrics-reporting.adoc
index f7d173c..5454712 100644
--- a/solr/solr-ref-guide/src/metrics-reporting.adoc
+++ b/solr/solr-ref-guide/src/metrics-reporting.adoc
@@ -1,6 +1,4 @@
= Metrics Reporting
-:page-shortname: metrics-reporting
-:page-permalink: metrics-reporting.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/monitoring-solr.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/monitoring-solr.adoc b/solr/solr-ref-guide/src/monitoring-solr.adoc
index 39d6f89..0576e53 100644
--- a/solr/solr-ref-guide/src/monitoring-solr.adoc
+++ b/solr/solr-ref-guide/src/monitoring-solr.adoc
@@ -1,6 +1,4 @@
= Monitoring Solr
-:page-shortname: monitoring-solr
-:page-permalink: monitoring-solr.html
:page-children: metrics-reporting, mbean-request-handler, configuring-logging, using-jmx-with-solr, performance-statistics-reference
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/morelikethis.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/morelikethis.adoc b/solr/solr-ref-guide/src/morelikethis.adoc
index a5bdb4f..d965e9d 100644
--- a/solr/solr-ref-guide/src/morelikethis.adoc
+++ b/solr/solr-ref-guide/src/morelikethis.adoc
@@ -1,6 +1,4 @@
= MoreLikeThis
-:page-shortname: morelikethis
-:page-permalink: morelikethis.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/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 fb50bb7..fe91094 100644
--- a/solr/solr-ref-guide/src/near-real-time-searching.adoc
+++ b/solr/solr-ref-guide/src/near-real-time-searching.adoc
@@ -1,6 +1,4 @@
= Near Real Time Searching
-:page-shortname: near-real-time-searching
-:page-permalink: near-real-time-searching.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/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 67385a6..2d351dc 100644
--- a/solr/solr-ref-guide/src/other-parsers.adoc
+++ b/solr/solr-ref-guide/src/other-parsers.adoc
@@ -1,6 +1,4 @@
= Other Parsers
-:page-shortname: other-parsers
-:page-permalink: other-parsers.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/other-schema-elements.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/other-schema-elements.adoc b/solr/solr-ref-guide/src/other-schema-elements.adoc
index cd39401..e58f822 100644
--- a/solr/solr-ref-guide/src/other-schema-elements.adoc
+++ b/solr/solr-ref-guide/src/other-schema-elements.adoc
@@ -1,6 +1,4 @@
= Other Schema Elements
-:page-shortname: other-schema-elements
-:page-permalink: other-schema-elements.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/overview-of-documents-fields-and-schema-design.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/overview-of-documents-fields-and-schema-design.adoc b/solr/solr-ref-guide/src/overview-of-documents-fields-and-schema-design.adoc
index ea3c7c5..bdc3ff2 100644
--- a/solr/solr-ref-guide/src/overview-of-documents-fields-and-schema-design.adoc
+++ b/solr/solr-ref-guide/src/overview-of-documents-fields-and-schema-design.adoc
@@ -1,6 +1,4 @@
= Overview of Documents, Fields, and Schema Design
-:page-shortname: overview-of-documents-fields-and-schema-design
-:page-permalink: overview-of-documents-fields-and-schema-design.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/overview-of-searching-in-solr.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/overview-of-searching-in-solr.adoc b/solr/solr-ref-guide/src/overview-of-searching-in-solr.adoc
index 04fa6f1..4de2b39 100644
--- a/solr/solr-ref-guide/src/overview-of-searching-in-solr.adoc
+++ b/solr/solr-ref-guide/src/overview-of-searching-in-solr.adoc
@@ -1,6 +1,4 @@
= Overview of Searching in Solr
-:page-shortname: overview-of-searching-in-solr
-:page-permalink: overview-of-searching-in-solr.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/overview-of-the-solr-admin-ui.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/overview-of-the-solr-admin-ui.adoc b/solr/solr-ref-guide/src/overview-of-the-solr-admin-ui.adoc
index fea6c69..c289778 100644
--- a/solr/solr-ref-guide/src/overview-of-the-solr-admin-ui.adoc
+++ b/solr/solr-ref-guide/src/overview-of-the-solr-admin-ui.adoc
@@ -1,6 +1,4 @@
= Overview of the Solr Admin UI
-:page-shortname: overview-of-the-solr-admin-ui
-:page-permalink: overview-of-the-solr-admin-ui.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/pagination-of-results.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/pagination-of-results.adoc b/solr/solr-ref-guide/src/pagination-of-results.adoc
index 130a6c7..505613d 100644
--- a/solr/solr-ref-guide/src/pagination-of-results.adoc
+++ b/solr/solr-ref-guide/src/pagination-of-results.adoc
@@ -1,6 +1,4 @@
= Pagination of Results
-:page-shortname: pagination-of-results
-:page-permalink: pagination-of-results.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/parallel-sql-interface.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/parallel-sql-interface.adoc b/solr/solr-ref-guide/src/parallel-sql-interface.adoc
index 79544d7..a6875b6 100644
--- a/solr/solr-ref-guide/src/parallel-sql-interface.adoc
+++ b/solr/solr-ref-guide/src/parallel-sql-interface.adoc
@@ -1,6 +1,4 @@
= Parallel SQL Interface
-:page-shortname: parallel-sql-interface
-:page-permalink: parallel-sql-interface.html
:page-children: solr-jdbc-dbvisualizer, solr-jdbc-squirrel-sql, solr-jdbc-apache-zeppelin, solr-jdbc-python-jython, solr-jdbc-r
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/parameter-reference.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/parameter-reference.adoc b/solr/solr-ref-guide/src/parameter-reference.adoc
index a511bed..9a3e9a0 100644
--- a/solr/solr-ref-guide/src/parameter-reference.adoc
+++ b/solr/solr-ref-guide/src/parameter-reference.adoc
@@ -1,6 +1,4 @@
= Parameter Reference
-:page-shortname: parameter-reference
-:page-permalink: parameter-reference.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/performance-statistics-reference.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/performance-statistics-reference.adoc b/solr/solr-ref-guide/src/performance-statistics-reference.adoc
index f89793b..cf948c7 100644
--- a/solr/solr-ref-guide/src/performance-statistics-reference.adoc
+++ b/solr/solr-ref-guide/src/performance-statistics-reference.adoc
@@ -1,6 +1,4 @@
= Performance Statistics Reference
-:page-shortname: performance-statistics-reference
-:page-permalink: performance-statistics-reference.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/phonetic-matching.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/phonetic-matching.adoc b/solr/solr-ref-guide/src/phonetic-matching.adoc
index 6cd419c..e8b54d9 100644
--- a/solr/solr-ref-guide/src/phonetic-matching.adoc
+++ b/solr/solr-ref-guide/src/phonetic-matching.adoc
@@ -1,6 +1,4 @@
= Phonetic Matching
-:page-shortname: phonetic-matching
-:page-permalink: phonetic-matching.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/ping.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/ping.adoc b/solr/solr-ref-guide/src/ping.adoc
index e9b13d2..9adfe12 100644
--- a/solr/solr-ref-guide/src/ping.adoc
+++ b/solr/solr-ref-guide/src/ping.adoc
@@ -1,6 +1,4 @@
= Ping
-:page-shortname: ping
-:page-permalink: ping.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/plugins-stats-screen.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/plugins-stats-screen.adoc b/solr/solr-ref-guide/src/plugins-stats-screen.adoc
index 2f221dc..76c8b06 100644
--- a/solr/solr-ref-guide/src/plugins-stats-screen.adoc
+++ b/solr/solr-ref-guide/src/plugins-stats-screen.adoc
@@ -1,6 +1,4 @@
= Plugins & Stats Screen
-:page-shortname: plugins-stats-screen
-:page-permalink: plugins-stats-screen.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/post-tool.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/post-tool.adoc b/solr/solr-ref-guide/src/post-tool.adoc
index 1cbaa92..c692995 100644
--- a/solr/solr-ref-guide/src/post-tool.adoc
+++ b/solr/solr-ref-guide/src/post-tool.adoc
@@ -1,6 +1,4 @@
= Post Tool
-:page-shortname: post-tool
-:page-permalink: post-tool.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/putting-the-pieces-together.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/putting-the-pieces-together.adoc b/solr/solr-ref-guide/src/putting-the-pieces-together.adoc
index af6596a..1c9e966 100644
--- a/solr/solr-ref-guide/src/putting-the-pieces-together.adoc
+++ b/solr/solr-ref-guide/src/putting-the-pieces-together.adoc
@@ -1,6 +1,4 @@
= Putting the Pieces Together
-:page-shortname: putting-the-pieces-together
-:page-permalink: putting-the-pieces-together.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/query-re-ranking.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/query-re-ranking.adoc b/solr/solr-ref-guide/src/query-re-ranking.adoc
index 64ffc94..c3d59d1 100644
--- a/solr/solr-ref-guide/src/query-re-ranking.adoc
+++ b/solr/solr-ref-guide/src/query-re-ranking.adoc
@@ -1,6 +1,4 @@
= Query Re-Ranking
-:page-shortname: query-re-ranking
-:page-permalink: query-re-ranking.html
:page-children: learning-to-rank
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/query-screen.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/query-screen.adoc b/solr/solr-ref-guide/src/query-screen.adoc
index 3ddffc1..4f66170 100644
--- a/solr/solr-ref-guide/src/query-screen.adoc
+++ b/solr/solr-ref-guide/src/query-screen.adoc
@@ -1,6 +1,4 @@
= Query Screen
-:page-shortname: query-screen
-:page-permalink: query-screen.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/query-settings-in-solrconfig.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/query-settings-in-solrconfig.adoc b/solr/solr-ref-guide/src/query-settings-in-solrconfig.adoc
index 1f5d725..31185b6 100644
--- a/solr/solr-ref-guide/src/query-settings-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/query-settings-in-solrconfig.adoc
@@ -1,6 +1,4 @@
= Query Settings in SolrConfig
-:page-shortname: query-settings-in-solrconfig
-:page-permalink: query-settings-in-solrconfig.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/query-syntax-and-parsing.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/query-syntax-and-parsing.adoc b/solr/solr-ref-guide/src/query-syntax-and-parsing.adoc
index 0e9fe04..04bcdd8 100644
--- a/solr/solr-ref-guide/src/query-syntax-and-parsing.adoc
+++ b/solr/solr-ref-guide/src/query-syntax-and-parsing.adoc
@@ -1,6 +1,4 @@
= Query Syntax and Parsing
-:page-shortname: query-syntax-and-parsing
-:page-permalink: query-syntax-and-parsing.html
:page-children: common-query-parameters, the-standard-query-parser, the-dismax-query-parser, the-extended-dismax-query-parser, function-queries, local-parameters-in-queries, other-parsers
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/realtime-get.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/realtime-get.adoc b/solr/solr-ref-guide/src/realtime-get.adoc
index 4d97455..51d96ea 100644
--- a/solr/solr-ref-guide/src/realtime-get.adoc
+++ b/solr/solr-ref-guide/src/realtime-get.adoc
@@ -1,6 +1,4 @@
= RealTime Get
-:page-shortname: realtime-get
-:page-permalink: realtime-get.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/relevance.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/relevance.adoc b/solr/solr-ref-guide/src/relevance.adoc
index 63628d2..8aecc25 100644
--- a/solr/solr-ref-guide/src/relevance.adoc
+++ b/solr/solr-ref-guide/src/relevance.adoc
@@ -1,6 +1,4 @@
= Relevance
-:page-shortname: relevance
-:page-permalink: relevance.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/replication-screen.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/replication-screen.adoc b/solr/solr-ref-guide/src/replication-screen.adoc
index 6dd649f..2637bd9 100644
--- a/solr/solr-ref-guide/src/replication-screen.adoc
+++ b/solr/solr-ref-guide/src/replication-screen.adoc
@@ -1,6 +1,4 @@
= Replication Screen
-:page-shortname: replication-screen
-:page-permalink: replication-screen.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/request-parameters-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/request-parameters-api.adoc b/solr/solr-ref-guide/src/request-parameters-api.adoc
index deaf2fa..ced4f21 100644
--- a/solr/solr-ref-guide/src/request-parameters-api.adoc
+++ b/solr/solr-ref-guide/src/request-parameters-api.adoc
@@ -1,6 +1,4 @@
= Request Parameters API
-:page-shortname: request-parameters-api
-:page-permalink: request-parameters-api.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/requestdispatcher-in-solrconfig.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/requestdispatcher-in-solrconfig.adoc b/solr/solr-ref-guide/src/requestdispatcher-in-solrconfig.adoc
index c2a33e5..aa59033 100644
--- a/solr/solr-ref-guide/src/requestdispatcher-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/requestdispatcher-in-solrconfig.adoc
@@ -1,6 +1,4 @@
= RequestDispatcher in SolrConfig
-:page-shortname: requestdispatcher-in-solrconfig
-:page-permalink: requestdispatcher-in-solrconfig.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/requesthandlers-and-searchcomponents-in-solrconfig.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/requesthandlers-and-searchcomponents-in-solrconfig.adoc b/solr/solr-ref-guide/src/requesthandlers-and-searchcomponents-in-solrconfig.adoc
index f043e84..c3f18a3 100644
--- a/solr/solr-ref-guide/src/requesthandlers-and-searchcomponents-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/requesthandlers-and-searchcomponents-in-solrconfig.adoc
@@ -1,6 +1,4 @@
= RequestHandlers and SearchComponents in SolrConfig
-:page-shortname: requesthandlers-and-searchcomponents-in-solrconfig
-:page-permalink: requesthandlers-and-searchcomponents-in-solrconfig.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/response-writers.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/response-writers.adoc b/solr/solr-ref-guide/src/response-writers.adoc
index acdc617..15d1154 100644
--- a/solr/solr-ref-guide/src/response-writers.adoc
+++ b/solr/solr-ref-guide/src/response-writers.adoc
@@ -1,6 +1,4 @@
= Response Writers
-:page-shortname: response-writers
-:page-permalink: response-writers.html
:page-children: velocity-response-writer
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/result-clustering.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/result-clustering.adoc b/solr/solr-ref-guide/src/result-clustering.adoc
index fd83d4b..2ad9ff5 100644
--- a/solr/solr-ref-guide/src/result-clustering.adoc
+++ b/solr/solr-ref-guide/src/result-clustering.adoc
@@ -1,6 +1,4 @@
= Result Clustering
-:page-shortname: result-clustering
-:page-permalink: result-clustering.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/result-grouping.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/result-grouping.adoc b/solr/solr-ref-guide/src/result-grouping.adoc
index 8a51e12..02b5875 100644
--- a/solr/solr-ref-guide/src/result-grouping.adoc
+++ b/solr/solr-ref-guide/src/result-grouping.adoc
@@ -1,6 +1,4 @@
= Result Grouping
-:page-shortname: result-grouping
-:page-permalink: result-grouping.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/rule-based-authorization-plugin.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/rule-based-authorization-plugin.adoc b/solr/solr-ref-guide/src/rule-based-authorization-plugin.adoc
index 756b57e..d86097a 100644
--- a/solr/solr-ref-guide/src/rule-based-authorization-plugin.adoc
+++ b/solr/solr-ref-guide/src/rule-based-authorization-plugin.adoc
@@ -1,6 +1,4 @@
= Rule-Based Authorization Plugin
-:page-shortname: rule-based-authorization-plugin
-:page-permalink: rule-based-authorization-plugin.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/rule-based-replica-placement.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/rule-based-replica-placement.adoc b/solr/solr-ref-guide/src/rule-based-replica-placement.adoc
index 8dfe7d3..7c0953b 100644
--- a/solr/solr-ref-guide/src/rule-based-replica-placement.adoc
+++ b/solr/solr-ref-guide/src/rule-based-replica-placement.adoc
@@ -1,6 +1,4 @@
= Rule-based Replica Placement
-:page-shortname: rule-based-replica-placement
-:page-permalink: rule-based-replica-placement.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/running-solr-on-hdfs.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/running-solr-on-hdfs.adoc b/solr/solr-ref-guide/src/running-solr-on-hdfs.adoc
index 70642d4..e0cc891 100644
--- a/solr/solr-ref-guide/src/running-solr-on-hdfs.adoc
+++ b/solr/solr-ref-guide/src/running-solr-on-hdfs.adoc
@@ -1,6 +1,4 @@
= Running Solr on HDFS
-:page-shortname: running-solr-on-hdfs
-:page-permalink: running-solr-on-hdfs.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/running-your-analyzer.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/running-your-analyzer.adoc b/solr/solr-ref-guide/src/running-your-analyzer.adoc
index 3918f9e..bcbfe53 100644
--- a/solr/solr-ref-guide/src/running-your-analyzer.adoc
+++ b/solr/solr-ref-guide/src/running-your-analyzer.adoc
@@ -1,6 +1,4 @@
= Running Your Analyzer
-:page-shortname: running-your-analyzer
-:page-permalink: running-your-analyzer.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/schema-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/schema-api.adoc b/solr/solr-ref-guide/src/schema-api.adoc
index 48ab0dd..a6094d4 100644
--- a/solr/solr-ref-guide/src/schema-api.adoc
+++ b/solr/solr-ref-guide/src/schema-api.adoc
@@ -1,6 +1,4 @@
= Schema API
-:page-shortname: schema-api
-:page-permalink: schema-api.html
:page-tocclass: right
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/schema-browser-screen.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/schema-browser-screen.adoc b/solr/solr-ref-guide/src/schema-browser-screen.adoc
index e797255..b5d0acd 100644
--- a/solr/solr-ref-guide/src/schema-browser-screen.adoc
+++ b/solr/solr-ref-guide/src/schema-browser-screen.adoc
@@ -1,6 +1,4 @@
= Schema Browser Screen
-:page-shortname: schema-browser-screen
-:page-permalink: schema-browser-screen.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/schema-factory-definition-in-solrconfig.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/schema-factory-definition-in-solrconfig.adoc b/solr/solr-ref-guide/src/schema-factory-definition-in-solrconfig.adoc
index ff62906..cb649f7 100644
--- a/solr/solr-ref-guide/src/schema-factory-definition-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/schema-factory-definition-in-solrconfig.adoc
@@ -1,6 +1,4 @@
= Schema Factory Definition in SolrConfig
-:page-shortname: schema-factory-definition-in-solrconfig
-:page-permalink: schema-factory-definition-in-solrconfig.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/schemaless-mode.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/schemaless-mode.adoc b/solr/solr-ref-guide/src/schemaless-mode.adoc
index a33ba92..384e866 100644
--- a/solr/solr-ref-guide/src/schemaless-mode.adoc
+++ b/solr/solr-ref-guide/src/schemaless-mode.adoc
@@ -1,6 +1,4 @@
= Schemaless Mode
-:page-shortname: schemaless-mode
-:page-permalink: schemaless-mode.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/searching.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/searching.adoc b/solr/solr-ref-guide/src/searching.adoc
index 62d3216..6b9c49c 100644
--- a/solr/solr-ref-guide/src/searching.adoc
+++ b/solr/solr-ref-guide/src/searching.adoc
@@ -1,6 +1,4 @@
= Searching
-:page-shortname: searching
-:page-permalink: searching.html
:page-children: overview-of-searching-in-solr, velocity-search-ui, relevance, query-syntax-and-parsing, json-request-api, faceting, highlighting, spell-checking, query-re-ranking, transforming-result-documents, suggester, morelikethis, pagination-of-results, collapse-and-expand-results, result-grouping, result-clustering, spatial-search, the-terms-component, the-term-vector-component, the-stats-component, the-query-elevation-component, response-writers, near-real-time-searching, realtime-get, exporting-result-sets, streaming-expressions, parallel-sql-interface
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/securing-solr.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/securing-solr.adoc b/solr/solr-ref-guide/src/securing-solr.adoc
index 72f67f9..fb81e54 100644
--- a/solr/solr-ref-guide/src/securing-solr.adoc
+++ b/solr/solr-ref-guide/src/securing-solr.adoc
@@ -1,6 +1,4 @@
= Securing Solr
-:page-shortname: securing-solr
-:page-permalink: securing-solr.html
:page-children: authentication-and-authorization-plugins, enabling-ssl
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/segments-info.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/segments-info.adoc b/solr/solr-ref-guide/src/segments-info.adoc
index b0d72fe..8e38dcb 100644
--- a/solr/solr-ref-guide/src/segments-info.adoc
+++ b/solr/solr-ref-guide/src/segments-info.adoc
@@ -1,6 +1,4 @@
= Segments Info
-:page-shortname: segments-info
-:page-permalink: segments-info.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/setting-up-an-external-zookeeper-ensemble.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/setting-up-an-external-zookeeper-ensemble.adoc b/solr/solr-ref-guide/src/setting-up-an-external-zookeeper-ensemble.adoc
index a5dab0e..1834df5 100644
--- a/solr/solr-ref-guide/src/setting-up-an-external-zookeeper-ensemble.adoc
+++ b/solr/solr-ref-guide/src/setting-up-an-external-zookeeper-ensemble.adoc
@@ -1,6 +1,4 @@
= Setting Up an External ZooKeeper Ensemble
-:page-shortname: setting-up-an-external-zookeeper-ensemble
-:page-permalink: setting-up-an-external-zookeeper-ensemble.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/shards-and-indexing-data-in-solrcloud.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/shards-and-indexing-data-in-solrcloud.adoc b/solr/solr-ref-guide/src/shards-and-indexing-data-in-solrcloud.adoc
index ff8fadd..81c6f86 100644
--- a/solr/solr-ref-guide/src/shards-and-indexing-data-in-solrcloud.adoc
+++ b/solr/solr-ref-guide/src/shards-and-indexing-data-in-solrcloud.adoc
@@ -1,6 +1,4 @@
= Shards and Indexing Data in SolrCloud
-:page-shortname: shards-and-indexing-data-in-solrcloud
-:page-permalink: shards-and-indexing-data-in-solrcloud.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solr-configuration-files.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-configuration-files.adoc b/solr/solr-ref-guide/src/solr-configuration-files.adoc
index 98edb93..1815f45 100644
--- a/solr/solr-ref-guide/src/solr-configuration-files.adoc
+++ b/solr/solr-ref-guide/src/solr-configuration-files.adoc
@@ -1,6 +1,4 @@
= Solr Configuration Files
-:page-shortname: solr-configuration-files
-:page-permalink: solr-configuration-files.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/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 5665a96..8ca14ea 100644
--- a/solr/solr-ref-guide/src/solr-control-script-reference.adoc
+++ b/solr/solr-ref-guide/src/solr-control-script-reference.adoc
@@ -1,6 +1,4 @@
= Solr Control Script Reference
-:page-shortname: solr-control-script-reference
-:page-permalink: solr-control-script-reference.html
:page-tocclass: right
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solr-cores-and-solr-xml.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-cores-and-solr-xml.adoc b/solr/solr-ref-guide/src/solr-cores-and-solr-xml.adoc
index 4fb477f..07d8c53 100644
--- a/solr/solr-ref-guide/src/solr-cores-and-solr-xml.adoc
+++ b/solr/solr-ref-guide/src/solr-cores-and-solr-xml.adoc
@@ -1,6 +1,4 @@
= Solr Cores and solr.xml
-:page-shortname: solr-cores-and-solr-xml
-:page-permalink: solr-cores-and-solr-xml.html
:page-children: format-of-solr-xml, defining-core-properties, coreadmin-api, config-sets
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solr-field-types.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-field-types.adoc b/solr/solr-ref-guide/src/solr-field-types.adoc
index 811511e..7bf3482 100644
--- a/solr/solr-ref-guide/src/solr-field-types.adoc
+++ b/solr/solr-ref-guide/src/solr-field-types.adoc
@@ -1,6 +1,4 @@
= Solr Field Types
-:page-shortname: solr-field-types
-:page-permalink: solr-field-types.html
:page-children: field-type-definitions-and-properties, field-types-included-with-solr, working-with-currencies-and-exchange-rates, working-with-dates, working-with-enum-fields, working-with-external-files-and-processes, field-properties-by-use-case
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solr-glossary.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-glossary.adoc b/solr/solr-ref-guide/src/solr-glossary.adoc
index 859361a..a451925 100644
--- a/solr/solr-ref-guide/src/solr-glossary.adoc
+++ b/solr/solr-ref-guide/src/solr-glossary.adoc
@@ -1,6 +1,4 @@
= Solr Glossary
-:page-shortname: solr-glossary
-:page-permalink: solr-glossary.html
:page-toc: false
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solr-jdbc-apache-zeppelin.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-jdbc-apache-zeppelin.adoc b/solr/solr-ref-guide/src/solr-jdbc-apache-zeppelin.adoc
index 82e92a8..ead79b9 100644
--- a/solr/solr-ref-guide/src/solr-jdbc-apache-zeppelin.adoc
+++ b/solr/solr-ref-guide/src/solr-jdbc-apache-zeppelin.adoc
@@ -1,6 +1,4 @@
= Solr JDBC - Apache Zeppelin
-:page-shortname: solr-jdbc-apache-zeppelin
-:page-permalink: solr-jdbc-apache-zeppelin.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solr-jdbc-dbvisualizer.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-jdbc-dbvisualizer.adoc b/solr/solr-ref-guide/src/solr-jdbc-dbvisualizer.adoc
index 8b9b2b2..107a3d9 100644
--- a/solr/solr-ref-guide/src/solr-jdbc-dbvisualizer.adoc
+++ b/solr/solr-ref-guide/src/solr-jdbc-dbvisualizer.adoc
@@ -1,6 +1,4 @@
= Solr JDBC - DbVisualizer
-:page-shortname: solr-jdbc-dbvisualizer
-:page-permalink: solr-jdbc-dbvisualizer.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solr-jdbc-python-jython.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-jdbc-python-jython.adoc b/solr/solr-ref-guide/src/solr-jdbc-python-jython.adoc
index 2cdafed..26f4a87 100644
--- a/solr/solr-ref-guide/src/solr-jdbc-python-jython.adoc
+++ b/solr/solr-ref-guide/src/solr-jdbc-python-jython.adoc
@@ -1,6 +1,4 @@
= Solr JDBC - Python/Jython
-:page-shortname: solr-jdbc-python-jython
-:page-permalink: solr-jdbc-python-jython.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solr-jdbc-r.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-jdbc-r.adoc b/solr/solr-ref-guide/src/solr-jdbc-r.adoc
index 0809763..e43dde4 100644
--- a/solr/solr-ref-guide/src/solr-jdbc-r.adoc
+++ b/solr/solr-ref-guide/src/solr-jdbc-r.adoc
@@ -1,6 +1,4 @@
= Solr JDBC - R
-:page-shortname: solr-jdbc-r
-:page-permalink: solr-jdbc-r.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solr-jdbc-squirrel-sql.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-jdbc-squirrel-sql.adoc b/solr/solr-ref-guide/src/solr-jdbc-squirrel-sql.adoc
index 607aa3d..acaa0d7 100644
--- a/solr/solr-ref-guide/src/solr-jdbc-squirrel-sql.adoc
+++ b/solr/solr-ref-guide/src/solr-jdbc-squirrel-sql.adoc
@@ -1,6 +1,4 @@
= Solr JDBC - SQuirreL SQL
-:page-shortname: solr-jdbc-squirrel-sql
-:page-permalink: solr-jdbc-squirrel-sql.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solr-plugins.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-plugins.adoc b/solr/solr-ref-guide/src/solr-plugins.adoc
index 58cc81b..3433f84 100644
--- a/solr/solr-ref-guide/src/solr-plugins.adoc
+++ b/solr/solr-ref-guide/src/solr-plugins.adoc
@@ -1,6 +1,4 @@
= Solr Plugins
-:page-shortname: solr-plugins
-:page-permalink: solr-plugins.html
:page-children: adding-custom-plugins-in-solrcloud-mode
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solr-system-requirements.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-system-requirements.adoc b/solr/solr-ref-guide/src/solr-system-requirements.adoc
index 77230c7..05b2d46 100644
--- a/solr/solr-ref-guide/src/solr-system-requirements.adoc
+++ b/solr/solr-ref-guide/src/solr-system-requirements.adoc
@@ -1,6 +1,4 @@
= Solr System Requirements
-:page-shortname: solr-system-requirements
-:page-permalink: solr-system-requirements.html
:page-toc: false
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solr-tutorial.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-tutorial.adoc b/solr/solr-ref-guide/src/solr-tutorial.adoc
index 34cfb3d..089c5e5 100644
--- a/solr/solr-ref-guide/src/solr-tutorial.adoc
+++ b/solr/solr-ref-guide/src/solr-tutorial.adoc
@@ -1,6 +1,4 @@
= Solr Tutorial
-:page-shortname: solr-tutorial
-:page-permalink: solr-tutorial.html
:page-tocclass: right
:experimental:
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solr-upgrade-notes.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solr-upgrade-notes.adoc b/solr/solr-ref-guide/src/solr-upgrade-notes.adoc
index 752c1e0..30d27bf 100644
--- a/solr/solr-ref-guide/src/solr-upgrade-notes.adoc
+++ b/solr/solr-ref-guide/src/solr-upgrade-notes.adoc
@@ -1,6 +1,4 @@
= Solr Upgrade Notes
-:page-shortname: solr-upgrade-notes
-:page-permalink: solr-upgrade-notes.html
:page-children: major-changes-in-solr-7, major-changes-from-solr-5-to-solr-6
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc
index fc47a66..9da30d7 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc
@@ -1,6 +1,4 @@
= Autoscaling API
-:page-shortname: solrcloud-autoscaling-api
-:page-permalink: solrcloud-autoscaling-api.html
:page-toclevels: 2
:page-tocclass: right
// Licensed to the Apache Software Foundation (ASF) under one
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc
index e0e66f5..87e50f5 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc
@@ -1,6 +1,4 @@
= SolrCloud Autoscaling Automatically Adding Replicas
-:page-shortname: solrcloud-autoscaling-auto-add-replicas
-:page-permalink: solrcloud-autoscaling-auto-add-replicas.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud-autoscaling-fault-tolerance.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-fault-tolerance.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-fault-tolerance.adoc
index 9f0b816..67f889c 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-fault-tolerance.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-fault-tolerance.adoc
@@ -1,6 +1,4 @@
= SolrCloud Autoscaling Fault Tolerance
-:page-shortname: solrcloud-autoscaling-fault-tolerance
-:page-permalink: solrcloud-autoscaling-fault-tolerance.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc
index ce96b94..f764465 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-listeners.adoc
@@ -1,6 +1,4 @@
= SolrCloud Autoscaling Listeners
-:page-shortname: solrcloud-autoscaling-listeners
-:page-permalink: solrcloud-autoscaling-listeners.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud-autoscaling-overview.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-overview.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-overview.adoc
index 753bb54..de4d708 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-overview.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-overview.adoc
@@ -1,6 +1,4 @@
= Overview of SolrCloud Autoscaling
-:page-shortname: solrcloud-autoscaling-overview
-:page-permalink: solrcloud-autoscaling-overview.html
:page-toclevels: 1
:page-tocclass: right
// Licensed to the Apache Software Foundation (ASF) under one
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud-autoscaling-policy-preferences.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-policy-preferences.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-policy-preferences.adoc
index ce05228..c38b2d8 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-policy-preferences.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-policy-preferences.adoc
@@ -1,6 +1,4 @@
= Autoscaling Policy and Preferences
-:page-shortname: solrcloud-autoscaling-policy-preferences
-:page-permalink: solrcloud-autoscaling-policy-preferences.html
:page-toclevels: 2
:page-tocclass: right
// Licensed to the Apache Software Foundation (ASF) under one
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud-autoscaling-trigger-actions.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-trigger-actions.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-trigger-actions.adoc
index 06d0c6f..d29568f 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-trigger-actions.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-trigger-actions.adoc
@@ -1,6 +1,4 @@
= SolrCloud Autoscaling Trigger Actions
-:page-shortname: solrcloud-autoscaling-trigger-actions
-:page-permalink: solrcloud-autoscaling-trigger-actions.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud-autoscaling-triggers.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-triggers.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-triggers.adoc
index d5a779a..70cbb5f 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-triggers.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-triggers.adoc
@@ -1,6 +1,4 @@
= SolrCloud Autoscaling Triggers
-:page-shortname: solrcloud-autoscaling-triggers
-:page-permalink: solrcloud-autoscaling-triggers.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc
index b9a66fd..f26b46b 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc
@@ -1,6 +1,4 @@
= SolrCloud Autoscaling
-:page-shortname: solrcloud-autoscaling
-:page-permalink: solrcloud-autoscaling.html
:page-children: solrcloud-autoscaling-overview, solrcloud-autoscaling-policy-preferences, solrcloud-autoscaling-triggers, solrcloud-autoscaling-trigger-actions, solrcloud-autoscaling-listeners, solrcloud-autoscaling-auto-add-replicas, solrcloud-autoscaling-fault-tolerance, solrcloud-autoscaling-api
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud-configuration-and-parameters.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-configuration-and-parameters.adoc b/solr/solr-ref-guide/src/solrcloud-configuration-and-parameters.adoc
index 539dc38..0d79a26 100644
--- a/solr/solr-ref-guide/src/solrcloud-configuration-and-parameters.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-configuration-and-parameters.adoc
@@ -1,6 +1,4 @@
= SolrCloud Configuration and Parameters
-:page-shortname: solrcloud-configuration-and-parameters
-:page-permalink: solrcloud-configuration-and-parameters.html
:page-children: setting-up-an-external-zookeeper-ensemble, using-zookeeper-to-manage-configuration-files, zookeeper-access-control, collections-api, parameter-reference, command-line-utilities, solrcloud-with-legacy-configuration-files, configsets-api
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud-query-routing-and-read-tolerance.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-query-routing-and-read-tolerance.adoc b/solr/solr-ref-guide/src/solrcloud-query-routing-and-read-tolerance.adoc
index 65f51a1..bcd5b75 100644
--- a/solr/solr-ref-guide/src/solrcloud-query-routing-and-read-tolerance.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-query-routing-and-read-tolerance.adoc
@@ -1,6 +1,4 @@
= SolrCloud Query Routing And Read Tolerance
-:page-shortname: solrcloud-query-routing-and-read-tolerance
-:page-permalink: solrcloud-query-routing-and-read-tolerance.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud-recoveries-and-write-tolerance.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-recoveries-and-write-tolerance.adoc b/solr/solr-ref-guide/src/solrcloud-recoveries-and-write-tolerance.adoc
index 70c120a..c121d4e 100644
--- a/solr/solr-ref-guide/src/solrcloud-recoveries-and-write-tolerance.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-recoveries-and-write-tolerance.adoc
@@ -1,6 +1,4 @@
= SolrCloud Recoveries and Write Tolerance
-:page-shortname: solrcloud-recoveries-and-write-tolerance
-:page-permalink: solrcloud-recoveries-and-write-tolerance.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud-resilience.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-resilience.adoc b/solr/solr-ref-guide/src/solrcloud-resilience.adoc
index ae341d4..106804c 100644
--- a/solr/solr-ref-guide/src/solrcloud-resilience.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-resilience.adoc
@@ -1,6 +1,4 @@
= SolrCloud Resilience
-:page-shortname: solrcloud-resilience
-:page-permalink: solrcloud-resilience.html
:page-children: solrcloud-recoveries-and-write-tolerance, solrcloud-query-routing-and-read-tolerance
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud-with-legacy-configuration-files.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-with-legacy-configuration-files.adoc b/solr/solr-ref-guide/src/solrcloud-with-legacy-configuration-files.adoc
index 20688ea..1f71268 100644
--- a/solr/solr-ref-guide/src/solrcloud-with-legacy-configuration-files.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-with-legacy-configuration-files.adoc
@@ -1,6 +1,4 @@
= SolrCloud with Legacy Configuration Files
-:page-shortname: solrcloud-with-legacy-configuration-files
-:page-permalink: solrcloud-with-legacy-configuration-files.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/solrcloud.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud.adoc b/solr/solr-ref-guide/src/solrcloud.adoc
index b5dc33b..c0dd128 100644
--- a/solr/solr-ref-guide/src/solrcloud.adoc
+++ b/solr/solr-ref-guide/src/solrcloud.adoc
@@ -1,6 +1,4 @@
= SolrCloud
-:page-shortname: solrcloud
-:page-permalink: solrcloud.html
:page-children: getting-started-with-solrcloud, how-solrcloud-works, solrcloud-resilience, solrcloud-configuration-and-parameters, rule-based-replica-placement, cross-data-center-replication-cdcr, solrcloud-autoscaling
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/spatial-search.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/spatial-search.adoc b/solr/solr-ref-guide/src/spatial-search.adoc
index 528f35c..4bcfa23 100644
--- a/solr/solr-ref-guide/src/spatial-search.adoc
+++ b/solr/solr-ref-guide/src/spatial-search.adoc
@@ -1,6 +1,4 @@
= Spatial Search
-:page-shortname: spatial-search
-:page-permalink: spatial-search.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/spell-checking.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/spell-checking.adoc b/solr/solr-ref-guide/src/spell-checking.adoc
index c8c4c67..bafeb78 100644
--- a/solr/solr-ref-guide/src/spell-checking.adoc
+++ b/solr/solr-ref-guide/src/spell-checking.adoc
@@ -1,6 +1,4 @@
= Spell Checking
-:page-shortname: spell-checking
-:page-permalink: spell-checking.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/statistical-programming.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/statistical-programming.adoc b/solr/solr-ref-guide/src/statistical-programming.adoc
index 07fba23..af56ae0 100644
--- a/solr/solr-ref-guide/src/statistical-programming.adoc
+++ b/solr/solr-ref-guide/src/statistical-programming.adoc
@@ -1,6 +1,4 @@
= Statistical Programming
-:page-shortname: statistical-programming
-:page-permalink: statistical-programming.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/stream-decorator-reference.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-decorator-reference.adoc b/solr/solr-ref-guide/src/stream-decorator-reference.adoc
index c70d995..cfdfb11 100644
--- a/solr/solr-ref-guide/src/stream-decorator-reference.adoc
+++ b/solr/solr-ref-guide/src/stream-decorator-reference.adoc
@@ -1,6 +1,4 @@
= Stream Decorator Reference
-:page-shortname: stream-decorator-reference
-:page-permalink: stream-decorator-reference.html
:page-tocclass: right
:page-toclevels: 1
// Licensed to the Apache Software Foundation (ASF) under one
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/stream-evaluator-reference.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-evaluator-reference.adoc b/solr/solr-ref-guide/src/stream-evaluator-reference.adoc
index 62022fc..f510c63 100644
--- a/solr/solr-ref-guide/src/stream-evaluator-reference.adoc
+++ b/solr/solr-ref-guide/src/stream-evaluator-reference.adoc
@@ -1,6 +1,4 @@
= Stream Evaluator Reference
-:page-shortname: stream-evaluator-reference
-:page-permalink: stream-evaluator-reference.html
:page-tocclass: right
:page-toclevels: 1
// Licensed to the Apache Software Foundation (ASF) under one
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/stream-screen.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-screen.adoc b/solr/solr-ref-guide/src/stream-screen.adoc
index 30f6cbe..2b95c9f 100644
--- a/solr/solr-ref-guide/src/stream-screen.adoc
+++ b/solr/solr-ref-guide/src/stream-screen.adoc
@@ -1,6 +1,4 @@
= Stream Screen
-:page-shortname: stream-screen
-:page-permalink: stream-screen.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/stream-source-reference.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-source-reference.adoc b/solr/solr-ref-guide/src/stream-source-reference.adoc
index ac2853f..0885a6d 100644
--- a/solr/solr-ref-guide/src/stream-source-reference.adoc
+++ b/solr/solr-ref-guide/src/stream-source-reference.adoc
@@ -1,6 +1,4 @@
= Stream Source Reference
-:page-shortname: stream-source-reference
-:page-permalink: stream-source-reference.html
:page-tocclass: right
:page-toclevels: 1
// Licensed to the Apache Software Foundation (ASF) under one
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/streaming-expressions.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/streaming-expressions.adoc b/solr/solr-ref-guide/src/streaming-expressions.adoc
index 95402ef..ed37ce1 100644
--- a/solr/solr-ref-guide/src/streaming-expressions.adoc
+++ b/solr/solr-ref-guide/src/streaming-expressions.adoc
@@ -1,6 +1,4 @@
= Streaming Expressions
-:page-shortname: streaming-expressions
-:page-permalink: streaming-expressions.html
:page-children: stream-source-reference, stream-decorator-reference, stream-evaluator-reference, statistical-programming, graph-traversal
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/suggester.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/suggester.adoc b/solr/solr-ref-guide/src/suggester.adoc
index 4dd1257..f96d400 100644
--- a/solr/solr-ref-guide/src/suggester.adoc
+++ b/solr/solr-ref-guide/src/suggester.adoc
@@ -1,6 +1,4 @@
= Suggester
-:page-shortname: suggester
-:page-permalink: suggester.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/taking-solr-to-production.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/taking-solr-to-production.adoc b/solr/solr-ref-guide/src/taking-solr-to-production.adoc
index fe7ed08..7097526 100644
--- a/solr/solr-ref-guide/src/taking-solr-to-production.adoc
+++ b/solr/solr-ref-guide/src/taking-solr-to-production.adoc
@@ -1,6 +1,4 @@
= Taking Solr to Production
-:page-shortname: taking-solr-to-production
-:page-permalink: taking-solr-to-production.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/the-dismax-query-parser.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/the-dismax-query-parser.adoc b/solr/solr-ref-guide/src/the-dismax-query-parser.adoc
index 1cb3014..db89932 100644
--- a/solr/solr-ref-guide/src/the-dismax-query-parser.adoc
+++ b/solr/solr-ref-guide/src/the-dismax-query-parser.adoc
@@ -1,6 +1,4 @@
= The DisMax Query Parser
-:page-shortname: the-dismax-query-parser
-:page-permalink: the-dismax-query-parser.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/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 3fd1c0e..ae4db27 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
@@ -1,6 +1,4 @@
= The Extended DisMax (eDismax) Query Parser
-:page-shortname: the-extended-dismax-query-parser
-:page-permalink: the-extended-dismax-query-parser.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/the-query-elevation-component.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/the-query-elevation-component.adoc b/solr/solr-ref-guide/src/the-query-elevation-component.adoc
index 4edfbac..3c7f504 100644
--- a/solr/solr-ref-guide/src/the-query-elevation-component.adoc
+++ b/solr/solr-ref-guide/src/the-query-elevation-component.adoc
@@ -1,6 +1,4 @@
= The Query Elevation Component
-:page-shortname: the-query-elevation-component
-:page-permalink: the-query-elevation-component.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/the-standard-query-parser.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/the-standard-query-parser.adoc b/solr/solr-ref-guide/src/the-standard-query-parser.adoc
index 360efbc..9d04729 100644
--- a/solr/solr-ref-guide/src/the-standard-query-parser.adoc
+++ b/solr/solr-ref-guide/src/the-standard-query-parser.adoc
@@ -1,6 +1,4 @@
= The Standard Query Parser
-:page-shortname: the-standard-query-parser
-:page-permalink: the-standard-query-parser.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/the-stats-component.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/the-stats-component.adoc b/solr/solr-ref-guide/src/the-stats-component.adoc
index 501b1f9..f3d4463 100644
--- a/solr/solr-ref-guide/src/the-stats-component.adoc
+++ b/solr/solr-ref-guide/src/the-stats-component.adoc
@@ -1,6 +1,4 @@
= The Stats Component
-:page-shortname: the-stats-component
-:page-permalink: the-stats-component.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/the-term-vector-component.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/the-term-vector-component.adoc b/solr/solr-ref-guide/src/the-term-vector-component.adoc
index 8f24519..b8a229a 100644
--- a/solr/solr-ref-guide/src/the-term-vector-component.adoc
+++ b/solr/solr-ref-guide/src/the-term-vector-component.adoc
@@ -1,6 +1,4 @@
= The Term Vector Component
-:page-shortname: the-term-vector-component
-:page-permalink: the-term-vector-component.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/the-terms-component.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/the-terms-component.adoc b/solr/solr-ref-guide/src/the-terms-component.adoc
index b1f44e4..6fe40d9 100644
--- a/solr/solr-ref-guide/src/the-terms-component.adoc
+++ b/solr/solr-ref-guide/src/the-terms-component.adoc
@@ -1,6 +1,4 @@
= The Terms Component
-:page-shortname: the-terms-component
-:page-permalink: the-terms-component.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/the-well-configured-solr-instance.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/the-well-configured-solr-instance.adoc b/solr/solr-ref-guide/src/the-well-configured-solr-instance.adoc
index 0d5ca12..22e9be3 100644
--- a/solr/solr-ref-guide/src/the-well-configured-solr-instance.adoc
+++ b/solr/solr-ref-guide/src/the-well-configured-solr-instance.adoc
@@ -1,6 +1,4 @@
= The Well-Configured Solr Instance
-:page-shortname: the-well-configured-solr-instance
-:page-permalink: the-well-configured-solr-instance.html
:page-children: configuring-solrconfig-xml, solr-cores-and-solr-xml, configuration-apis, implicit-requesthandlers, solr-plugins, jvm-settings, v2-api
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/thread-dump.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/thread-dump.adoc b/solr/solr-ref-guide/src/thread-dump.adoc
index 454a62c..3def77c 100644
--- a/solr/solr-ref-guide/src/thread-dump.adoc
+++ b/solr/solr-ref-guide/src/thread-dump.adoc
@@ -1,6 +1,4 @@
= Thread Dump
-:page-shortname: thread-dump
-:page-permalink: thread-dump.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/tokenizers.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/tokenizers.adoc b/solr/solr-ref-guide/src/tokenizers.adoc
index 8b07434..89dad34 100644
--- a/solr/solr-ref-guide/src/tokenizers.adoc
+++ b/solr/solr-ref-guide/src/tokenizers.adoc
@@ -1,6 +1,4 @@
= Tokenizers
-:page-shortname: tokenizers
-:page-permalink: tokenizers.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/transforming-and-indexing-custom-json.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/transforming-and-indexing-custom-json.adoc b/solr/solr-ref-guide/src/transforming-and-indexing-custom-json.adoc
index 5258287..0fb7e2a 100644
--- a/solr/solr-ref-guide/src/transforming-and-indexing-custom-json.adoc
+++ b/solr/solr-ref-guide/src/transforming-and-indexing-custom-json.adoc
@@ -1,6 +1,4 @@
= Transforming and Indexing Custom JSON
-:page-shortname: transforming-and-indexing-custom-json
-:page-permalink: transforming-and-indexing-custom-json.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/transforming-result-documents.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/transforming-result-documents.adoc b/solr/solr-ref-guide/src/transforming-result-documents.adoc
index 3543d8e..092aaba 100644
--- a/solr/solr-ref-guide/src/transforming-result-documents.adoc
+++ b/solr/solr-ref-guide/src/transforming-result-documents.adoc
@@ -1,6 +1,4 @@
= Transforming Result Documents
-:page-shortname: transforming-result-documents
-:page-permalink: transforming-result-documents.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/uima-integration.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/uima-integration.adoc b/solr/solr-ref-guide/src/uima-integration.adoc
index 9255205..3ea1bdd 100644
--- a/solr/solr-ref-guide/src/uima-integration.adoc
+++ b/solr/solr-ref-guide/src/uima-integration.adoc
@@ -1,6 +1,4 @@
= UIMA Integration
-:page-shortname: uima-integration
-:page-permalink: uima-integration.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/understanding-analyzers-tokenizers-and-filters.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/understanding-analyzers-tokenizers-and-filters.adoc b/solr/solr-ref-guide/src/understanding-analyzers-tokenizers-and-filters.adoc
index 345634d..7d37943 100644
--- a/solr/solr-ref-guide/src/understanding-analyzers-tokenizers-and-filters.adoc
+++ b/solr/solr-ref-guide/src/understanding-analyzers-tokenizers-and-filters.adoc
@@ -1,6 +1,4 @@
= Understanding Analyzers, Tokenizers, and Filters
-:page-shortname: understanding-analyzers-tokenizers-and-filters
-:page-permalink: understanding-analyzers-tokenizers-and-filters.html
:page-children: analyzers, about-tokenizers, about-filters, tokenizers, filter-descriptions, charfilterfactories, language-analysis, phonetic-matching, running-your-analyzer
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/update-request-processors.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/update-request-processors.adoc b/solr/solr-ref-guide/src/update-request-processors.adoc
index 7316caf..09c49d1 100644
--- a/solr/solr-ref-guide/src/update-request-processors.adoc
+++ b/solr/solr-ref-guide/src/update-request-processors.adoc
@@ -1,6 +1,4 @@
= Update Request Processors
-:page-shortname: update-request-processors
-:page-permalink: update-request-processors.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc b/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc
index c532180..cd60315 100644
--- a/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc
@@ -1,6 +1,4 @@
= UpdateHandlers in SolrConfig
-:page-shortname: updatehandlers-in-solrconfig
-:page-permalink: updatehandlers-in-solrconfig.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/updating-parts-of-documents.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/updating-parts-of-documents.adoc b/solr/solr-ref-guide/src/updating-parts-of-documents.adoc
index a267b63..c15b6ed 100644
--- a/solr/solr-ref-guide/src/updating-parts-of-documents.adoc
+++ b/solr/solr-ref-guide/src/updating-parts-of-documents.adoc
@@ -1,6 +1,4 @@
= Updating Parts of Documents
-:page-shortname: updating-parts-of-documents
-:page-permalink: updating-parts-of-documents.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/upgrading-a-solr-cluster.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/upgrading-a-solr-cluster.adoc b/solr/solr-ref-guide/src/upgrading-a-solr-cluster.adoc
index ea790a8..01855f1 100644
--- a/solr/solr-ref-guide/src/upgrading-a-solr-cluster.adoc
+++ b/solr/solr-ref-guide/src/upgrading-a-solr-cluster.adoc
@@ -1,6 +1,4 @@
= Upgrading a Solr Cluster
-:page-shortname: upgrading-a-solr-cluster
-:page-permalink: upgrading-a-solr-cluster.html
:page-children: indexupgrader-tool
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/uploading-data-with-index-handlers.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/uploading-data-with-index-handlers.adoc b/solr/solr-ref-guide/src/uploading-data-with-index-handlers.adoc
index ed62c75..c872485 100644
--- a/solr/solr-ref-guide/src/uploading-data-with-index-handlers.adoc
+++ b/solr/solr-ref-guide/src/uploading-data-with-index-handlers.adoc
@@ -1,6 +1,4 @@
= Uploading Data with Index Handlers
-:page-shortname: uploading-data-with-index-handlers
-:page-permalink: uploading-data-with-index-handlers.html
:page-children: transforming-and-indexing-custom-json
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/uploading-data-with-solr-cell-using-apache-tika.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/uploading-data-with-solr-cell-using-apache-tika.adoc b/solr/solr-ref-guide/src/uploading-data-with-solr-cell-using-apache-tika.adoc
index 258ef89..0199f40 100644
--- a/solr/solr-ref-guide/src/uploading-data-with-solr-cell-using-apache-tika.adoc
+++ b/solr/solr-ref-guide/src/uploading-data-with-solr-cell-using-apache-tika.adoc
@@ -1,6 +1,4 @@
= Uploading Data with Solr Cell using Apache Tika
-:page-shortname: uploading-data-with-solr-cell-using-apache-tika
-:page-permalink: uploading-data-with-solr-cell-using-apache-tika.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/uploading-structured-data-store-data-with-the-data-import-handler.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/uploading-structured-data-store-data-with-the-data-import-handler.adoc b/solr/solr-ref-guide/src/uploading-structured-data-store-data-with-the-data-import-handler.adoc
index 405efa2..c4eaad8 100644
--- a/solr/solr-ref-guide/src/uploading-structured-data-store-data-with-the-data-import-handler.adoc
+++ b/solr/solr-ref-guide/src/uploading-structured-data-store-data-with-the-data-import-handler.adoc
@@ -1,6 +1,4 @@
= Uploading Structured Data Store Data with the Data Import Handler
-:page-shortname: uploading-structured-data-store-data-with-the-data-import-handler
-:page-permalink: uploading-structured-data-store-data-with-the-data-import-handler.html
:page-toclevels: 1
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/using-javascript.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-javascript.adoc b/solr/solr-ref-guide/src/using-javascript.adoc
index 62c681f..3399371 100644
--- a/solr/solr-ref-guide/src/using-javascript.adoc
+++ b/solr/solr-ref-guide/src/using-javascript.adoc
@@ -1,6 +1,4 @@
= Using JavaScript
-:page-shortname: using-javascript
-:page-permalink: using-javascript.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/using-jmx-with-solr.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-jmx-with-solr.adoc b/solr/solr-ref-guide/src/using-jmx-with-solr.adoc
index 77c4400..47d0241 100644
--- a/solr/solr-ref-guide/src/using-jmx-with-solr.adoc
+++ b/solr/solr-ref-guide/src/using-jmx-with-solr.adoc
@@ -1,6 +1,4 @@
= Using JMX with Solr
-:page-shortname: using-jmx-with-solr
-:page-permalink: using-jmx-with-solr.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/using-python.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-python.adoc b/solr/solr-ref-guide/src/using-python.adoc
index 732cd22..d5dc465 100644
--- a/solr/solr-ref-guide/src/using-python.adoc
+++ b/solr/solr-ref-guide/src/using-python.adoc
@@ -1,6 +1,4 @@
= Using Python
-:page-shortname: using-python
-:page-permalink: using-python.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/using-solr-from-ruby.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-solr-from-ruby.adoc b/solr/solr-ref-guide/src/using-solr-from-ruby.adoc
index 0b70336..922fb05 100644
--- a/solr/solr-ref-guide/src/using-solr-from-ruby.adoc
+++ b/solr/solr-ref-guide/src/using-solr-from-ruby.adoc
@@ -1,6 +1,4 @@
= Using Solr From Ruby
-:page-shortname: using-solr-from-ruby
-:page-permalink: using-solr-from-ruby.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/using-solrj.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-solrj.adoc b/solr/solr-ref-guide/src/using-solrj.adoc
index 4a633ac..4151032 100644
--- a/solr/solr-ref-guide/src/using-solrj.adoc
+++ b/solr/solr-ref-guide/src/using-solrj.adoc
@@ -1,6 +1,4 @@
= Using SolrJ
-:page-shortname: using-solrj
-:page-permalink: using-solrj.html
// 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
[19/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11170: Make
AssignBackwardCompatibilityTest more reliable
Posted by ab...@apache.org.
SOLR-11170: Make AssignBackwardCompatibilityTest more reliable
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/161be0a4
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/161be0a4
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/161be0a4
Branch: refs/heads/jira/solr-11285-sim
Commit: 161be0a4ae38e857eb831b90121229db69f7fd4b
Parents: 7d9cf43
Author: Cao Manh Dat <da...@apache.org>
Authored: Fri Oct 27 10:23:28 2017 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Fri Oct 27 10:23:28 2017 +0700
----------------------------------------------------------------------
.../java/org/apache/solr/util/NumberUtils.java | 8 +---
.../cloud/AssignBackwardCompatibilityTest.java | 26 ++++++++++---
.../org/apache/solr/util/NumberUtilsTest.java | 40 ++++++++++++++++++++
3 files changed, 62 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/161be0a4/solr/core/src/java/org/apache/solr/util/NumberUtils.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/util/NumberUtils.java b/solr/core/src/java/org/apache/solr/util/NumberUtils.java
index 93359bb..2e1226b 100644
--- a/solr/core/src/java/org/apache/solr/util/NumberUtils.java
+++ b/solr/core/src/java/org/apache/solr/util/NumberUtils.java
@@ -211,11 +211,7 @@ public class NumberUtils {
public static int bytesToInt(byte[] bytes) {
if (bytes == null) return 0;
- int val = 0;
- for (int i = 0; i < bytes.length; i++) {
- val = val << 8;
- val += bytes[i];
- }
- return val;
+ assert bytes.length == 4;
+ return bytes[0] << 24 | (bytes[1] & 255) << 16 | (bytes[2] & 255) << 8 | bytes[3] & 255;
}
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/161be0a4/solr/core/src/test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java b/solr/core/src/test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java
index cc463ef..aaa47b4 100644
--- a/solr/core/src/test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java
@@ -28,7 +28,9 @@ import org.apache.solr.client.solrj.response.CollectionAdminResponse;
import org.apache.solr.common.cloud.ClusterStateUtil;
import org.apache.solr.common.cloud.DocCollection;
import org.apache.solr.common.cloud.Replica;
+import org.apache.solr.util.NumberUtils;
import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.data.Stat;
import org.junit.BeforeClass;
import org.junit.Test;
import org.slf4j.Logger;
@@ -59,21 +61,22 @@ public class AssignBackwardCompatibilityTest extends SolrCloudTestCase {
Set<String> coreNames = new HashSet<>();
Set<String> coreNodeNames = new HashSet<>();
- int numOperations = random().nextInt(4 * 15);
+ int numOperations = random().nextInt(15) + 15;
int numLiveReplicas = 4;
boolean clearedCounter = false;
for (int i = 0; i < numOperations; i++) {
+ log.info("Collection counter={} i={}", getCounter(), i);
boolean deleteReplica = random().nextBoolean() && numLiveReplicas > 1;
// No need to clear counter more than one time
- if (random().nextInt(30) < 5 && !clearedCounter) {
+ if (random().nextBoolean() && i > 5 && !clearedCounter) {
+ log.info("Clear collection counter");
// clear counter
cluster.getZkClient().delete("/collections/"+COLLECTION+"/counter", -1, true);
clearedCounter = true;
}
if (deleteReplica) {
- assertTrue(ClusterStateUtil.waitForLiveAndActiveReplicaCount(
- cluster.getSolrClient().getZkStateReader(), COLLECTION, numLiveReplicas, 30000));
+ waitForState("Expected " + numLiveReplicas + " active replicas", COLLECTION, clusterShape(1, numLiveReplicas));
DocCollection dc = getCollectionState(COLLECTION);
Replica replica = getRandomReplica(dc.getSlice("shard1"), (r) -> r.getState() == Replica.State.ACTIVE);
CollectionAdminRequest.deleteReplica(COLLECTION, "shard1", replica.getName()).process(cluster.getSolrClient());
@@ -86,6 +89,8 @@ public class AssignBackwardCompatibilityTest extends SolrCloudTestCase {
.keySet().iterator().next();
assertFalse("Core name is not unique coreName=" + coreName + " " + coreNames, coreNames.contains(coreName));
coreNames.add(coreName);
+ numLiveReplicas++;
+ waitForState("Expected " + numLiveReplicas + " active replicas", COLLECTION, clusterShape(1, numLiveReplicas));
Replica newReplica = getCollectionState(COLLECTION).getReplicas().stream()
.filter(r -> r.getCoreName().equals(coreName))
@@ -93,9 +98,18 @@ public class AssignBackwardCompatibilityTest extends SolrCloudTestCase {
String coreNodeName = newReplica.getName();
assertFalse("Core node name is not unique", coreNodeNames.contains(coreName));
coreNodeNames.add(coreNodeName);
-
- numLiveReplicas++;
}
}
}
+
+ private int getCounter() throws KeeperException, InterruptedException {
+ try {
+ byte[] data = cluster.getZkClient().getData("/collections/"+COLLECTION+"/counter", null, new Stat(), true);
+ int count = NumberUtils.bytesToInt(data);
+ if (count < 0) throw new AssertionError("Found negative collection counter " + count);
+ return count;
+ } catch (KeeperException e) {
+ return -1;
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/161be0a4/solr/core/src/test/org/apache/solr/util/NumberUtilsTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/util/NumberUtilsTest.java b/solr/core/src/test/org/apache/solr/util/NumberUtilsTest.java
new file mode 100644
index 0000000..e249a64
--- /dev/null
+++ b/solr/core/src/test/org/apache/solr/util/NumberUtilsTest.java
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+package org.apache.solr.util;
+
+import org.apache.solr.SolrTestCaseJ4;
+import org.junit.Test;
+
+public class NumberUtilsTest extends SolrTestCaseJ4 {
+ @Test
+ public void testIntToBytes() {
+ assertEquals(0, NumberUtils.bytesToInt(null));
+ assertEquals(-1, encodeAndDecode(-1));
+ assertEquals(-100, encodeAndDecode(-100));
+ assertEquals(-1000, encodeAndDecode(-1000));
+ assertEquals(0, encodeAndDecode(0));
+ assertEquals(100, encodeAndDecode(100));
+ assertEquals(1000, encodeAndDecode(1000));
+ assertEquals(Integer.MAX_VALUE, encodeAndDecode(Integer.MAX_VALUE));
+ assertEquals(Integer.MIN_VALUE, encodeAndDecode(Integer.MIN_VALUE));
+ }
+
+ public int encodeAndDecode(int i) {
+ return NumberUtils.bytesToInt(NumberUtils.intToBytes(i));
+ }
+}
[33/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11452: Leader
from collectionState can be null
Posted by ab...@apache.org.
SOLR-11452: Leader from collectionState can be null
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/cc519b9d
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/cc519b9d
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/cc519b9d
Branch: refs/heads/jira/solr-11285-sim
Commit: cc519b9dddcc1d2177ab72362637daf1c5b9db8d
Parents: e0239b9
Author: Cao Manh Dat <da...@apache.org>
Authored: Mon Oct 30 10:04:08 2017 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Mon Oct 30 10:04:08 2017 +0700
----------------------------------------------------------------------
.../core/src/test/org/apache/solr/cloud/TestTlogReplica.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/cc519b9d/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 026bbff..51eac98 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
@@ -676,8 +676,12 @@ public class TestTlogReplica extends SolrCloudTestCase {
String oldLeaderNodeName = oldLeaderJetty.getNodeName();
ChaosMonkey.kill(oldLeaderJetty);
waitForState("Replica not removed", collectionName, activeReplicaCount(0, 1, 0));
- waitForState("Expect new leader", collectionName, (liveNodes, collectionState) ->
- !collectionState.getLeader("shard1").getNodeName().equals(oldLeaderNodeName)
+ waitForState("Expect new leader", collectionName,
+ (liveNodes, collectionState) -> {
+ Replica leader = collectionState.getLeader("shard1");
+ if (leader == null) return false;
+ return !leader.getNodeName().equals(oldLeaderNodeName);
+ }
);
ChaosMonkey.start(oldLeaderJetty);
waitForState("Replica not added", collectionName, activeReplicaCount(0, 2, 0));
[49/50] [abbrv] lucene-solr:jira/solr-11285-sim: Merge branch
'master' into jira/solr-11285-sim
Posted by ab...@apache.org.
Merge branch 'master' into jira/solr-11285-sim
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/75b2a888
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/75b2a888
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/75b2a888
Branch: refs/heads/jira/solr-11285-sim
Commit: 75b2a888de720bc8ef44543d72b936e467ee8ece
Parents: 92e5a6c 487f676
Author: Andrzej Bialecki <ab...@apache.org>
Authored: Tue Oct 31 14:05:59 2017 +0100
Committer: Andrzej Bialecki <ab...@apache.org>
Committed: Tue Oct 31 14:05:59 2017 +0100
----------------------------------------------------------------------
.gitignore | 1 +
README.md | 8 +
dev-tools/doap/lucene.rdf | 36 +
dev-tools/doap/solr.rdf | 36 +
.../lucene/analysis/common/pom.xml.template | 2 +-
.../maven/lucene/analysis/icu/pom.xml.template | 2 +-
.../lucene/analysis/kuromoji/pom.xml.template | 2 +-
.../lucene/analysis/morfologik/pom.xml.template | 2 +-
.../lucene/analysis/phonetic/pom.xml.template | 2 +-
.../maven/lucene/analysis/pom.xml.template | 2 +-
.../lucene/analysis/smartcn/pom.xml.template | 2 +-
.../lucene/analysis/stempel/pom.xml.template | 2 +-
.../maven/lucene/analysis/uima/pom.xml.template | 2 +-
.../lucene/backward-codecs/pom.xml.template | 15 +-
.../maven/lucene/benchmark/pom.xml.template | 2 +-
.../lucene/classification/pom.xml.template | 2 +-
dev-tools/maven/lucene/codecs/pom.xml.template | 2 +-
.../lucene/codecs/src/java/pom.xml.template | 2 +-
.../lucene/codecs/src/test/pom.xml.template | 2 +-
dev-tools/maven/lucene/core/pom.xml.template | 2 +-
.../maven/lucene/core/src/java/pom.xml.template | 2 +-
.../maven/lucene/core/src/test/pom.xml.template | 2 +-
dev-tools/maven/lucene/demo/pom.xml.template | 2 +-
.../maven/lucene/expressions/pom.xml.template | 2 +-
dev-tools/maven/lucene/facet/pom.xml.template | 2 +-
.../maven/lucene/grouping/pom.xml.template | 2 +-
.../maven/lucene/highlighter/pom.xml.template | 2 +-
dev-tools/maven/lucene/join/pom.xml.template | 2 +-
dev-tools/maven/lucene/memory/pom.xml.template | 2 +-
dev-tools/maven/lucene/misc/pom.xml.template | 2 +-
dev-tools/maven/lucene/pom.xml.template | 2 +-
dev-tools/maven/lucene/queries/pom.xml.template | 2 +-
.../maven/lucene/queryparser/pom.xml.template | 2 +-
.../maven/lucene/replicator/pom.xml.template | 2 +-
dev-tools/maven/lucene/sandbox/pom.xml.template | 2 +-
.../lucene/spatial-extras/pom.xml.template | 11 +-
dev-tools/maven/lucene/spatial/pom.xml.template | 2 +-
.../maven/lucene/spatial3d/pom.xml.template | 15 +-
dev-tools/maven/lucene/suggest/pom.xml.template | 2 +-
.../lucene/test-framework/pom.xml.template | 2 +-
dev-tools/maven/pom.xml.template | 9 +-
.../contrib/analysis-extras/pom.xml.template | 2 +-
.../solr/contrib/analytics/pom.xml.template | 2 +-
.../solr/contrib/clustering/pom.xml.template | 2 +-
.../dataimporthandler-extras/pom.xml.template | 2 +-
.../contrib/dataimporthandler/pom.xml.template | 2 +-
.../solr/contrib/extraction/pom.xml.template | 2 +-
.../maven/solr/contrib/langid/pom.xml.template | 2 +-
.../maven/solr/contrib/ltr/pom.xml.template | 2 +-
dev-tools/maven/solr/contrib/pom.xml.template | 2 +-
.../maven/solr/contrib/uima/pom.xml.template | 2 +-
.../solr/contrib/velocity/pom.xml.template | 2 +-
dev-tools/maven/solr/core/pom.xml.template | 2 +-
.../maven/solr/core/src/java/pom.xml.template | 2 +-
.../maven/solr/core/src/test/pom.xml.template | 9 +-
dev-tools/maven/solr/pom.xml.template | 2 +-
dev-tools/maven/solr/solrj/pom.xml.template | 2 +-
.../maven/solr/solrj/src/java/pom.xml.template | 2 +-
.../maven/solr/solrj/src/test/pom.xml.template | 2 +-
.../maven/solr/test-framework/pom.xml.template | 2 +-
dev-tools/scripts/addBackcompatIndexes.py | 73 +-
dev-tools/scripts/buildAndPushRelease.py | 13 +-
dev-tools/scripts/checkJavadocLinks.py | 2 +-
.../scripts/write.stage.maven.build.xml.pl | 1 -
lucene/CHANGES.txt | 137 +
lucene/JRE_VERSION_MIGRATION.txt | 2 +-
.../analysis/bg/BulgarianStemFilterFactory.java | 1 +
.../bn/BengaliNormalizationFilterFactory.java | 1 +
.../analysis/bn/BengaliStemFilterFactory.java | 1 +
.../analysis/cjk/CJKBigramFilterFactory.java | 1 +
.../analysis/cjk/CJKWidthFilterFactory.java | 1 +
.../ckb/SoraniNormalizationFilterFactory.java | 1 +
.../analysis/ckb/SoraniStemFilterFactory.java | 1 +
...phenationCompoundWordTokenFilterFactory.java | 1 +
.../core/DecimalDigitFilterFactory.java | 1 +
.../core/FlattenGraphFilterFactory.java | 1 +
.../analysis/core/TypeTokenFilterFactory.java | 1 +
.../analysis/core/UpperCaseFilterFactory.java | 1 +
.../analysis/cz/CzechStemFilterFactory.java | 1 +
.../de/GermanLightStemFilterFactory.java | 1 +
.../de/GermanMinimalStemFilterFactory.java | 1 +
.../de/GermanNormalizationFilterFactory.java | 1 +
.../analysis/el/GreekStemFilterFactory.java | 1 +
.../en/EnglishMinimalStemFilterFactory.java | 1 +
.../en/EnglishPossessiveFilterFactory.java | 1 +
.../lucene/analysis/en/KStemFilterFactory.java | 1 +
.../es/SpanishLightStemFilterFactory.java | 1 +
.../fi/FinnishLightStemFilterFactory.java | 1 +
.../fr/FrenchLightStemFilterFactory.java | 1 +
.../fr/FrenchMinimalStemFilterFactory.java | 1 +
.../ga/IrishLowerCaseFilterFactory.java | 1 +
.../gl/GalicianMinimalStemFilterFactory.java | 1 +
.../analysis/gl/GalicianStemFilterFactory.java | 1 +
.../hi/HindiNormalizationFilterFactory.java | 1 +
.../analysis/hi/HindiStemFilterFactory.java | 1 +
.../hu/HungarianLightStemFilterFactory.java | 1 +
.../hunspell/HunspellStemFilterFactory.java | 1 +
.../id/IndonesianStemFilterFactory.java | 1 +
.../in/IndicNormalizationFilterFactory.java | 1 +
.../it/ItalianLightStemFilterFactory.java | 1 +
.../analysis/lv/LatvianStemFilterFactory.java | 1 +
.../analysis/minhash/MinHashFilterFactory.java | 1 +
.../CodepointCountFilterFactory.java | 1 +
.../DateRecognizerFilterFactory.java | 1 +
...elimitedTermFrequencyTokenFilterFactory.java | 3 +-
.../miscellaneous/FingerprintFilterFactory.java | 1 +
.../FixBrokenOffsetsFilterFactory.java | 1 +
.../KeywordMarkerFilterFactory.java | 1 +
.../KeywordRepeatFilterFactory.java | 1 +
.../LimitTokenCountFilterFactory.java | 1 +
.../LimitTokenOffsetFilterFactory.java | 1 +
.../LimitTokenPositionFilterFactory.java | 1 +
.../ScandinavianFoldingFilterFactory.java | 1 +
.../ScandinavianNormalizationFilterFactory.java | 1 +
.../StemmerOverrideFilterFactory.java | 1 +
.../TruncateTokenFilterFactory.java | 1 +
.../WordDelimiterGraphFilterFactory.java | 1 +
.../no/NorwegianLightStemFilterFactory.java | 1 +
.../no/NorwegianMinimalStemFilterFactory.java | 1 +
.../PatternCaptureGroupFilterFactory.java | 1 +
.../DelimitedPayloadTokenFilterFactory.java | 2 +-
.../pt/PortugueseLightStemFilterFactory.java | 1 +
.../pt/PortugueseMinimalStemFilterFactory.java | 1 +
.../pt/PortugueseStemFilterFactory.java | 1 +
.../ru/RussianLightStemFilterFactory.java | 1 +
.../sr/SerbianNormalizationFilterFactory.java | 1 +
.../analysis/standard/ASCIITLD.jflex-macro | 1213 +-
.../analysis/standard/ClassicFilterFactory.java | 1 +
.../standard/UAX29URLEmailTokenizerImpl.java | 38779 ++++++++++++++---
.../sv/SwedishLightStemFilterFactory.java | 1 +
.../synonym/SynonymGraphFilterFactory.java | 1 +
.../analysis/tr/ApostropheFilterFactory.java | 3 +-
.../tr/TurkishLowerCaseFilterFactory.java | 1 +
.../analysis/icu/ICUFoldingFilterFactory.java | 1 +
.../icu/ICUNormalizer2FilterFactory.java | 1 +
.../analysis/icu/ICUTransformFilterFactory.java | 1 +
.../ja/JapaneseBaseFormFilterFactory.java | 1 +
.../ja/JapaneseKatakanaStemFilterFactory.java | 1 +
.../ja/JapaneseNumberFilterFactory.java | 1 +
.../JapanesePartOfSpeechStopFilterFactory.java | 1 +
.../ja/JapaneseReadingFormFilterFactory.java | 1 +
.../morfologik/MorfologikFilterFactory.java | 1 +
.../phonetic/BeiderMorseFilterFactory.java | 1 +
.../DaitchMokotoffSoundexFilterFactory.java | 1 +
.../stempel/StempelPolishStemFilterFactory.java | 1 +
.../index/TestBackwardsCompatibility.java | 61 +-
.../org/apache/lucene/index/dvupdates.7.0.0.zip | Bin 0 -> 13401 bytes
.../org/apache/lucene/index/empty.7.0.0.zip | Bin 0 -> 375 bytes
.../org/apache/lucene/index/index.7.0.0-cfs.zip | Bin 0 -> 15594 bytes
.../apache/lucene/index/index.7.0.0-nocfs.zip | Bin 0 -> 15586 bytes
.../org/apache/lucene/index/index.7.0.1-cfs.zip | Bin 0 -> 15597 bytes
.../apache/lucene/index/index.7.0.1-nocfs.zip | Bin 0 -> 18335 bytes
.../org/apache/lucene/index/index.7.1.0-cfs.zip | Bin 0 -> 15612 bytes
.../apache/lucene/index/index.7.1.0-nocfs.zip | Bin 0 -> 15609 bytes
.../org/apache/lucene/index/moreterms.7.0.0.zip | Bin 0 -> 175822 bytes
.../org/apache/lucene/index/sorted.7.0.0.zip | Bin 0 -> 74558 bytes
.../org/apache/lucene/index/sorted.7.0.1.zip | Bin 0 -> 176238 bytes
.../org/apache/lucene/index/sorted.7.1.0.zip | Bin 0 -> 81963 bytes
.../lucene/index/unsupported.5.5.5-cfs.zip | Bin 0 -> 13695 bytes
.../lucene/index/unsupported.5.5.5-nocfs.zip | Bin 0 -> 13686 bytes
.../lucene/index/unsupported.6.6.2-cfs.zip | Bin 0 -> 15823 bytes
.../lucene/index/unsupported.6.6.2-nocfs.zip | Bin 0 -> 15820 bytes
.../KNearestNeighborDocumentClassifier.java | 1 +
.../classification/ClassificationTestBase.java | 1 +
lucene/common-build.xml | 14 +-
.../org/apache/lucene/index/CheckIndex.java | 4 +-
.../org/apache/lucene/index/FieldInfos.java | 22 +-
.../apache/lucene/index/IndexFileDeleter.java | 4 +-
.../org/apache/lucene/index/IndexWriter.java | 25 +-
.../org/apache/lucene/index/SegmentInfos.java | 17 +-
.../lucene/index/SimpleMergedSegmentWarmer.java | 6 +-
.../lucene/search/CollectionStatistics.java | 69 +-
.../org/apache/lucene/search/IndexSearcher.java | 24 +-
.../apache/lucene/search/MultiPhraseQuery.java | 11 +-
.../lucene/search/NormsFieldExistsQuery.java | 80 +
.../org/apache/lucene/search/PhraseQuery.java | 12 +-
.../org/apache/lucene/search/SynonymQuery.java | 27 +-
.../org/apache/lucene/search/TermQuery.java | 15 +-
.../apache/lucene/search/TermStatistics.java | 37 +-
.../lucene/search/similarities/AfterEffect.java | 10 +-
.../search/similarities/AfterEffectB.java | 8 +-
.../search/similarities/AfterEffectL.java | 8 +-
.../lucene/search/similarities/Axiomatic.java | 28 +-
.../search/similarities/AxiomaticF1EXP.java | 20 +-
.../search/similarities/AxiomaticF1LOG.java | 20 +-
.../search/similarities/AxiomaticF2EXP.java | 18 +-
.../search/similarities/AxiomaticF2LOG.java | 18 +-
.../search/similarities/AxiomaticF3EXP.java | 24 +-
.../search/similarities/AxiomaticF3LOG.java | 24 +-
.../search/similarities/BM25Similarity.java | 120 +-
.../lucene/search/similarities/BasicModel.java | 6 +-
.../search/similarities/BasicModelBE.java | 4 +-
.../lucene/search/similarities/BasicModelD.java | 6 +-
.../lucene/search/similarities/BasicModelG.java | 4 +-
.../search/similarities/BasicModelIF.java | 4 +-
.../search/similarities/BasicModelIn.java | 8 +-
.../search/similarities/BasicModelIne.java | 4 +-
.../lucene/search/similarities/BasicModelP.java | 8 +-
.../lucene/search/similarities/BasicStats.java | 12 +-
.../search/similarities/BooleanSimilarity.java | 2 +-
.../search/similarities/ClassicSimilarity.java | 4 +-
.../search/similarities/DFISimilarity.java | 8 +-
.../search/similarities/DFRSimilarity.java | 10 +-
.../search/similarities/Distribution.java | 8 +-
.../search/similarities/DistributionLL.java | 4 +-
.../search/similarities/DistributionSPL.java | 8 +-
.../search/similarities/IBSimilarity.java | 8 +-
.../search/similarities/Independence.java | 2 +-
.../similarities/IndependenceChiSquared.java | 2 +-
.../similarities/IndependenceSaturated.java | 2 +-
.../similarities/IndependenceStandardized.java | 4 +-
.../similarities/LMDirichletSimilarity.java | 18 +-
.../similarities/LMJelinekMercerSimilarity.java | 20 +-
.../search/similarities/LMSimilarity.java | 20 +-
.../search/similarities/Normalization.java | 16 +-
.../search/similarities/NormalizationH1.java | 8 +-
.../search/similarities/NormalizationH2.java | 8 +-
.../search/similarities/NormalizationH3.java | 5 +-
.../search/similarities/NormalizationZ.java | 9 +-
.../search/similarities/SimilarityBase.java | 28 +-
.../search/similarities/TFIDFSimilarity.java | 37 +-
.../search/similarities/package-info.java | 2 +-
.../apache/lucene/search/spans/SpanWeight.java | 15 +-
.../java/org/apache/lucene/util/Version.java | 14 +
.../index/TestDemoParallelLeafReader.java | 19 +-
.../lucene/index/TestIndexWriterReader.java | 44 +-
.../lucene/search/TestIntRangeFieldQueries.java | 2 +-
.../search/TestNormsFieldExistsQuery.java | 197 +
.../search/similarities/AxiomaticTestCase.java | 90 +
.../search/similarities/BasicModelTestCase.java | 124 +
.../similarities/DistributionTestCase.java | 119 +
.../search/similarities/TestAxiomaticF1EXP.java | 30 +
.../search/similarities/TestAxiomaticF1LOG.java | 30 +
.../search/similarities/TestAxiomaticF2EXP.java | 26 +
.../search/similarities/TestAxiomaticF2LOG.java | 26 +
.../search/similarities/TestAxiomaticF3EXP.java | 31 +
.../search/similarities/TestAxiomaticF3LOG.java | 31 +
.../search/similarities/TestBM25Similarity.java | 61 +-
.../search/similarities/TestBasicModelBE.java | 30 +
.../search/similarities/TestBasicModelD.java | 30 +
.../search/similarities/TestBasicModelG.java | 26 +
.../search/similarities/TestBasicModelIF.java | 26 +
.../search/similarities/TestBasicModelIn.java | 26 +
.../search/similarities/TestBasicModelIne.java | 26 +
.../search/similarities/TestBasicModelP.java | 30 +
.../similarities/TestBooleanSimilarity.java | 9 +-
.../similarities/TestClassicSimilarity.java | 12 +-
.../search/similarities/TestDistributionLL.java | 26 +
.../similarities/TestDistributionSPL.java | 30 +
.../TestIndependenceChiSquared.java | 28 +
.../similarities/TestIndependenceSaturated.java | 28 +
.../TestIndependenceStandardized.java | 28 +
.../similarities/TestLMDirichletSimilarity.java | 49 +
.../TestLMJelinekMercerSimilarity.java | 44 +
.../search/similarities/TestSimilarity2.java | 5 +-
.../search/similarities/TestSimilarityBase.java | 14 +-
.../apache/lucene/facet/range/DoubleRange.java | 2 +-
.../apache/lucene/facet/range/LongRange.java | 2 +-
.../directory/DirectoryTaxonomyReader.java | 58 +-
.../directory/DirectoryTaxonomyWriter.java | 17 +-
.../taxonomy/directory/TaxonomyIndexArrays.java | 40 +-
.../taxonomy/writercache/CategoryPathUtils.java | 81 -
.../writercache/Cl2oTaxonomyWriterCache.java | 98 -
.../taxonomy/writercache/CollisionMap.java | 235 -
.../writercache/CompactLabelToOrdinal.java | 467 -
.../writercache/UTF8TaxonomyWriterCache.java | 158 +
.../TestConcurrentFacetedIndexing.java | 8 +-
.../directory/TestDirectoryTaxonomyReader.java | 34 +-
.../directory/TestDirectoryTaxonomyWriter.java | 12 +-
.../writercache/TestCompactLabelToOrdinal.java | 137 -
.../TestUTF8TaxonomyWriterCache.java | 120 +
lucene/ivy-versions.properties | 31 +-
.../lucene/search/join/TestBlockJoin.java | 2 +-
lucene/licenses/commons-compress-1.11.jar.sha1 | 1 -
lucene/licenses/commons-compress-1.14.jar.sha1 | 1 +
.../morfologik-ukrainian-search-3.7.5.jar.sha1 | 1 -
.../morfologik-ukrainian-search-3.7.6.jar.sha1 | 1 -
.../morfologik-ukrainian-search-3.9.0.jar.sha1 | 1 +
.../apache/lucene/queries/mlt/MoreLikeThis.java | 16 +-
.../lucene/queryparser/xml/CoreParser.java | 65 +-
.../queryparser/xml/DOCTYPE_TermQuery.xml | 19 +
.../lucene/queryparser/xml/ENTITY_TermQuery.xml | 23 +
.../lucene/queryparser/xml/TestCoreParser.java | 13 +
.../nrt/PreCopyMergedSegmentWarmer.java | 4 +-
.../document/FloatPointNearestNeighbor.java | 383 +
.../lucene/document/LatLonBoundingBox.java | 231 +
.../org/apache/lucene/document/LatLonPoint.java | 3 +-
.../lucene/search/TermAutomatonQuery.java | 13 +-
.../document/TestFloatPointNearestNeighbor.java | 239 +
.../search/TestLatLonBoundingBoxQueries.java | 299 +
.../lucene/search/TestTermAutomatonQuery.java | 60 +
lucene/site/xsl/index.xsl | 2 +-
lucene/spatial-extras/build.xml | 9 +
.../spatial/spatial4j/Geo3dBinaryCodec.java | 130 +
.../spatial/spatial4j/Geo3dCircleShape.java | 82 +
.../spatial4j/Geo3dDistanceCalculator.java | 154 +
.../spatial/spatial4j/Geo3dPointShape.java | 78 +
.../spatial/spatial4j/Geo3dRectangleShape.java | 163 +
.../lucene/spatial/spatial4j/Geo3dShape.java | 169 +-
.../spatial/spatial4j/Geo3dShapeFactory.java | 396 +
.../spatial4j/Geo3dSpatialContextFactory.java | 94 +
.../apache/lucene/spatial/SpatialArgsTest.java | 12 +-
.../lucene/spatial/spatial4j/Geo3dRptTest.java | 193 +-
.../Geo3dShapeRectRelationTestCase.java | 20 +-
.../Geo3dShapeSphereModelRectRelationTest.java | 29 +-
.../Geo3dShapeWGS84ModelRectRelationTest.java | 21 +
.../apache/lucene/spatial3d/geom/Bounded.java | 35 +
.../lucene/spatial3d/geom/GeoCircleFactory.java | 16 +
.../lucene/spatial3d/geom/GeoExactCircle.java | 373 +
.../apache/lucene/spatial3d/geom/GeoShape.java | 10 +-
.../lucene/spatial3d/geom/PlanetModel.java | 61 +-
.../lucene/spatial3d/geom/StandardObjects.java | 1 +
.../lucene/spatial3d/geom/GeoCircleTest.java | 83 +
.../geom/RandomGeo3dShapeGenerator.java | 148 +-
.../analyzing/SuggestStopFilterFactory.java | 1 +
.../java/org/apache/lucene/geo/GeoTestUtil.java | 5 +
.../index/BaseSegmentInfoFormatTestCase.java | 3 +-
.../ThreadedIndexingAndSearchingTestCase.java | 42 +-
.../search/BaseRangeFieldQueryTestCase.java | 10 +-
.../org/apache/lucene/search/CheckHits.java | 35 +-
.../lucene/search/ShardSearchingTestBase.java | 42 +-
.../similarities/AssertingSimilarity.java | 152 +
.../similarities/BaseSimilarityTestCase.java | 473 +
.../util/TestRuleSetupAndRestoreClassEnv.java | 3 +-
.../java/org/apache/lucene/util/TestUtil.java | 2 +-
solr/CHANGES.txt | 299 +-
solr/NOTICE.txt | 5 +-
solr/README.txt | 4 +-
solr/bin/solr | 4 +
solr/bin/solr.in.cmd | 3 +
solr/bin/solr.in.sh | 3 +
solr/build.xml | 29 +-
solr/common-build.xml | 9 +-
.../solr/analytics/AnalyticsRequestParser.java | 26 -
.../solr/analytics/ExpressionFactory.java | 136 +-
.../function/field/AnalyticsField.java | 5 +
.../function/mapping/BottomFunction.java | 4 +-
.../function/mapping/CompareFunction.java | 614 -
.../function/mapping/ComparisonFunction.java | 318 +
.../function/mapping/ConcatFunction.java | 95 +-
.../function/mapping/DateMathFunction.java | 8 +-
.../function/mapping/DateParseFunction.java | 24 +-
.../DecimalNumericConversionFunction.java | 271 +
.../function/mapping/EqualFunction.java | 238 +
.../function/mapping/ExistsFunction.java | 123 +
.../function/mapping/FillMissingFunction.java | 5 +-
.../function/mapping/FilterFunction.java | 3 +-
.../analytics/function/mapping/IfFunction.java | 3 +-
.../function/mapping/JoinFunction.java | 57 -
.../function/mapping/LogicFunction.java | 2 +-
.../mapping/NumericConvertFunction.java | 256 -
.../function/mapping/RemoveFunction.java | 39 +-
.../function/mapping/ReplaceFunction.java | 65 +-
.../analytics/function/mapping/TopFunction.java | 4 +-
.../function/reduction/DocCountFunction.java | 2 +-
.../function/reduction/MeanFunction.java | 97 +
.../function/reduction/OrdinalFunction.java | 44 +-
.../function/reduction/PercentileFunction.java | 16 +-
.../function/reduction/SumFunction.java | 2 +-
.../reduction/data/SortedListCollector.java | 25 +-
.../plugin/AnalyticsStatisticsCollector.java | 104 -
.../solr/analytics/util/OldAnalyticsParams.java | 3 +-
.../solr/analytics/util/OrdinalCalculator.java | 5 +-
.../solr/analytics/value/AnalyticsValue.java | 6 +-
.../analytics/value/AnalyticsValueStream.java | 17 +
.../solr/analytics/value/BooleanValue.java | 8 +
.../analytics/value/BooleanValueStream.java | 4 +
.../apache/solr/analytics/value/DateValue.java | 11 +-
.../solr/analytics/value/DateValueStream.java | 6 +-
.../solr/analytics/value/DoubleValue.java | 8 +
.../solr/analytics/value/DoubleValueStream.java | 4 +
.../apache/solr/analytics/value/FloatValue.java | 8 +
.../solr/analytics/value/FloatValueStream.java | 4 +
.../apache/solr/analytics/value/IntValue.java | 8 +
.../solr/analytics/value/IntValueStream.java | 4 +
.../apache/solr/analytics/value/LongValue.java | 8 +
.../solr/analytics/value/LongValueStream.java | 4 +
.../solr/analytics/value/StringValue.java | 8 +
.../solr/analytics/value/StringValueStream.java | 4 +
.../analytics/value/constant/ConstantValue.java | 73 +-
.../test-files/solr/analytics/expressions.txt | 65 -
.../test-files/solr/analytics/facetSorting.txt | 4 -
.../solr/analytics/fieldFacetExtras.txt | 66 -
.../test-files/solr/analytics/fieldFacets.txt | 132 -
.../src/test-files/solr/analytics/functions.txt | 57 -
.../solr/analytics/legacy/expressions.txt | 65 +
.../solr/analytics/legacy/facetSorting.txt | 4 +
.../solr/analytics/legacy/fieldFacetExtras.txt | 66 +
.../solr/analytics/legacy/fieldFacets.txt | 132 +
.../solr/analytics/legacy/functions.txt | 57 +
.../solr/analytics/legacy/noFacets.txt | 74 +
.../solr/analytics/legacy/queryFacets.txt | 27 +
.../solr/analytics/legacy/rangeFacets.txt | 161 +
.../src/test-files/solr/analytics/noFacets.txt | 74 -
.../test-files/solr/analytics/queryFacets.txt | 27 -
.../test-files/solr/analytics/rangeFacets.txt | 161 -
.../solr/collection1/conf/schema-analytics.xml | 123 +-
.../configsets/cloud-analytics/conf/schema.xml | 66 +-
.../AbstractAnalyticsStatsCloudTest.java | 187 -
.../analytics/AbstractAnalyticsStatsTest.java | 235 -
.../solr/analytics/ExpressionFactoryTest.java | 249 +
.../apache/solr/analytics/NoFacetCloudTest.java | 557 -
.../org/apache/solr/analytics/NoFacetTest.java | 536 +-
.../solr/analytics/OverallAnalyticsTest.java | 320 +
.../solr/analytics/SolrAnalyticsTestCase.java | 349 +
.../analytics/expression/ExpressionTest.java | 201 -
.../solr/analytics/expression/FunctionTest.java | 221 -
.../facet/AbstractAnalyticsFacetCloudTest.java | 284 -
.../facet/AbstractAnalyticsFacetTest.java | 343 -
.../solr/analytics/facet/FacetSortingTest.java | 53 -
.../analytics/facet/FieldFacetCloudTest.java | 1212 -
.../facet/FieldFacetExtrasCloudTest.java | 253 -
.../analytics/facet/FieldFacetExtrasTest.java | 170 -
.../solr/analytics/facet/FieldFacetTest.java | 1065 -
.../solr/analytics/facet/PivotFacetTest.java | 230 +
.../analytics/facet/QueryFacetCloudTest.java | 159 -
.../solr/analytics/facet/QueryFacetTest.java | 150 +-
.../analytics/facet/RangeFacetCloudTest.java | 588 -
.../solr/analytics/facet/RangeFacetTest.java | 620 +-
.../facet/SolrAnalyticsFacetTestCase.java | 80 +
.../solr/analytics/facet/ValueFacetTest.java | 433 +
.../field/AbstractAnalyticsFieldTest.java | 299 +
.../function/field/BooleanFieldsTest.java | 71 +
.../function/field/DateFieldsTest.java | 108 +
.../function/field/DoubleFieldsTest.java | 108 +
.../function/field/FloatFieldsTest.java | 108 +
.../analytics/function/field/IntFieldsTest.java | 108 +
.../function/field/LongFieldsTest.java | 108 +
.../function/field/StringFieldsTest.java | 71 +
.../mapping/AbsoluteValueFunctionTest.java | 267 +
.../function/mapping/AddFunctionTest.java | 156 +
.../function/mapping/AndFunctionTest.java | 192 +
.../function/mapping/BottomFunctionTest.java | 406 +
.../function/mapping/CeilingFunctionTest.java | 180 +
.../function/mapping/ConcatFunctionTest.java | 317 +
.../function/mapping/DateMathFunctionTest.java | 127 +
.../function/mapping/DateParseFunctionTest.java | 245 +
.../function/mapping/DivideFunctionTest.java | 128 +
.../function/mapping/EqualFunctionTest.java | 530 +
.../function/mapping/ExistsFunctionTest.java | 74 +
.../mapping/FillMissingFunctionTest.java | 717 +
.../function/mapping/FilterFunctionTest.java | 1035 +
.../function/mapping/FloorFunctionTest.java | 180 +
.../function/mapping/GTEFunctionTest.java | 290 +
.../function/mapping/GTFunctionTest.java | 290 +
.../function/mapping/IfFunctionTest.java | 994 +
.../function/mapping/LTEFunctionTest.java | 290 +
.../function/mapping/LTFunctionTest.java | 290 +
.../function/mapping/LogFunctionTest.java | 186 +
.../function/mapping/MultFunctionTest.java | 155 +
.../function/mapping/NegateFunctionTest.java | 327 +
.../function/mapping/OrFunctionTest.java | 192 +
.../function/mapping/PowerFunctionTest.java | 128 +
.../function/mapping/RemoveFunctionTest.java | 849 +
.../function/mapping/ReplaceFunctionTest.java | 990 +
.../function/mapping/RoundFunctionTest.java | 180 +
.../mapping/StringCastFunctionTest.java | 87 +
.../function/mapping/SubtractFunctionTest.java | 128 +
.../function/mapping/TopFunctionTest.java | 406 +
.../LegacyAbstractAnalyticsCloudTest.java | 167 +
.../legacy/LegacyAbstractAnalyticsTest.java | 234 +
.../legacy/LegacyNoFacetCloudTest.java | 551 +
.../analytics/legacy/LegacyNoFacetTest.java | 450 +
.../legacy/expression/LegacyExpressionTest.java | 201 +
.../legacy/expression/LegacyFunctionTest.java | 221 +
.../LegacyAbstractAnalyticsFacetCloudTest.java | 194 +
.../facet/LegacyAbstractAnalyticsFacetTest.java | 342 +
.../legacy/facet/LegacyFacetSortingTest.java | 53 +
.../legacy/facet/LegacyFieldFacetCloudTest.java | 1212 +
.../facet/LegacyFieldFacetExtrasCloudTest.java | 253 +
.../facet/LegacyFieldFacetExtrasTest.java | 170 +
.../legacy/facet/LegacyFieldFacetTest.java | 1065 +
.../legacy/facet/LegacyQueryFacetCloudTest.java | 159 +
.../legacy/facet/LegacyQueryFacetTest.java | 124 +
.../legacy/facet/LegacyRangeFacetCloudTest.java | 588 +
.../legacy/facet/LegacyRangeFacetTest.java | 417 +
.../value/CastingAnalyticsValueTest.java | 56 +
.../value/CastingBooleanValueStreamTest.java | 79 +
.../value/CastingBooleanValueTest.java | 159 +
.../value/CastingDateValueStreamTest.java | 111 +
.../analytics/value/CastingDateValueTest.java | 172 +
.../value/CastingDoubleValueStreamTest.java | 79 +
.../analytics/value/CastingDoubleValueTest.java | 159 +
.../value/CastingFloatValueStreamTest.java | 102 +
.../analytics/value/CastingFloatValueTest.java | 198 +
.../value/CastingIntValueStreamTest.java | 148 +
.../analytics/value/CastingIntValueTest.java | 276 +
.../value/CastingLongValueStreamTest.java | 102 +
.../analytics/value/CastingLongValueTest.java | 198 +
.../value/CastingStringValueStreamTest.java | 56 +
.../analytics/value/CastingStringValueTest.java | 120 +
.../solr/analytics/value/ConstantValueTest.java | 368 +
.../solr/analytics/value/FillableTestValue.java | 641 +
.../solr/collection1/conf/solrconfig.xml | 25 -
.../handler/dataimport/TikaEntityProcessor.java | 4 +
.../src/test-files/dihextras/test_vsdx.vsdx | Bin 0 -> 44426 bytes
.../dataimport/TestTikaEntityProcessor.java | 22 +
solr/contrib/extraction/ivy.xml | 6 +-
.../solr/collection1/conf/solrconfig.xml | 18 -
solr/contrib/ltr/README.md | 2 +-
.../apache/solr/ltr/feature/SolrFeature.java | 2 +-
.../solr/collection1/conf/solrconfig-ltr.xml | 2 +-
.../collection1/conf/solrconfig-ltr_Th10_10.xml | 2 +-
.../collection1/conf/solrconfig-multiseg.xml | 2 +-
.../UIMAUpdateRequestProcessorFactory.java | 2 +-
.../uima/solr/collection1/conf/solrconfig.xml | 25 -
.../uima/uima-tokenizers-solrconfig.xml | 27 +-
solr/core/build.xml | 3 +-
.../java/org/apache/solr/api/V2HttpCall.java | 36 +-
.../apache/solr/cloud/ActiveReplicaWatcher.java | 170 +
.../org/apache/solr/cloud/AddReplicaCmd.java | 24 +-
.../src/java/org/apache/solr/cloud/Assign.java | 2 +-
.../org/apache/solr/cloud/CreateAliasCmd.java | 52 +-
.../apache/solr/cloud/CreateCollectionCmd.java | 7 +-
.../org/apache/solr/cloud/CreateShardCmd.java | 11 +-
.../org/apache/solr/cloud/DeleteAliasCmd.java | 24 +-
.../org/apache/solr/cloud/ElectionContext.java | 39 +-
.../solr/cloud/LeaderRecoveryWatcher.java | 88 +
.../org/apache/solr/cloud/MoveReplicaCmd.java | 29 +-
.../java/org/apache/solr/cloud/Overseer.java | 163 +-
.../cloud/OverseerCollectionMessageHandler.java | 13 +-
.../solr/cloud/OverseerNodePrioritizer.java | 1 -
.../org/apache/solr/cloud/RecoveryStrategy.java | 8 +-
.../org/apache/solr/cloud/ReplaceNodeCmd.java | 100 +-
.../apache/solr/cloud/ReplicateFromLeader.java | 7 +-
.../org/apache/solr/cloud/SplitShardCmd.java | 8 +-
.../org/apache/solr/cloud/ZkController.java | 54 +-
.../apache/solr/cloud/ZkDistributedQueue.java | 69 +
.../solr/cloud/ZkDistributedQueueFactory.java | 43 +
.../autoscaling/AutoAddReplicasPlanAction.java | 7 +-
.../solr/cloud/autoscaling/AutoScaling.java | 8 +-
.../cloud/autoscaling/AutoScalingHandler.java | 61 +-
.../cloud/autoscaling/ComputePlanAction.java | 66 +-
.../cloud/autoscaling/ExecutePlanAction.java | 12 +-
.../cloud/autoscaling/NodeAddedTrigger.java | 18 +-
.../solr/cloud/autoscaling/NodeLostTrigger.java | 2 +-
.../autoscaling/OverseerTriggerThread.java | 9 +-
.../cloud/autoscaling/ScheduledTriggers.java | 51 +-
.../cloud/autoscaling/SearchRateTrigger.java | 265 +
.../solr/cloud/autoscaling/TriggerAction.java | 2 +-
.../solr/cloud/autoscaling/TriggerBase.java | 8 +-
.../solr/cloud/autoscaling/TriggerEvent.java | 9 +-
.../cloud/autoscaling/TriggerEventQueue.java | 25 +-
.../autoscaling/ZkDistributedQueueFactory.java | 4 +-
.../solr/cloud/overseer/ZkStateWriter.java | 107 +-
.../org/apache/solr/core/CoreContainer.java | 56 +-
.../apache/solr/core/RunExecutableListener.java | 148 -
.../java/org/apache/solr/core/SolrCores.java | 17 +-
.../org/apache/solr/core/SolrXmlConfig.java | 3 +-
.../apache/solr/handler/CalciteJDBCStream.java | 1 +
.../apache/solr/handler/CdcrRequestHandler.java | 9 +-
.../org/apache/solr/handler/ClassifyStream.java | 3 +-
.../org/apache/solr/handler/GraphHandler.java | 3 +
.../org/apache/solr/handler/IndexFetcher.java | 23 +-
.../apache/solr/handler/ReplicationHandler.java | 35 +-
.../org/apache/solr/handler/StreamHandler.java | 84 +-
.../admin/AutoscalingHistoryHandler.java | 32 +-
.../solr/handler/admin/ClusterStatus.java | 34 +-
.../solr/handler/admin/CollectionsHandler.java | 16 +-
.../solr/handler/admin/MetricsHandler.java | 11 +-
.../solr/handler/admin/PrepRecoveryOp.java | 33 -
.../org/apache/solr/handler/sql/SolrSchema.java | 6 +-
.../solr/highlight/UnifiedSolrHighlighter.java | 18 +-
.../solr/index/SlowCompositeReaderWrapper.java | 16 +-
.../solr/metrics/SolrCoreMetricManager.java | 30 +-
.../apache/solr/metrics/SolrMetricManager.java | 54 +-
.../metrics/reporters/SolrGraphiteReporter.java | 12 +-
.../reporters/solr/SolrClusterReporter.java | 15 +-
.../reporters/solr/SolrShardReporter.java | 13 +-
.../solr/request/RegexBytesRefFilter.java | 46 +
.../org/apache/solr/request/SimpleFacets.java | 44 +-
.../solr/response/RetrieveFieldsOptimizer.java | 6 +-
.../analysis/BaseManagedTokenFilterFactory.java | 1 +
.../analysis/ManagedStopFilterFactory.java | 1 +
.../analysis/ManagedSynonymFilterFactory.java | 1 +
.../ManagedSynonymGraphFilterFactory.java | 1 +
.../solr/schema/AbstractSpatialFieldType.java | 5 +
.../apache/solr/schema/ExternalFileField.java | 1 -
.../solr/search/FloatPayloadValueSource.java | 12 +-
.../org/apache/solr/search/SolrCoreParser.java | 8 +
.../apache/solr/search/SolrDocumentFetcher.java | 279 +-
.../apache/solr/search/XmlQParserPlugin.java | 34 +
.../apache/solr/search/facet/FacetField.java | 3 +-
.../search/join/ScoreJoinQParserPlugin.java | 30 +-
.../solr/search/stats/CollectionStats.java | 3 +
.../solr/search/stats/ExactStatsCache.java | 7 +-
.../org/apache/solr/search/stats/TermStats.java | 3 +
.../org/apache/solr/servlet/HttpSolrCall.java | 250 +-
.../apache/solr/servlet/SolrDispatchFilter.java | 2 +-
.../solr/update/DirectUpdateHandler2.java | 9 +-
.../java/org/apache/solr/update/UpdateLog.java | 12 +-
...tractDefaultValueUpdateProcessorFactory.java | 1 +
.../AddSchemaFieldsUpdateProcessorFactory.java | 1 +
.../processor/AtomicUpdateProcessorFactory.java | 3 +-
.../processor/CdcrUpdateProcessorFactory.java | 1 +
.../ClassificationUpdateProcessorFactory.java | 1 +
.../ClassificationUpdateProcessorParams.java | 2 +-
.../CloneFieldUpdateProcessorFactory.java | 1 +
.../ConcatFieldUpdateProcessorFactory.java | 1 +
.../CountFieldValuesUpdateProcessorFactory.java | 1 +
.../DefaultValueUpdateProcessorFactory.java | 1 +
.../processor/DistributedUpdateProcessor.java | 308 +-
.../DistributedUpdateProcessorFactory.java | 1 +
...BasedVersionConstraintsProcessorFactory.java | 1 +
.../DocExpirationUpdateProcessorFactory.java | 1 +
.../FieldLengthUpdateProcessorFactory.java | 1 +
.../FieldMutatingUpdateProcessorFactory.java | 1 +
...FieldNameMutatingUpdateProcessorFactory.java | 1 +
.../FieldValueSubsetUpdateProcessorFactory.java | 1 +
.../FirstFieldValueUpdateProcessorFactory.java | 1 +
.../HTMLStripFieldUpdateProcessorFactory.java | 1 +
...oreCommitOptimizeUpdateProcessorFactory.java | 1 +
.../IgnoreFieldUpdateProcessorFactory.java | 1 +
.../LastFieldValueUpdateProcessorFactory.java | 1 +
.../MaxFieldValueUpdateProcessorFactory.java | 1 +
.../MinFieldValueUpdateProcessorFactory.java | 1 +
.../NoOpDistributingUpdateProcessorFactory.java | 1 +
...ParseBooleanFieldUpdateProcessorFactory.java | 1 +
.../ParseDateFieldUpdateProcessorFactory.java | 1 +
.../ParseDoubleFieldUpdateProcessorFactory.java | 1 +
.../ParseFloatFieldUpdateProcessorFactory.java | 1 +
.../ParseIntFieldUpdateProcessorFactory.java | 1 +
.../ParseLongFieldUpdateProcessorFactory.java | 1 +
...ParseNumericFieldUpdateProcessorFactory.java | 1 +
.../PreAnalyzedUpdateProcessorFactory.java | 1 +
.../processor/RegexReplaceProcessorFactory.java | 1 +
.../processor/RegexpBoostProcessorFactory.java | 1 +
.../RemoveBlankFieldUpdateProcessorFactory.java | 1 +
.../processor/SimpleUpdateProcessorFactory.java | 1 +
.../SkipExistingDocumentsProcessorFactory.java | 1 +
.../StatelessScriptUpdateProcessorFactory.java | 1 +
.../TemplateUpdateProcessorFactory.java | 1 +
.../TimestampUpdateProcessorFactory.java | 1 +
.../TolerantUpdateProcessorFactory.java | 1 +
.../TrimFieldUpdateProcessorFactory.java | 1 +
.../TruncateFieldUpdateProcessorFactory.java | 1 +
.../processor/URLClassifyProcessorFactory.java | 1 +
.../processor/UUIDUpdateProcessorFactory.java | 1 +
.../UniqFieldsUpdateProcessorFactory.java | 1 +
.../processor/UpdateRequestProcessor.java | 1 +
.../src/java/org/apache/solr/util/IdUtils.java | 16 +
.../java/org/apache/solr/util/NumberUtils.java | 8 +-
.../solr/collection1/conf/schema-spatial.xml | 7 +
.../solr/collection1/conf/schema_latest.xml | 5 +-
.../conf/solrconfig-analytics-query.xml | 17 -
.../conf/solrconfig-collapseqparser.xml | 17 -
.../collection1/conf/solrconfig-elevate.xml | 17 -
.../conf/solrconfig-plugcollector.xml | 16 -
.../collection1/conf/solrconfig-spatial.xml | 6 +
.../solr/collection1/conf/solrconfig.xml | 17 -
.../configsets/_default/conf/managed-schema | 5 +-
.../configsets/_default/conf/solrconfig.xml | 23 -
.../solr/configsets/backcompat/conf/schema.xml | 22 +
.../configsets/backcompat/conf/solrconfig.xml | 43 +
.../with-run-executable-listener/managed-schema | 25 -
.../with-run-executable-listener/solrconfig.xml | 69 -
.../test-files/solr/solr-graphitereporter.xml | 2 +-
.../backcompat/TestLuceneIndexBackCompat.java | 96 +
.../org/apache/solr/cloud/AddReplicaTest.java | 119 +
.../apache/solr/cloud/AliasIntegrationTest.java | 149 +-
.../cloud/AssignBackwardCompatibilityTest.java | 27 +-
.../apache/solr/cloud/CdcrBootstrapTest.java | 83 +-
.../cloud/CollectionsAPIDistributedZkTest.java | 16 +-
.../org/apache/solr/cloud/DeleteShardTest.java | 1 -
.../cloud/DistribJoinFromCollectionTest.java | 9 +-
.../apache/solr/cloud/DistributedQueueTest.java | 4 +-
.../org/apache/solr/cloud/ForceLeaderTest.java | 2 +-
.../solr/cloud/HealthCheckHandlerTest.java | 58 +-
.../cloud/LeaderElectionContextKeyTest.java | 69 +-
.../org/apache/solr/cloud/MoveReplicaTest.java | 122 +-
...verseerCollectionConfigSetProcessorTest.java | 12 +-
.../org/apache/solr/cloud/OverseerTest.java | 137 +-
.../org/apache/solr/cloud/ReplaceNodeTest.java | 45 +-
.../cloud/TestCloudJSONFacetJoinDomain.java | 191 +-
.../apache/solr/cloud/TestConfigSetsAPI.java | 12 -
.../cloud/TestRandomRequestDistribution.java | 4 +-
.../solr/cloud/TestSkipOverseerOperations.java | 125 +
.../org/apache/solr/cloud/TestTlogReplica.java | 73 +-
.../org/apache/solr/cloud/ZkSolrClientTest.java | 13 +-
.../AutoAddReplicasIntegrationTest.java | 6 +-
.../AutoAddReplicasPlanActionTest.java | 4 +-
.../autoscaling/AutoScalingHandlerTest.java | 26 +-
.../autoscaling/ComputePlanActionTest.java | 39 +-
.../autoscaling/ExecutePlanActionTest.java | 46 +-
.../autoscaling/SearchRateTriggerTest.java | 191 +
.../autoscaling/SystemLogListenerTest.java | 1 +
.../solr/cloud/autoscaling/TestPolicyCloud.java | 52 +-
.../autoscaling/TriggerIntegrationTest.java | 85 +-
.../solr/cloud/overseer/ZkStateReaderTest.java | 9 +-
.../solr/cloud/overseer/ZkStateWriterTest.java | 109 +-
.../common/cloud/ZkStateReaderAccessor.java | 36 +
.../handler/BinaryUpdateRequestHandlerTest.java | 11 +-
.../admin/AutoscalingHistoryHandlerTest.java | 50 +-
.../solr/handler/admin/MetricsHandlerTest.java | 9 +
.../highlight/TestUnifiedSolrHighlighter.java | 3 +
.../solr/metrics/SolrCoreMetricManagerTest.java | 2 +-
.../solr/metrics/SolrMetricManagerTest.java | 6 +-
.../metrics/reporters/SolrJmxReporterTest.java | 8 +-
.../reporters/solr/SolrShardReporterTest.java | 3 +-
.../solr/request/RegexBytesRefFilterTest.java | 34 +
.../apache/solr/request/SimpleFacetsTest.java | 30 +
.../solr/schema/SpatialRPTFieldTypeTest.java | 12 +-
.../apache/solr/search/TestSolr4Spatial2.java | 40 +-
.../solr/search/function/TestFunctionQuery.java | 56 +-
.../org/apache/solr/update/AutoCommitTest.java | 390 -
.../apache/solr/update/HardAutoCommitTest.java | 137 -
.../apache/solr/update/SoftAutoCommitTest.java | 103 +-
.../org/apache/solr/util/NumberUtilsTest.java | 40 +
solr/example/README.txt | 4 +-
.../example-DIH/solr/db/conf/managed-schema | 5 +-
.../example-DIH/solr/db/conf/solrconfig.xml | 23 -
.../example-DIH/solr/mail/conf/managed-schema | 5 +-
.../example-DIH/solr/mail/conf/solrconfig.xml | 23 -
.../example-DIH/solr/solr/conf/managed-schema | 5 +-
.../example-DIH/solr/solr/conf/solrconfig.xml | 23 -
solr/example/files/conf/solrconfig.xml | 23 -
.../asciidoctor-ant-1.6.0-alpha.3.jar.sha1 | 1 -
.../asciidoctor-ant-1.6.0-alpha.5.jar.sha1 | 1 +
solr/licenses/commons-collections4-4.1.jar.sha1 | 1 +
.../commons-collections4-LICENSE-ASL.txt | 202 +
solr/licenses/commons-collections4-NOTICE.txt | 5 +
solr/licenses/commons-compress-1.11.jar.sha1 | 1 -
solr/licenses/commons-compress-1.14.jar.sha1 | 1 +
solr/licenses/curvesapi-1.04.jar.sha1 | 1 +
solr/licenses/curvesapi-LICENSE-BSD_LIKE.txt | 28 +
solr/licenses/curvesapi-NOTICE.txt | 2 +
solr/licenses/fontbox-2.0.1.jar.sha1 | 1 -
solr/licenses/fontbox-2.0.6.jar.sha1 | 1 +
solr/licenses/jackcess-2.1.3.jar.sha1 | 1 -
solr/licenses/jackcess-2.1.8.jar.sha1 | 1 +
solr/licenses/jempbox-1.8.12.jar.sha1 | 1 -
solr/licenses/jempbox-1.8.13.jar.sha1 | 1 +
solr/licenses/jmatio-1.0.jar.sha1 | 1 -
solr/licenses/jmatio-1.2.jar.sha1 | 1 +
solr/licenses/metadata-extractor-2.8.1.jar.sha1 | 1 -
solr/licenses/metadata-extractor-2.9.1.jar.sha1 | 1 +
solr/licenses/pdfbox-2.0.1.jar.sha1 | 1 -
solr/licenses/pdfbox-2.0.6.jar.sha1 | 1 +
solr/licenses/pdfbox-tools-2.0.1.jar.sha1 | 1 -
solr/licenses/pdfbox-tools-2.0.6.jar.sha1 | 1 +
solr/licenses/poi-3.15-beta1.jar.sha1 | 1 -
solr/licenses/poi-3.17-beta1.jar.sha1 | 1 +
solr/licenses/poi-ooxml-3.15-beta1.jar.sha1 | 1 -
solr/licenses/poi-ooxml-3.17-beta1.jar.sha1 | 1 +
.../poi-ooxml-schemas-3.15-beta1.jar.sha1 | 1 -
.../poi-ooxml-schemas-3.17-beta1.jar.sha1 | 1 +
.../licenses/poi-scratchpad-3.15-beta1.jar.sha1 | 1 -
.../licenses/poi-scratchpad-3.17-beta1.jar.sha1 | 1 +
solr/licenses/rome-1.0.jar.sha1 | 1 -
solr/licenses/rome-1.5.1.jar.sha1 | 1 +
solr/licenses/tika-core-1.13.jar.sha1 | 1 -
solr/licenses/tika-core-1.16.jar.sha1 | 1 +
solr/licenses/tika-java7-1.13.jar.sha1 | 1 -
solr/licenses/tika-java7-1.16.jar.sha1 | 1 +
solr/licenses/tika-parsers-1.13.jar.sha1 | 1 -
solr/licenses/tika-parsers-1.16.jar.sha1 | 1 +
solr/licenses/tika-xmp-1.13.jar.sha1 | 1 -
solr/licenses/tika-xmp-1.16.jar.sha1 | 1 +
solr/licenses/xz-1.5.jar.sha1 | 1 -
solr/licenses/xz-1.6.jar.sha1 | 1 +
solr/server/solr/README.txt | 6 +-
.../configsets/_default/conf/managed-schema | 5 +-
.../configsets/_default/conf/solrconfig.xml | 23 -
.../conf/managed-schema | 5 +-
.../conf/solrconfig.xml | 23 -
solr/site/index.xsl | 3 +-
solr/site/quickstart.mdtext | 612 -
solr/solr-ref-guide/build.xml | 5 +
solr/solr-ref-guide/src/_includes/head.html | 2 +-
solr/solr-ref-guide/src/_includes/sidebar.html | 6 +-
solr/solr-ref-guide/src/_layouts/default.html | 4 +-
solr/solr-ref-guide/src/_layouts/page.html | 9 +-
.../solr-ref-guide/src/_layouts/page_print.html | 2 +-
solr/solr-ref-guide/src/a-quick-overview.adoc | 2 -
solr/solr-ref-guide/src/about-filters.adoc | 2 -
solr/solr-ref-guide/src/about-this-guide.adoc | 6 +-
solr/solr-ref-guide/src/about-tokenizers.adoc | 6 +-
...adding-custom-plugins-in-solrcloud-mode.adoc | 2 -
solr/solr-ref-guide/src/analysis-screen.adoc | 2 -
solr/solr-ref-guide/src/analyzers.adoc | 4 +-
...uthentication-and-authorization-plugins.adoc | 2 -
.../src/basic-authentication-plugin.adoc | 6 +-
solr/solr-ref-guide/src/blob-store-api.adoc | 7 +-
solr/solr-ref-guide/src/blockjoin-faceting.adoc | 2 -
.../solr-ref-guide/src/charfilterfactories.adoc | 2 -
.../src/choosing-an-output-format.adoc | 2 -
solr/solr-ref-guide/src/client-api-lineup.adoc | 2 -
solr/solr-ref-guide/src/client-apis.adoc | 2 -
solr/solr-ref-guide/src/cloud-screens.adoc | 2 -
solr/solr-ref-guide/src/codec-factory.adoc | 2 -
.../src/collapse-and-expand-results.adoc | 24 +-
.../src/collection-specific-tools.adoc | 2 -
solr/solr-ref-guide/src/collections-api.adoc | 69 +-
.../src/collections-core-admin.adoc | 2 -
.../combining-distribution-and-replication.adoc | 2 -
.../src/command-line-utilities.adoc | 8 +-
.../src/common-query-parameters.adoc | 8 +-
solr/solr-ref-guide/src/config-api.adoc | 14 +-
solr/solr-ref-guide/src/config-sets.adoc | 2 -
solr/solr-ref-guide/src/configsets-api.adoc | 13 +-
solr/solr-ref-guide/src/configuration-apis.adoc | 2 -
.../solr-ref-guide/src/configuring-logging.adoc | 6 +-
.../src/configuring-solrconfig-xml.adoc | 2 -
solr/solr-ref-guide/src/content-streams.adoc | 2 -
solr/solr-ref-guide/src/copying-fields.adoc | 4 +-
.../solr-ref-guide/src/core-specific-tools.adoc | 2 -
solr/solr-ref-guide/src/coreadmin-api.adoc | 6 +-
.../src/cross-data-center-replication-cdcr.adoc | 2 -
solr/solr-ref-guide/src/css/ref-guide.css | 2 +-
...adir-and-directoryfactory-in-solrconfig.adoc | 4 +-
solr/solr-ref-guide/src/dataimport-screen.adoc | 2 -
solr/solr-ref-guide/src/de-duplication.adoc | 2 -
.../src/defining-core-properties.adoc | 2 -
solr/solr-ref-guide/src/defining-fields.adoc | 2 -
.../src/deployment-and-operations.adoc | 36 +
.../detecting-languages-during-indexing.adoc | 2 -
.../src/distributed-requests.adoc | 2 -
.../distributed-search-with-index-sharding.adoc | 4 +-
.../src/documents-fields-and-schema-design.adoc | 2 -
solr/solr-ref-guide/src/documents-screen.adoc | 2 -
solr/solr-ref-guide/src/docvalues.adoc | 6 +-
solr/solr-ref-guide/src/dynamic-fields.adoc | 2 -
solr/solr-ref-guide/src/enabling-ssl.adoc | 22 +-
solr/solr-ref-guide/src/errata.adoc | 6 +-
.../src/exporting-result-sets.adoc | 2 -
solr/solr-ref-guide/src/faceting.adoc | 12 +-
.../src/field-properties-by-use-case.adoc | 5 +-
.../field-type-definitions-and-properties.adoc | 8 +-
.../src/field-types-included-with-solr.adoc | 2 -
solr/solr-ref-guide/src/files-screen.adoc | 2 -
.../solr-ref-guide/src/filter-descriptions.adoc | 8 +-
solr/solr-ref-guide/src/format-of-solr-xml.adoc | 2 -
solr/solr-ref-guide/src/function-queries.adoc | 35 +-
solr/solr-ref-guide/src/further-assistance.adoc | 2 -
solr/solr-ref-guide/src/getting-assistance.adoc | 2 -
.../src/getting-started-with-solrcloud.adoc | 4 +-
solr/solr-ref-guide/src/getting-started.adoc | 18 +-
solr/solr-ref-guide/src/graph-traversal.adoc | 2 -
.../src/hadoop-authentication-plugin.adoc | 2 -
solr/solr-ref-guide/src/highlighting.adoc | 8 +-
.../solr-ref-guide/src/how-solrcloud-works.adoc | 2 -
solr/solr-ref-guide/src/how-to-contribute.adoc | 4 +-
.../solr-tutorial/tutorial-add-copy-field.png | Bin 123194 -> 93190 bytes
.../images/solr-tutorial/tutorial-add-field.png | Bin 212142 -> 110529 bytes
.../src/implicit-requesthandlers.adoc | 23 +-
solr/solr-ref-guide/src/index-replication.adoc | 8 +-
solr/solr-ref-guide/src/index.adoc | 12 +-
.../src/indexconfig-in-solrconfig.adoc | 4 +-
.../src/indexing-and-basic-data-operations.adoc | 4 +-
solr/solr-ref-guide/src/indexupgrader-tool.adoc | 17 +-
.../src/initparams-in-solrconfig.adoc | 4 +-
solr/solr-ref-guide/src/installing-solr.adoc | 4 +-
.../src/introduction-to-client-apis.adoc | 2 -
...ntroduction-to-scaling-and-distribution.adoc | 2 -
.../src/introduction-to-solr-indexing.adoc | 2 -
solr/solr-ref-guide/src/java-properties.adoc | 2 -
solr/solr-ref-guide/src/json-query-dsl.adoc | 170 +
solr/solr-ref-guide/src/json-request-api.adoc | 164 +
solr/solr-ref-guide/src/jvm-settings.adoc | 2 -
.../src/kerberos-authentication-plugin.adoc | 6 +-
solr/solr-ref-guide/src/language-analysis.adoc | 6 +-
solr/solr-ref-guide/src/learning-to-rank.adoc | 58 +-
.../src/legacy-scaling-and-distribution.adoc | 2 -
.../src/lib-directives-in-solrconfig.adoc | 2 -
.../src/local-parameters-in-queries.adoc | 2 -
solr/solr-ref-guide/src/logging.adoc | 2 -
.../major-changes-from-solr-5-to-solr-6.adoc | 2 -
.../src/major-changes-in-solr-7.adoc | 14 +-
.../src/making-and-restoring-backups.adoc | 19 +-
solr/solr-ref-guide/src/managed-resources.adoc | 12 +-
solr/solr-ref-guide/src/managing-solr.adoc | 40 -
.../src/mbean-request-handler.adoc | 15 +-
solr/solr-ref-guide/src/merging-indexes.adoc | 2 -
.../src/meta-docs/asciidoc-syntax.adoc | 33 +-
solr/solr-ref-guide/src/meta-docs/jekyll.adoc | 13 +-
solr/solr-ref-guide/src/metrics-reporting.adoc | 245 +-
solr/solr-ref-guide/src/monitoring-solr.adoc | 35 +
solr/solr-ref-guide/src/morelikethis.adoc | 2 -
.../src/near-real-time-searching.adoc | 127 +-
solr/solr-ref-guide/src/other-parsers.adoc | 65 +-
.../src/other-schema-elements.adoc | 2 -
...w-of-documents-fields-and-schema-design.adoc | 2 -
.../src/overview-of-searching-in-solr.adoc | 4 +-
.../src/overview-of-the-solr-admin-ui.adoc | 2 -
.../src/pagination-of-results.adoc | 4 +-
.../src/parallel-sql-interface.adoc | 4 +-
.../solr-ref-guide/src/parameter-reference.adoc | 2 -
.../src/pdf/SolrRefGuide-all.adoc | 1 +
.../src/performance-statistics-reference.adoc | 162 +-
solr/solr-ref-guide/src/phonetic-matching.adoc | 2 -
solr/solr-ref-guide/src/ping.adoc | 4 +-
.../src/plugins-stats-screen.adoc | 2 -
solr/solr-ref-guide/src/post-tool.adoc | 2 -
.../src/putting-the-pieces-together.adoc | 4 +-
solr/solr-ref-guide/src/query-re-ranking.adoc | 4 +-
solr/solr-ref-guide/src/query-screen.adoc | 2 -
.../src/query-settings-in-solrconfig.adoc | 4 +-
.../src/query-syntax-and-parsing.adoc | 2 -
solr/solr-ref-guide/src/realtime-get.adoc | 2 -
solr/solr-ref-guide/src/relevance.adoc | 2 -
solr/solr-ref-guide/src/replication-screen.adoc | 2 -
.../src/request-parameters-api.adoc | 4 +-
.../src/requestdispatcher-in-solrconfig.adoc | 21 +-
...lers-and-searchcomponents-in-solrconfig.adoc | 2 -
solr/solr-ref-guide/src/response-writers.adoc | 30 +-
solr/solr-ref-guide/src/result-clustering.adoc | 4 +-
solr/solr-ref-guide/src/result-grouping.adoc | 2 -
.../src/rule-based-authorization-plugin.adoc | 29 +-
.../src/rule-based-replica-placement.adoc | 8 +-
.../src/running-solr-on-hdfs.adoc | 7 +-
.../src/running-your-analyzer.adoc | 2 -
solr/solr-ref-guide/src/schema-api.adoc | 10 +-
.../src/schema-browser-screen.adoc | 2 -
...schema-factory-definition-in-solrconfig.adoc | 4 +-
solr/solr-ref-guide/src/schemaless-mode.adoc | 6 +-
solr/solr-ref-guide/src/searching.adoc | 6 +-
solr/solr-ref-guide/src/securing-solr.adoc | 2 -
solr/solr-ref-guide/src/segments-info.adoc | 2 -
...tting-up-an-external-zookeeper-ensemble.adoc | 2 -
.../shards-and-indexing-data-in-solrcloud.adoc | 4 +-
.../src/solr-configuration-files.adoc | 2 -
.../src/solr-control-script-reference.adoc | 23 +-
.../src/solr-cores-and-solr-xml.adoc | 2 -
solr/solr-ref-guide/src/solr-field-types.adoc | 2 -
solr/solr-ref-guide/src/solr-glossary.adoc | 4 +-
.../src/solr-jdbc-apache-zeppelin.adoc | 2 -
.../src/solr-jdbc-dbvisualizer.adoc | 2 -
.../src/solr-jdbc-python-jython.adoc | 2 -
solr/solr-ref-guide/src/solr-jdbc-r.adoc | 2 -
.../src/solr-jdbc-squirrel-sql.adoc | 2 -
solr/solr-ref-guide/src/solr-plugins.adoc | 2 -
.../src/solr-system-requirements.adoc | 2 -
solr/solr-ref-guide/src/solr-tutorial.adoc | 12 +-
solr/solr-ref-guide/src/solr-upgrade-notes.adoc | 27 +-
.../src/solrcloud-autoscaling-api.adoc | 215 +-
...solrcloud-autoscaling-auto-add-replicas.adoc | 73 +
.../solrcloud-autoscaling-fault-tolerance.adoc | 59 +
.../src/solrcloud-autoscaling-listeners.adoc | 188 +
.../src/solrcloud-autoscaling-overview.adoc | 66 +-
...olrcloud-autoscaling-policy-preferences.adoc | 27 +-
.../solrcloud-autoscaling-trigger-actions.adoc | 44 +
.../src/solrcloud-autoscaling-triggers.adoc | 108 +
.../src/solrcloud-autoscaling.adoc | 15 +-
.../solrcloud-configuration-and-parameters.adoc | 2 -
...rcloud-query-routing-and-read-tolerance.adoc | 8 +-
...olrcloud-recoveries-and-write-tolerance.adoc | 2 -
.../src/solrcloud-resilience.adoc | 2 -
...lrcloud-with-legacy-configuration-files.adoc | 2 -
solr/solr-ref-guide/src/solrcloud.adoc | 2 -
solr/solr-ref-guide/src/spatial-search.adoc | 87 +-
solr/solr-ref-guide/src/spell-checking.adoc | 6 +-
.../src/statistical-programming.adoc | 261 +-
.../src/stream-decorator-reference.adoc | 1214 +
solr/solr-ref-guide/src/stream-decorators.adoc | 1216 -
.../src/stream-evaluator-reference.adoc | 1787 +
solr/solr-ref-guide/src/stream-evaluators.adoc | 1030 -
solr/solr-ref-guide/src/stream-screen.adoc | 2 -
.../src/stream-source-reference.adoc | 537 +
solr/solr-ref-guide/src/stream-sources.adoc | 540 -
.../src/streaming-expressions.adoc | 11 +-
solr/solr-ref-guide/src/suggester.adoc | 4 +-
.../src/taking-solr-to-production.adoc | 2 -
.../src/the-dismax-query-parser.adoc | 2 -
.../src/the-extended-dismax-query-parser.adoc | 7 +-
.../src/the-query-elevation-component.adoc | 26 +-
.../src/the-standard-query-parser.adoc | 8 +-
.../solr-ref-guide/src/the-stats-component.adoc | 12 +-
.../src/the-term-vector-component.adoc | 11 +-
.../solr-ref-guide/src/the-terms-component.adoc | 20 +-
.../src/the-well-configured-solr-instance.adoc | 6 +-
solr/solr-ref-guide/src/thread-dump.adoc | 2 -
solr/solr-ref-guide/src/tokenizers.adoc | 7 +-
.../transforming-and-indexing-custom-json.adoc | 12 +-
.../src/transforming-result-documents.adoc | 14 +-
solr/solr-ref-guide/src/uima-integration.adoc | 2 -
...anding-analyzers-tokenizers-and-filters.adoc | 2 -
.../src/update-request-processors.adoc | 51 +-
.../src/updatehandlers-in-solrconfig.adoc | 21 +-
.../src/updating-parts-of-documents.adoc | 8 +-
.../src/upgrading-a-solr-cluster.adoc | 20 +-
.../src/uploading-data-with-index-handlers.adoc | 8 +-
...g-data-with-solr-cell-using-apache-tika.adoc | 14 +-
...store-data-with-the-data-import-handler.adoc | 38 +-
solr/solr-ref-guide/src/using-javascript.adoc | 2 -
.../solr-ref-guide/src/using-jmx-with-solr.adoc | 72 +-
solr/solr-ref-guide/src/using-python.adoc | 15 +-
.../src/using-solr-from-ruby.adoc | 2 -
solr/solr-ref-guide/src/using-solrj.adoc | 180 +-
...-the-solr-administration-user-interface.adoc | 2 -
...zookeeper-to-manage-configuration-files.adoc | 2 -
solr/solr-ref-guide/src/v2-api.adoc | 23 +-
.../src/velocity-response-writer.adoc | 4 +-
solr/solr-ref-guide/src/velocity-search-ui.adoc | 2 -
...king-with-currencies-and-exchange-rates.adoc | 4 +-
solr/solr-ref-guide/src/working-with-dates.adoc | 22 +-
.../src/working-with-enum-fields.adoc | 2 -
...rking-with-external-files-and-processes.adoc | 6 +-
.../src/zookeeper-access-control.adoc | 10 +-
.../tools/BuildNavAndPDFBody.java | 64 +-
.../client/solrj/cloud/DistributedQueue.java | 13 +-
.../solrj/cloud/DistributedQueueFactory.java | 28 +
.../cloud/autoscaling/AddReplicaSuggester.java | 5 +-
.../client/solrj/cloud/autoscaling/Clause.java | 195 +-
.../autoscaling/DelegatingCloudManager.java | 8 +-
.../DelegatingClusterStateProvider.java | 18 +-
.../DelegatingNodeStateProvider.java | 2 +-
.../cloud/autoscaling/DistribStateManager.java | 4 +-
.../cloud/autoscaling/MoveReplicaSuggester.java | 16 +-
.../cloud/autoscaling/NodeStateProvider.java | 5 +-
.../solrj/cloud/autoscaling/NoneSuggester.java | 6 +-
.../client/solrj/cloud/autoscaling/Operand.java | 37 +-
.../client/solrj/cloud/autoscaling/Policy.java | 233 +-
.../solrj/cloud/autoscaling/PolicyHelper.java | 53 +-
.../solrj/cloud/autoscaling/ReplicaInfo.java | 39 +-
.../client/solrj/cloud/autoscaling/Row.java | 27 +-
.../cloud/autoscaling/SolrCloudManager.java | 23 +-
.../solrj/cloud/autoscaling/Suggester.java | 267 +
.../solrj/cloud/autoscaling/Suggestion.java | 302 +
.../autoscaling/TriggerEventProcessorStage.java | 4 +-
.../solrj/cloud/autoscaling/VersionedData.java | 8 +-
.../solrj/cloud/autoscaling/Violation.java | 124 +
.../solr/client/solrj/cloud/package-info.java | 23 +
.../client/solrj/impl/BinaryRequestWriter.java | 83 +-
.../solr/client/solrj/impl/CloudSolrClient.java | 219 +-
.../client/solrj/impl/ClusterStateProvider.java | 14 +-
.../solrj/impl/HttpClusterStateProvider.java | 73 +-
.../solr/client/solrj/impl/HttpSolrClient.java | 206 +-
.../client/solrj/impl/SolrClientBuilder.java | 14 +-
.../solrj/impl/SolrClientCloudManager.java | 1 +
.../solrj/impl/SolrClientNodeStateProvider.java | 83 +-
.../impl/ZkClientClusterStateProvider.java | 19 +-
.../solrj/impl/ZkDistribStateManager.java | 4 -
.../io/eval/BetaDistributionEvaluator.java | 48 +
.../io/eval/BinomialCoefficientEvaluator.java | 46 +
.../io/eval/ConstantDistributionEvaluator.java | 44 +
.../eval/EnumeratedDistributionEvaluator.java | 19 +-
.../eval/ExponentialMovingAverageEvaluator.java | 99 +
.../solrj/io/eval/FactorialEvaluator.java | 54 +
.../solrj/io/eval/FieldValueEvaluator.java | 2 +
.../io/eval/GammaDistributionEvaluator.java | 48 +
.../solrj/io/eval/HarmonicFitEvaluator.java | 85 +
.../client/solrj/io/eval/LoessEvaluator.java | 83 +
.../io/eval/LogNormalDistributionEvaluator.java | 48 +
.../solr/client/solrj/io/eval/Matrix.java | 63 +
.../client/solrj/io/eval/MatrixEvaluator.java | 52 +
.../client/solrj/io/eval/MeanEvaluator.java | 57 +
.../client/solrj/io/eval/ModeEvaluator.java | 64 +
.../solrj/io/eval/MonteCarloEvaluator.java | 76 +
.../solrj/io/eval/MovingMedianEvaluator.java | 68 +
.../io/eval/PolyFitDerivativeEvaluator.java | 104 +
.../client/solrj/io/eval/PolyFitEvaluator.java | 102 +
.../solrj/io/eval/RecursiveEvaluator.java | 3 +-
.../client/solrj/io/eval/SampleEvaluator.java | 30 +-
.../solrj/io/eval/TransposeEvaluator.java | 52 +
.../client/solrj/io/eval/UnitEvaluator.java | 77 +
.../io/eval/WeibullDistributionEvaluator.java | 48 +
.../io/eval/ZipFDistributionEvaluator.java | 48 +
.../solrj/io/graph/GatherNodesStream.java | 5 +-
.../solrj/io/graph/ShortestPathStream.java | 3 +
.../client/solrj/io/stream/BiJoinStream.java | 1 +
.../solrj/io/stream/CalculatorStream.java | 5 +-
.../solrj/io/stream/CartesianProductStream.java | 5 +-
.../solr/client/solrj/io/stream/CellStream.java | 5 +-
.../client/solrj/io/stream/CloudSolrStream.java | 39 +-
.../client/solrj/io/stream/CommitStream.java | 1 +
.../solrj/io/stream/ComplementStream.java | 1 +
.../client/solrj/io/stream/DaemonStream.java | 6 +-
.../solr/client/solrj/io/stream/EchoStream.java | 5 +-
.../solr/client/solrj/io/stream/EvalStream.java | 5 +-
.../client/solrj/io/stream/ExceptionStream.java | 3 +
.../client/solrj/io/stream/ExecutorStream.java | 3 +-
.../client/solrj/io/stream/FacetStream.java | 1 +
.../io/stream/FeaturesSelectionStream.java | 3 +
.../client/solrj/io/stream/FetchStream.java | 1 +
.../solr/client/solrj/io/stream/GetStream.java | 5 +-
.../client/solrj/io/stream/HashJoinStream.java | 3 +-
.../client/solrj/io/stream/HavingStream.java | 3 +-
.../client/solrj/io/stream/InnerJoinStream.java | 1 +
.../client/solrj/io/stream/IntersectStream.java | 1 +
.../solr/client/solrj/io/stream/JDBCStream.java | 1 +
.../solr/client/solrj/io/stream/JoinStream.java | 5 +-
.../solr/client/solrj/io/stream/KnnStream.java | 5 +-
.../solrj/io/stream/LeftOuterJoinStream.java | 1 +
.../solr/client/solrj/io/stream/LetStream.java | 32 +-
.../solr/client/solrj/io/stream/ListStream.java | 5 +-
.../client/solrj/io/stream/MergeStream.java | 3 +-
.../client/solrj/io/stream/ModelStream.java | 1 +
.../solr/client/solrj/io/stream/NullStream.java | 3 +-
.../solrj/io/stream/OuterHashJoinStream.java | 3 +-
.../client/solrj/io/stream/ParallelStream.java | 3 +-
.../solr/client/solrj/io/stream/PlotStream.java | 5 +-
.../client/solrj/io/stream/PriorityStream.java | 3 +-
.../client/solrj/io/stream/PushBackStream.java | 3 +-
.../client/solrj/io/stream/RandomStream.java | 1 +
.../solr/client/solrj/io/stream/RankStream.java | 3 +-
.../client/solrj/io/stream/ReducerStream.java | 3 +-
.../client/solrj/io/stream/RollupStream.java | 5 +-
.../solrj/io/stream/ScoreNodesStream.java | 1 +
.../client/solrj/io/stream/SelectStream.java | 3 +-
.../client/solrj/io/stream/ShuffleStream.java | 3 +
.../solrj/io/stream/SignificantTermsStream.java | 3 +
.../solr/client/solrj/io/stream/SolrStream.java | 5 +-
.../solr/client/solrj/io/stream/SortStream.java | 3 +-
.../solr/client/solrj/io/stream/SqlStream.java | 10 +-
.../client/solrj/io/stream/StatsStream.java | 3 +
.../client/solrj/io/stream/TextLogitStream.java | 3 +
.../solrj/io/stream/TimeSeriesStream.java | 3 +
.../client/solrj/io/stream/TopicStream.java | 3 +
.../solr/client/solrj/io/stream/TupStream.java | 5 +-
.../client/solrj/io/stream/TupleStream.java | 49 +-
.../client/solrj/io/stream/UniqueStream.java | 3 +-
.../client/solrj/io/stream/UpdateStream.java | 1 +
.../io/stream/expr/StreamExpressionParser.java | 29 +
.../solrj/io/stream/expr/StreamFactory.java | 6 +
.../solrj/request/CollectionAdminRequest.java | 12 +-
.../solrj/request/CollectionApiMapping.java | 2 +
.../client/solrj/request/RequestWriter.java | 40 +-
.../solr/client/solrj/request/V2Request.java | 42 +-
.../solrj/request/schema/SchemaRequest.java | 25 +-
.../solrj/request/schema/package-info.java | 4 +-
.../solrj/response/CollectionAdminResponse.java | 7 +
.../solrj/response/schema/SchemaResponse.java | 2 +-
.../solrj/response/schema/package-info.java | 4 +-
.../java/org/apache/solr/common/MapWriter.java | 1 -
.../org/apache/solr/common/SolrCloseable.java | 30 +
.../apache/solr/common/SolrCloseableLatch.java | 65 +
.../org/apache/solr/common/cloud/Aliases.java | 127 +-
.../apache/solr/common/cloud/ClusterState.java | 9 -
.../common/cloud/CollectionStateWatcher.java | 5 +-
.../solr/common/cloud/DistributedQueue.java | 42 +
.../org/apache/solr/common/cloud/Slice.java | 24 +-
.../apache/solr/common/cloud/SolrZkClient.java | 100 +-
.../cloud/ZkClientConnectionStrategy.java | 14 +-
.../apache/solr/common/cloud/ZkOperation.java | 4 +-
.../apache/solr/common/cloud/ZkStateReader.java | 10 +-
.../solr/common/params/AutoScalingParams.java | 7 +
.../solr/common/params/CommonAdminParams.java | 4 +-
.../apache/solr/common/params/CommonParams.java | 4 +-
.../apache/solr/common/params/FacetParams.java | 5 +
.../apache/solr/common/params/SolrParams.java | 16 +-
.../org/apache/solr/common/util/StrUtils.java | 1 +
.../java/org/apache/solr/common/util/Utils.java | 19 +
.../resources/apispec/autoscaling.Commands.json | 46 +-
.../resources/apispec/autoscaling.history.json | 61 +
.../resources/apispec/collections.Commands.json | 5 +
.../collections.collection.Commands.json | 23 +
.../collections.collection.shards.Commands.json | 15 +
.../UsingSolrJRefGuideExamplesTest.java | 235 +
.../solrj/cloud/autoscaling/TestPolicy.java | 232 +-
.../solrj/impl/CloudSolrClientBuilderTest.java | 11 +
.../solrj/impl/CloudSolrClientCacheTest.java | 12 +-
.../client/solrj/impl/CloudSolrClientTest.java | 59 +
.../solr/client/solrj/io/sql/JdbcTest.java | 9 +-
.../solrj/io/stream/StreamExpressionTest.java | 593 +-
.../solr/common/cloud/SolrZkClientTest.java | 11 +
.../java/org/apache/solr/SolrTestCaseJ4.java | 34 +-
1156 files changed, 81793 insertions(+), 24689 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/75b2a888/solr/core/src/java/org/apache/solr/cloud/ZkController.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/75b2a888/solr/core/src/java/org/apache/solr/cloud/autoscaling/AutoScalingHandler.java
----------------------------------------------------------------------
diff --cc solr/core/src/java/org/apache/solr/cloud/autoscaling/AutoScalingHandler.java
index e4d6b8a,0f93a2b..0dc6011
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/AutoScalingHandler.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/AutoScalingHandler.java
@@@ -36,20 -36,19 +36,22 @@@ import java.util.stream.Stream
import org.apache.solr.api.Api;
import org.apache.solr.api.ApiBag;
+ import org.apache.solr.client.solrj.cloud.DistributedQueueFactory;
import org.apache.solr.client.solrj.cloud.autoscaling.AutoScalingConfig;
- import org.apache.solr.client.solrj.cloud.autoscaling.Cell;
import org.apache.solr.client.solrj.cloud.autoscaling.Clause;
import org.apache.solr.client.solrj.cloud.autoscaling.Policy;
+ import org.apache.solr.client.solrj.cloud.autoscaling.PolicyHelper;
import org.apache.solr.client.solrj.cloud.autoscaling.Preference;
+import org.apache.solr.client.solrj.cloud.autoscaling.Row;
+import org.apache.solr.client.solrj.cloud.autoscaling.SolrCloudManager;
import org.apache.solr.client.solrj.cloud.autoscaling.TriggerEventProcessorStage;
import org.apache.solr.client.solrj.cloud.autoscaling.TriggerEventType;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
import org.apache.solr.client.solrj.impl.SolrClientCloudManager;
+ import org.apache.solr.cloud.ZkDistributedQueueFactory;
import org.apache.solr.common.MapWriter;
import org.apache.solr.common.SolrException;
+import org.apache.solr.common.cloud.SolrZkClient;
import org.apache.solr.common.cloud.ZkStateReader;
import org.apache.solr.common.params.AutoScalingParams;
import org.apache.solr.common.params.CollectionAdminParams;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/75b2a888/solr/core/src/java/org/apache/solr/cloud/autoscaling/ZkDistributedQueueFactory.java
----------------------------------------------------------------------
diff --cc solr/core/src/java/org/apache/solr/cloud/autoscaling/ZkDistributedQueueFactory.java
index a6cb945,0000000..efb123e
mode 100644,000000..100644
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ZkDistributedQueueFactory.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ZkDistributedQueueFactory.java
@@@ -1,28 -1,0 +1,28 @@@
+package org.apache.solr.cloud.autoscaling;
+
+import java.io.IOException;
+
+import org.apache.solr.client.solrj.cloud.DistributedQueue;
- import org.apache.solr.client.solrj.cloud.autoscaling.SolrCloudManager;
++import org.apache.solr.client.solrj.cloud.DistributedQueueFactory;
+import org.apache.solr.cloud.ZkDistributedQueue;
+import org.apache.solr.common.cloud.SolrZkClient;
+
+/**
+ *
+ */
- public class ZkDistributedQueueFactory implements SolrCloudManager.DistributedQueueFactory {
++public class ZkDistributedQueueFactory implements DistributedQueueFactory {
+ private final SolrZkClient zkClient;
+
+ public ZkDistributedQueueFactory(SolrZkClient zkClient) {
+ this.zkClient = zkClient;
+ }
+ @Override
+ public DistributedQueue makeQueue(String path) throws IOException {
+ return new ZkDistributedQueue(zkClient, path);
+ }
+
+ @Override
+ public void removeQueue(String path) throws IOException {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/75b2a888/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/75b2a888/solr/core/src/test/org/apache/solr/cloud/TestRandomRequestDistribution.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/75b2a888/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DelegatingCloudManager.java
----------------------------------------------------------------------
diff --cc solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DelegatingCloudManager.java
index dca67e7,05801b9..b8adeda
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DelegatingCloudManager.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DelegatingCloudManager.java
@@@ -62,4 -63,4 +63,9 @@@ public class DelegatingCloudManager imp
public byte[] httpRequest(String url, SolrRequest.METHOD method, Map<String, String> headers, String payload, int timeout, boolean followRedirects) throws IOException {
return delegate.httpRequest(url, method, headers, payload, timeout, followRedirects);
}
++
++ @Override
++ public void close() throws IOException {
++ delegate.close();
++ }
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/75b2a888/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DistribStateManager.java
----------------------------------------------------------------------
diff --cc solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DistribStateManager.java
index 6535354,4318418..416bf90
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DistribStateManager.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/DistribStateManager.java
@@@ -48,18 -48,9 +48,18 @@@ public interface DistribStateManager ex
void makePath(String path) throws AlreadyExistsException, IOException, KeeperException, InterruptedException;
+ /**
+ * Create data (leaf) node at specified path.
+ * @param path base path name of the node.
+ * @param data data to be stored.
+ * @param mode creation mode.
+ * @return actual path of the node - in case of sequential nodes this will differ from the base path because
+ * of the appended sequence number.
+ * @throws IOException
+ */
String createData(String path, byte[] data, CreateMode mode) throws AlreadyExistsException, IOException, KeeperException, InterruptedException;
- void removeData(String path, int version) throws NoSuchElementException, BadVersionException, IOException, KeeperException, InterruptedException;
- void removeData(String path, int version) throws NoSuchElementException, IOException, KeeperException, InterruptedException;
++ void removeData(String path, int version) throws NoSuchElementException, IOException, KeeperException, InterruptedException, BadVersionException;
void setData(String path, byte[] data, int version) throws BadVersionException, NoSuchElementException, IOException, KeeperException, InterruptedException;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/75b2a888/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaInfo.java
----------------------------------------------------------------------
diff --cc solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaInfo.java
index 9970625,5f7281f..6f32e05
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaInfo.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaInfo.java
@@@ -28,18 -28,31 +29,33 @@@ import org.apache.solr.common.util.Util
public class ReplicaInfo implements MapWriter {
- final String name;
- final String core, collection, shard;
- final Map<String, Object> variables = new HashMap<>();
+ // private final Replica replica;
+ private final String name;
+ private String core, collection, shard;
+ private Replica.Type type;
+ private String node;
+ private Map<String, Object> variables;
+
+ public ReplicaInfo(String coll,String shard, Replica r, Map<String, Object> vals){
+ this.name = r.getName();
+ this.core = r.getCoreName();
+ this.collection = coll;
+ this.shard = shard;
+ this.type = r.getType();
+ this.variables = vals;
+ this.node = r.getNodeName();
+ }
- public ReplicaInfo(String name, String coll, String shard, Map<String, Object> vals) {
+ public ReplicaInfo(String name, String core, String coll, String shard, Replica.Type type, String node, Map<String, Object> vals) {
this.name = name;
- this.variables = vals;
+ if (vals != null) {
+ this.variables.putAll(vals);
+ }
this.collection = coll;
this.shard = shard;
- this.core = (String)vals.get("core");
+ this.type = type;
+ this.core = core;
+ this.node = node;
}
@Override
@@@ -68,9 -84,8 +84,9 @@@
}
public Replica.Type getType() {
- Object o = variables.get(ZkStateReader.REPLICA_TYPE);
+ Object o = type == null ? variables.get(ZkStateReader.REPLICA_TYPE) : type;
if (o == null) {
+ variables.put(ZkStateReader.REPLICA_TYPE, Replica.Type.NRT);
return Replica.Type.NRT;
} else if (o instanceof Replica.Type) {
return (Replica.Type)o;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/75b2a888/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/SolrCloudManager.java
----------------------------------------------------------------------
diff --cc solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/SolrCloudManager.java
index f44118f,726c2c6..7db7d2a
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/SolrCloudManager.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/SolrCloudManager.java
@@@ -50,15 -46,11 +46,4 @@@ public interface SolrCloudManager exten
SolrResponse request(SolrRequest req) throws IOException;
byte[] httpRequest(String url, SolrRequest.METHOD method, Map<String, String> headers, String payload, int timeout, boolean followRedirects) throws IOException;
--
-- // distributed queue implementation
--
-- @Override
-- default void close() {
-
- }
--
- default boolean isClosed() {
- return false;
-- }
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/75b2a888/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientNodeStateProvider.java
----------------------------------------------------------------------
diff --cc solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientNodeStateProvider.java
index d7be7fe,7048067..05e9ce7
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientNodeStateProvider.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientNodeStateProvider.java
@@@ -57,13 -62,15 +62,16 @@@ import static org.apache.solr.client.so
/**
*
*/
- public class SolrClientNodeStateProvider implements NodeStateProvider {
+ public class SolrClientNodeStateProvider implements NodeStateProvider, MapWriter {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+ //only for debugging
+ public static SolrClientNodeStateProvider INST;
+
+
private final CloudSolrClient solrClient;
private final ZkStateReader zkStateReader;
- private final Map<String, Map<String, Map<String, List<ReplicaInfo>>>> data = new HashMap<>();
+ private final Map<String, Map<String, Map<String, List<ReplicaInfo>>>> nodeVsCollectionVsShardVsReplicaInfo = new HashMap<>();
private Map<String, Object> snitchSession = new HashMap<>();
private Map<String, Map> nodeVsTags = new HashMap<>();
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/75b2a888/solr/solrj/src/java/org/apache/solr/client/solrj/impl/ZkDistribStateManager.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/75b2a888/solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java
----------------------------------------------------------------------
diff --cc solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java
index 1957afc,503ba75..78aac3d
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java
@@@ -1126,6 -1129,6 +1129,11 @@@ public class TestPolicy extends SolrTes
private SolrCloudManager getSolrCloudManager(final Map<String, Map> nodeValues, String clusterState) {
return new SolrCloudManager() {
@Override
++ public void close() throws IOException {
++
++ }
++
++ @Override
public ClusterStateProvider getClusterStateProvider() {
return new DelegatingClusterStateProvider(null) {
@Override
[43/50] [abbrv] lucene-solr:jira/solr-11285-sim: Minor ref guide edits
Posted by ab...@apache.org.
Minor ref guide edits
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/52b4625a
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/52b4625a
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/52b4625a
Branch: refs/heads/jira/solr-11285-sim
Commit: 52b4625ac7ec0a2149f1aa59bf098e9b57c8ae28
Parents: f6cbce1
Author: Steve Rowe <sa...@apache.org>
Authored: Mon Oct 30 22:33:12 2017 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Mon Oct 30 22:33:54 2017 -0400
----------------------------------------------------------------------
solr/solr-ref-guide/src/common-query-parameters.adoc | 4 ++--
solr/solr-ref-guide/src/field-properties-by-use-case.adoc | 3 ++-
solr/solr-ref-guide/src/function-queries.adoc | 1 +
solr/solr-ref-guide/src/implicit-requesthandlers.adoc | 2 +-
solr/solr-ref-guide/src/other-parsers.adoc | 2 +-
solr/solr-ref-guide/src/pagination-of-results.adoc | 2 +-
.../src/transforming-and-indexing-custom-json.adoc | 2 +-
.../src/uploading-data-with-solr-cell-using-apache-tika.adoc | 2 +-
8 files changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/52b4625a/solr/solr-ref-guide/src/common-query-parameters.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/common-query-parameters.adoc b/solr/solr-ref-guide/src/common-query-parameters.adoc
index 3130722..f59db5f 100644
--- a/solr/solr-ref-guide/src/common-query-parameters.adoc
+++ b/solr/solr-ref-guide/src/common-query-parameters.adoc
@@ -120,7 +120,7 @@ This table shows some basic examples of how to use `fl`:
|id score |Return the id field and the score.
|* |Return all the `stored` fields in each document, as well as any `docValues` fields that have `useDocValuesAsStored="true"`. This is the default value of the fl parameter.
|* score |Return all the fields in each document, along with each field's score.
-|*,dv_field_name |Return all the `stored` fields in each document, and any `docValues` fields that have `useDocValuesAsStored="true`" and the docValues from dv_field_name even if it has `useDocValuesAsStored="false`"
+|*,dv_field_name |Return all the `stored` fields in each document, and any `docValues` fields that have `useDocValuesAsStored="true"` and the docValues from dv_field_name even if it has `useDocValuesAsStored="false"`
|===
=== Functions with fl
@@ -215,7 +215,7 @@ If set to `true`, and if <<indexconfig-in-solrconfig.adoc#mergepolicyfactory,the
If early termination is used, a `segmentTerminatedEarly` header will be included in the `responseHeader`.
-Similar to using <<timeAllowed Parameter,the `timeAllowed `Parameter>>, when early segment termination happens values such as `numFound`, <<faceting.adoc#faceting,Facet>> counts, and result <<the-stats-component.adoc#the-stats-component,Stats>> may not be accurate for the entire result set.
+Similar to using <<timeAllowed Parameter,the `timeAllowed` Parameter>>, when early segment termination happens values such as `numFound`, <<faceting.adoc#faceting,Facet>> counts, and result <<the-stats-component.adoc#the-stats-component,Stats>> may not be accurate for the entire result set.
The default value of this parameter is `false`.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/52b4625a/solr/solr-ref-guide/src/field-properties-by-use-case.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/field-properties-by-use-case.adoc b/solr/solr-ref-guide/src/field-properties-by-use-case.adoc
index 2c4a6d3..92ffe5e 100644
--- a/solr/solr-ref-guide/src/field-properties-by-use-case.adoc
+++ b/solr/solr-ref-guide/src/field-properties-by-use-case.adoc
@@ -28,7 +28,7 @@ Here is a summary of common use cases, and the attributes the fields or field ty
|search within field |true | | | | | |
|retrieve contents | |true^<<fpbuc_8,8>>^ | | | | |true^<<fpbuc_8,8>>^
|use as unique key |true | |false | | | |
-|sort on field |true^<<fpbuc_7,7>>^ | |false |true ^<<fpbuc_1,1>>^ | | |true^<<fpbuc_7,7>>^
+|sort on field |true^<<fpbuc_7,7>>^ | |false^<<fpbuc_9,9>>^ |true ^<<fpbuc_1,1>>^ | | |true^<<fpbuc_7,7>>^
|highlighting |true^<<fpbuc_4,4>>^ |true | | |true^<<fpbuc_2,2>>^ |true ^<<fpbuc_3,3>>^ |
|faceting ^<<fpbuc_5,5>>^ |true^<<fpbuc_7,7>>^ | | | | | |true^<<fpbuc_7,7>>^
|add multiple values, maintaining order | | |true | | | |
@@ -46,3 +46,4 @@ Notes:
6. [[fpbuc_6,6]] Term vectors are not mandatory here. If not true, then a stored field is analyzed. So term vectors are recommended, but only required if `stored=false`.
7. [[fpbuc_7,7]] For most field types, either `indexed` or `docValues` must be true, but both are not required. <<docvalues.adoc#docvalues,DocValues>> can be more efficient in many cases. For `[Int/Long/Float/Double/Date]PointFields`, `docValues=true` is required.
8. [[fpbuc_8,8]] Stored content will be used by default, but docValues can alternatively be used. See <<docvalues.adoc#docvalues,DocValues>>.
+9. [[fpbuc_9,9]] Multi-valued sorting may be performed on docValues-enabled fields using the two-argument `field()` function, e.g. `field(myfield,min)`; see the <<function-queries.adoc#field-function,field() function in Function Queries>>.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/52b4625a/solr/solr-ref-guide/src/function-queries.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/function-queries.adoc b/solr/solr-ref-guide/src/function-queries.adoc
index daa838b..4c9d9d1 100644
--- a/solr/solr-ref-guide/src/function-queries.adoc
+++ b/solr/solr-ref-guide/src/function-queries.adoc
@@ -499,6 +499,7 @@ Returns `true` if any member of the field exists.
5 comparison functions: Greater Than, Greater Than or Equal, Less Than, Less Than or Equal, Equal
*Syntax Example*
+
* `if(lt(ms(mydatefield),315569259747),0.8,1)` translates to this pseudocode: `if mydatefield < 315569259747 then 0.8 else 1`
== Example Function Queries
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/52b4625a/solr/solr-ref-guide/src/implicit-requesthandlers.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/implicit-requesthandlers.adoc b/solr/solr-ref-guide/src/implicit-requesthandlers.adoc
index f2319a1..5b97771 100644
--- a/solr/solr-ref-guide/src/implicit-requesthandlers.adoc
+++ b/solr/solr-ref-guide/src/implicit-requesthandlers.adoc
@@ -43,7 +43,7 @@ These handlers have pre-defined default parameters, known as _paramsets_, which
|`/analysis/field` |{solr-javadocs}/solr-core/org/apache/solr/handler/FieldAnalysisRequestHandler.html[FieldAnalysisRequestHandler] |`_ANALYSIS_FIELD` |Return index- and query-time analysis over the given field(s)/field type(s).
|<<config-api.adoc#config-api,`/config`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/SolrConfigHandler.html[SolrConfigHandler] |`_CONFIG` |Retrieve/modify Solr configuration.
|`/debug/dump` |{solr-javadocs}/solr-core/org/apache/solr/handler/DumpRequestHandler.html[DumpRequestHandler] |`_DEBUG_DUMP` |Echo the request contents back to the client.
-|<<exporting-result-sets.adoc#exporting-result-sets,`/export`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/component/SearchHandler.html[SearchHandler] |`_EXPORT` |Export full sorted result sets.
+|<<exporting-result-sets.adoc#exporting-result-sets,`/export`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/component/ExportHandler.html[ExportHandler] |`_EXPORT` |Export full sorted result sets.
|<<realtime-get.adoc#realtime-get,`/get`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/RealTimeGetHandler.html[RealTimeGetHandler] |`_GET` |Real-time get: low-latency retrieval of the latest version of a document.
|<<graph-traversal.adoc#exporting-graphml-to-support-graph-visualization,`/graph`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/GraphHandler.html[GraphHandler] |`_ADMIN_GRAPH` |Return http://graphml.graphdrawing.org/[GraphML] formatted output from a <<graph-traversal.adoc#graph-traversal,`gather` `Nodes` streaming expression>>.
|<<index-replication.adoc#index-replication,`/replication`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/ReplicationHandler.html[ReplicationHandler] |`_REPLICATION` |Replicate indexes for SolrCloud recovery and Master/Slave index distribution.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/52b4625a/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 2d351dc..f255863 100644
--- a/solr/solr-ref-guide/src/other-parsers.adoc
+++ b/solr/solr-ref-guide/src/other-parsers.adoc
@@ -917,7 +917,7 @@ If no analysis or transformation is desired for any type of field, see the <<Raw
`TermsQParser` functions similarly to the <<Term Query Parser,Term Query Parser>> but takes in multiple values separated by commas and returns documents matching any of the specified values.
-This can be useful for generating filter queries from the external human readable terms returned by the faceting or terms components, and may be more efficient in some cases than using the <<the-standard-query-parser.adoc#the-standard-query-parser,Standard Query Parser>> to generate an boolean query since the default implementation `method` avoids scoring.
+This can be useful for generating filter queries from the external human readable terms returned by the faceting or terms components, and may be more efficient in some cases than using the <<the-standard-query-parser.adoc#the-standard-query-parser,Standard Query Parser>> to generate a boolean query since the default implementation `method` avoids scoring.
This query parser takes the following parameters:
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/52b4625a/solr/solr-ref-guide/src/pagination-of-results.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/pagination-of-results.adoc b/solr/solr-ref-guide/src/pagination-of-results.adoc
index 505613d..bb21e03 100644
--- a/solr/solr-ref-guide/src/pagination-of-results.adoc
+++ b/solr/solr-ref-guide/src/pagination-of-results.adoc
@@ -87,7 +87,7 @@ Cursors in Solr are a logical concept that doesn't involve caching any state inf
=== Using Cursors
-To use a cursor with Solr, specify a `cursorMark` parameter with the value of `\*`. You can think of this being analogous to `start=0` as a way to tell Solr "start at the beginning of my sorted results" except that it also informs Solr that you want to use a Cursor.
+To use a cursor with Solr, specify a `cursorMark` parameter with the value of `*`. You can think of this being analogous to `start=0` as a way to tell Solr "start at the beginning of my sorted results" except that it also informs Solr that you want to use a Cursor.
In addition to returning the top N sorted results (where you can control N using the `rows` parameter) the Solr response will also include an encoded String named `nextCursorMark`. You then take the `nextCursorMark` String value from the response, and pass it back to Solr as the `cursorMark` parameter for your next request. You can repeat this process until you've fetched as many docs as you want, or until the `nextCursorMark` returned matches the `cursorMark` you've already specified -- indicating that there are no more results.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/52b4625a/solr/solr-ref-guide/src/transforming-and-indexing-custom-json.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/transforming-and-indexing-custom-json.adoc b/solr/solr-ref-guide/src/transforming-and-indexing-custom-json.adoc
index 0fb7e2a..af241c5 100644
--- a/solr/solr-ref-guide/src/transforming-and-indexing-custom-json.adoc
+++ b/solr/solr-ref-guide/src/transforming-and-indexing-custom-json.adoc
@@ -172,7 +172,7 @@ Instead of specifying all the field names explicitly, it is possible to specify
There are two restrictions: wildcards can only be used at the end of the `json-path`, and the split path cannot use wildcards.
-A single asterisk `\*` maps only to direct children, and a double asterisk `\*\*` maps recursively to all descendants. The following are example wildcard path mappings:
+A single asterisk `\*` maps only to direct children, and a double asterisk `**` maps recursively to all descendants. The following are example wildcard path mappings:
* `f=$FQN:/**`: maps all fields to the fully qualified name (`$FQN`) of the JSON field. The fully qualified name is obtained by concatenating all the keys in the hierarchy with a period (`.`) as a delimiter. This is the default behavior if no `f` path mappings are specified.
* `f=/docs/*`: maps all the fields under docs and in the name as given in json
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/52b4625a/solr/solr-ref-guide/src/uploading-data-with-solr-cell-using-apache-tika.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/uploading-data-with-solr-cell-using-apache-tika.adoc b/solr/solr-ref-guide/src/uploading-data-with-solr-cell-using-apache-tika.adoc
index 0199f40..5202b0d 100644
--- a/solr/solr-ref-guide/src/uploading-data-with-solr-cell-using-apache-tika.adoc
+++ b/solr/solr-ref-guide/src/uploading-data-with-solr-cell-using-apache-tika.adoc
@@ -20,7 +20,7 @@ Solr uses code from the http://lucene.apache.org/tika/[Apache Tika] project to p
When this framework was under development, it was called the Solr Content Extraction Library or CEL; from that abbreviation came this framework's name: Solr Cell.
-If you want to supply your own `ContentHandler` for Solr to use, you can extend the `ExtractingRequestHandler` and override the `createFactory()` method. This factory is responsible for constructing the `SolrContentHandler` that interacts with Tika, and allows literals to override Tika-parsed values. Set the parameter `literalsOverride`, which normally defaults to *true, to *false" to append Tika-parsed values to literal values.
+If you want to supply your own `ContentHandler` for Solr to use, you can extend the `ExtractingRequestHandler` and override the `createFactory()` method. This factory is responsible for constructing the `SolrContentHandler` that interacts with Tika, and allows literals to override Tika-parsed values. Set the parameter `literalsOverride`, which normally defaults to `true`, to `false` to append Tika-parsed values to literal values.
== Key Solr Cell Concepts
[18/50] [abbrv] lucene-solr:jira/solr-11285-sim: Don't add sorted
indexes for non-back-compat versions
Posted by ab...@apache.org.
Don't add sorted indexes for non-back-compat versions
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/8388b195
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/8388b195
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/8388b195
Branch: refs/heads/jira/solr-11285-sim
Commit: 8388b195cfe4469ccc5bce71b2873059fadea291
Parents: 4e99388
Author: Steve Rowe <sa...@gmail.com>
Authored: Thu Oct 26 17:11:54 2017 -0400
Committer: Steve Rowe <sa...@gmail.com>
Committed: Thu Oct 26 17:13:26 2017 -0400
----------------------------------------------------------------------
dev-tools/scripts/addBackcompatIndexes.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8388b195/dev-tools/scripts/addBackcompatIndexes.py
----------------------------------------------------------------------
diff --git a/dev-tools/scripts/addBackcompatIndexes.py b/dev-tools/scripts/addBackcompatIndexes.py
index 645dc26..9ca26b3 100644
--- a/dev-tools/scripts/addBackcompatIndexes.py
+++ b/dev-tools/scripts/addBackcompatIndexes.py
@@ -245,7 +245,9 @@ def main():
current_version = scriptutil.Version.parse(scriptutil.find_current_version())
create_and_add_index(source, 'cfs', c.version, current_version, c.temp_dir)
create_and_add_index(source, 'nocfs', c.version, current_version, c.temp_dir)
- if c.version.major > 6 or (c.version.major == 6 and c.version.minor >= 2):
+ should_make_sorted = current_version.is_back_compat_with(c.version) \
+ and (c.version.major > 6 or (c.version.major == 6 and c.version.minor >= 2))
+ if should_make_sorted:
create_and_add_index(source, 'sorted', c.version, current_version, c.temp_dir)
if c.version.minor == 0 and c.version.bugfix == 0 and c.version.major < current_version.major:
create_and_add_index(source, 'moreterms', c.version, current_version, c.temp_dir)
@@ -255,7 +257,7 @@ def main():
print('\nAdding backwards compatibility tests')
update_backcompat_tests(['cfs', 'nocfs'], c.version, current_version)
- if c.version.major > 6 or (c.version.major == 6 and c.version.minor >= 2):
+ if should_make_sorted:
update_backcompat_tests(['sorted'], c.version, current_version)
print('\nTesting changes')
[31/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11541:
refguide: purge unneccessary page-shortname and page-permalink attributes
from all source docs
Posted by ab...@apache.org.
SOLR-11541: refguide: purge unneccessary page-shortname and page-permalink attributes from all source docs
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/8d030280
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/8d030280
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/8d030280
Branch: refs/heads/jira/solr-11285-sim
Commit: 8d030280a12df80a56f8ec6239cc8137be67e7fd
Parents: b44497f
Author: Chris Hostetter <ho...@apache.org>
Authored: Sun Oct 29 15:08:43 2017 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Sun Oct 29 15:08:43 2017 -0700
----------------------------------------------------------------------
solr/solr-ref-guide/src/a-quick-overview.adoc | 2 --
solr/solr-ref-guide/src/about-filters.adoc | 2 --
solr/solr-ref-guide/src/about-this-guide.adoc | 2 --
solr/solr-ref-guide/src/about-tokenizers.adoc | 2 --
.../adding-custom-plugins-in-solrcloud-mode.adoc | 2 --
solr/solr-ref-guide/src/analysis-screen.adoc | 2 --
solr/solr-ref-guide/src/analyzers.adoc | 2 --
.../authentication-and-authorization-plugins.adoc | 2 --
.../src/basic-authentication-plugin.adoc | 2 --
solr/solr-ref-guide/src/blob-store-api.adoc | 2 --
solr/solr-ref-guide/src/blockjoin-faceting.adoc | 2 --
solr/solr-ref-guide/src/charfilterfactories.adoc | 2 --
.../src/choosing-an-output-format.adoc | 2 --
solr/solr-ref-guide/src/client-api-lineup.adoc | 2 --
solr/solr-ref-guide/src/client-apis.adoc | 2 --
solr/solr-ref-guide/src/cloud-screens.adoc | 2 --
solr/solr-ref-guide/src/codec-factory.adoc | 2 --
.../src/collapse-and-expand-results.adoc | 2 --
.../src/collection-specific-tools.adoc | 2 --
solr/solr-ref-guide/src/collections-api.adoc | 2 --
solr/solr-ref-guide/src/collections-core-admin.adoc | 2 --
.../src/combining-distribution-and-replication.adoc | 2 --
solr/solr-ref-guide/src/command-line-utilities.adoc | 2 --
.../solr-ref-guide/src/common-query-parameters.adoc | 2 --
solr/solr-ref-guide/src/config-api.adoc | 2 --
solr/solr-ref-guide/src/config-sets.adoc | 2 --
solr/solr-ref-guide/src/configsets-api.adoc | 2 --
solr/solr-ref-guide/src/configuration-apis.adoc | 2 --
solr/solr-ref-guide/src/configuring-logging.adoc | 2 --
.../src/configuring-solrconfig-xml.adoc | 2 --
solr/solr-ref-guide/src/content-streams.adoc | 2 --
solr/solr-ref-guide/src/copying-fields.adoc | 2 --
solr/solr-ref-guide/src/core-specific-tools.adoc | 2 --
solr/solr-ref-guide/src/coreadmin-api.adoc | 2 --
.../src/cross-data-center-replication-cdcr.adoc | 2 --
.../datadir-and-directoryfactory-in-solrconfig.adoc | 2 --
solr/solr-ref-guide/src/dataimport-screen.adoc | 2 --
solr/solr-ref-guide/src/de-duplication.adoc | 2 --
.../src/defining-core-properties.adoc | 2 --
solr/solr-ref-guide/src/defining-fields.adoc | 2 --
.../src/deployment-and-operations.adoc | 2 --
.../src/detecting-languages-during-indexing.adoc | 2 --
solr/solr-ref-guide/src/distributed-requests.adoc | 2 --
.../src/distributed-search-with-index-sharding.adoc | 2 --
.../src/documents-fields-and-schema-design.adoc | 2 --
solr/solr-ref-guide/src/documents-screen.adoc | 2 --
solr/solr-ref-guide/src/docvalues.adoc | 2 --
solr/solr-ref-guide/src/dynamic-fields.adoc | 2 --
solr/solr-ref-guide/src/enabling-ssl.adoc | 2 --
solr/solr-ref-guide/src/errata.adoc | 2 --
solr/solr-ref-guide/src/exporting-result-sets.adoc | 2 --
solr/solr-ref-guide/src/faceting.adoc | 2 --
.../src/field-properties-by-use-case.adoc | 2 --
.../src/field-type-definitions-and-properties.adoc | 2 --
.../src/field-types-included-with-solr.adoc | 2 --
solr/solr-ref-guide/src/files-screen.adoc | 2 --
solr/solr-ref-guide/src/filter-descriptions.adoc | 2 --
solr/solr-ref-guide/src/format-of-solr-xml.adoc | 2 --
solr/solr-ref-guide/src/function-queries.adoc | 2 --
solr/solr-ref-guide/src/further-assistance.adoc | 2 --
solr/solr-ref-guide/src/getting-assistance.adoc | 2 --
.../src/getting-started-with-solrcloud.adoc | 2 --
solr/solr-ref-guide/src/getting-started.adoc | 4 +---
solr/solr-ref-guide/src/graph-traversal.adoc | 2 --
.../src/hadoop-authentication-plugin.adoc | 2 --
solr/solr-ref-guide/src/highlighting.adoc | 2 --
solr/solr-ref-guide/src/how-solrcloud-works.adoc | 2 --
solr/solr-ref-guide/src/how-to-contribute.adoc | 2 --
.../src/implicit-requesthandlers.adoc | 2 --
solr/solr-ref-guide/src/index-replication.adoc | 2 --
solr/solr-ref-guide/src/index.adoc | 2 --
.../src/indexconfig-in-solrconfig.adoc | 2 --
.../src/indexing-and-basic-data-operations.adoc | 2 --
solr/solr-ref-guide/src/indexupgrader-tool.adoc | 2 --
.../src/initparams-in-solrconfig.adoc | 2 --
solr/solr-ref-guide/src/installing-solr.adoc | 2 --
.../src/introduction-to-client-apis.adoc | 2 --
.../introduction-to-scaling-and-distribution.adoc | 2 --
.../src/introduction-to-solr-indexing.adoc | 2 --
solr/solr-ref-guide/src/java-properties.adoc | 2 --
solr/solr-ref-guide/src/json-query-dsl.adoc | 2 --
solr/solr-ref-guide/src/json-request-api.adoc | 2 --
solr/solr-ref-guide/src/jvm-settings.adoc | 2 --
.../src/kerberos-authentication-plugin.adoc | 2 --
solr/solr-ref-guide/src/language-analysis.adoc | 2 --
solr/solr-ref-guide/src/learning-to-rank.adoc | 2 --
.../src/legacy-scaling-and-distribution.adoc | 2 --
.../src/lib-directives-in-solrconfig.adoc | 2 --
.../src/local-parameters-in-queries.adoc | 2 --
solr/solr-ref-guide/src/logging.adoc | 2 --
.../src/major-changes-from-solr-5-to-solr-6.adoc | 2 --
.../solr-ref-guide/src/major-changes-in-solr-7.adoc | 2 --
.../src/making-and-restoring-backups.adoc | 2 --
solr/solr-ref-guide/src/managed-resources.adoc | 2 --
solr/solr-ref-guide/src/mbean-request-handler.adoc | 2 --
solr/solr-ref-guide/src/merging-indexes.adoc | 2 --
.../src/meta-docs/asciidoc-syntax.adoc | 15 ++-------------
solr/solr-ref-guide/src/meta-docs/jekyll.adoc | 2 --
solr/solr-ref-guide/src/metrics-reporting.adoc | 2 --
solr/solr-ref-guide/src/monitoring-solr.adoc | 2 --
solr/solr-ref-guide/src/morelikethis.adoc | 2 --
.../src/near-real-time-searching.adoc | 2 --
solr/solr-ref-guide/src/other-parsers.adoc | 2 --
solr/solr-ref-guide/src/other-schema-elements.adoc | 2 --
...rview-of-documents-fields-and-schema-design.adoc | 2 --
.../src/overview-of-searching-in-solr.adoc | 2 --
.../src/overview-of-the-solr-admin-ui.adoc | 2 --
solr/solr-ref-guide/src/pagination-of-results.adoc | 2 --
solr/solr-ref-guide/src/parallel-sql-interface.adoc | 2 --
solr/solr-ref-guide/src/parameter-reference.adoc | 2 --
.../src/performance-statistics-reference.adoc | 2 --
solr/solr-ref-guide/src/phonetic-matching.adoc | 2 --
solr/solr-ref-guide/src/ping.adoc | 2 --
solr/solr-ref-guide/src/plugins-stats-screen.adoc | 2 --
solr/solr-ref-guide/src/post-tool.adoc | 2 --
.../src/putting-the-pieces-together.adoc | 2 --
solr/solr-ref-guide/src/query-re-ranking.adoc | 2 --
solr/solr-ref-guide/src/query-screen.adoc | 2 --
.../src/query-settings-in-solrconfig.adoc | 2 --
.../src/query-syntax-and-parsing.adoc | 2 --
solr/solr-ref-guide/src/realtime-get.adoc | 2 --
solr/solr-ref-guide/src/relevance.adoc | 2 --
solr/solr-ref-guide/src/replication-screen.adoc | 2 --
solr/solr-ref-guide/src/request-parameters-api.adoc | 2 --
.../src/requestdispatcher-in-solrconfig.adoc | 2 --
...handlers-and-searchcomponents-in-solrconfig.adoc | 2 --
solr/solr-ref-guide/src/response-writers.adoc | 2 --
solr/solr-ref-guide/src/result-clustering.adoc | 2 --
solr/solr-ref-guide/src/result-grouping.adoc | 2 --
.../src/rule-based-authorization-plugin.adoc | 2 --
.../src/rule-based-replica-placement.adoc | 2 --
solr/solr-ref-guide/src/running-solr-on-hdfs.adoc | 2 --
solr/solr-ref-guide/src/running-your-analyzer.adoc | 2 --
solr/solr-ref-guide/src/schema-api.adoc | 2 --
solr/solr-ref-guide/src/schema-browser-screen.adoc | 2 --
.../schema-factory-definition-in-solrconfig.adoc | 2 --
solr/solr-ref-guide/src/schemaless-mode.adoc | 2 --
solr/solr-ref-guide/src/searching.adoc | 2 --
solr/solr-ref-guide/src/securing-solr.adoc | 2 --
solr/solr-ref-guide/src/segments-info.adoc | 2 --
.../setting-up-an-external-zookeeper-ensemble.adoc | 2 --
.../src/shards-and-indexing-data-in-solrcloud.adoc | 2 --
.../src/solr-configuration-files.adoc | 2 --
.../src/solr-control-script-reference.adoc | 2 --
.../solr-ref-guide/src/solr-cores-and-solr-xml.adoc | 2 --
solr/solr-ref-guide/src/solr-field-types.adoc | 2 --
solr/solr-ref-guide/src/solr-glossary.adoc | 2 --
.../src/solr-jdbc-apache-zeppelin.adoc | 2 --
solr/solr-ref-guide/src/solr-jdbc-dbvisualizer.adoc | 2 --
.../solr-ref-guide/src/solr-jdbc-python-jython.adoc | 2 --
solr/solr-ref-guide/src/solr-jdbc-r.adoc | 2 --
solr/solr-ref-guide/src/solr-jdbc-squirrel-sql.adoc | 2 --
solr/solr-ref-guide/src/solr-plugins.adoc | 2 --
.../src/solr-system-requirements.adoc | 2 --
solr/solr-ref-guide/src/solr-tutorial.adoc | 2 --
solr/solr-ref-guide/src/solr-upgrade-notes.adoc | 2 --
.../src/solrcloud-autoscaling-api.adoc | 2 --
.../solrcloud-autoscaling-auto-add-replicas.adoc | 2 --
.../src/solrcloud-autoscaling-fault-tolerance.adoc | 2 --
.../src/solrcloud-autoscaling-listeners.adoc | 2 --
.../src/solrcloud-autoscaling-overview.adoc | 2 --
.../solrcloud-autoscaling-policy-preferences.adoc | 2 --
.../src/solrcloud-autoscaling-trigger-actions.adoc | 2 --
.../src/solrcloud-autoscaling-triggers.adoc | 2 --
solr/solr-ref-guide/src/solrcloud-autoscaling.adoc | 2 --
.../src/solrcloud-configuration-and-parameters.adoc | 2 --
.../solrcloud-query-routing-and-read-tolerance.adoc | 2 --
.../solrcloud-recoveries-and-write-tolerance.adoc | 2 --
solr/solr-ref-guide/src/solrcloud-resilience.adoc | 2 --
.../solrcloud-with-legacy-configuration-files.adoc | 2 --
solr/solr-ref-guide/src/solrcloud.adoc | 2 --
solr/solr-ref-guide/src/spatial-search.adoc | 2 --
solr/solr-ref-guide/src/spell-checking.adoc | 2 --
.../solr-ref-guide/src/statistical-programming.adoc | 2 --
.../src/stream-decorator-reference.adoc | 2 --
.../src/stream-evaluator-reference.adoc | 2 --
solr/solr-ref-guide/src/stream-screen.adoc | 2 --
.../solr-ref-guide/src/stream-source-reference.adoc | 2 --
solr/solr-ref-guide/src/streaming-expressions.adoc | 2 --
solr/solr-ref-guide/src/suggester.adoc | 2 --
.../src/taking-solr-to-production.adoc | 2 --
.../solr-ref-guide/src/the-dismax-query-parser.adoc | 2 --
.../src/the-extended-dismax-query-parser.adoc | 2 --
.../src/the-query-elevation-component.adoc | 2 --
.../src/the-standard-query-parser.adoc | 2 --
solr/solr-ref-guide/src/the-stats-component.adoc | 2 --
.../src/the-term-vector-component.adoc | 2 --
solr/solr-ref-guide/src/the-terms-component.adoc | 2 --
.../src/the-well-configured-solr-instance.adoc | 2 --
solr/solr-ref-guide/src/thread-dump.adoc | 2 --
solr/solr-ref-guide/src/tokenizers.adoc | 2 --
.../src/transforming-and-indexing-custom-json.adoc | 2 --
.../src/transforming-result-documents.adoc | 2 --
solr/solr-ref-guide/src/uima-integration.adoc | 2 --
...erstanding-analyzers-tokenizers-and-filters.adoc | 2 --
.../src/update-request-processors.adoc | 2 --
.../src/updatehandlers-in-solrconfig.adoc | 2 --
.../src/updating-parts-of-documents.adoc | 2 --
.../src/upgrading-a-solr-cluster.adoc | 2 --
.../src/uploading-data-with-index-handlers.adoc | 2 --
...ading-data-with-solr-cell-using-apache-tika.adoc | 2 --
...ata-store-data-with-the-data-import-handler.adoc | 2 --
solr/solr-ref-guide/src/using-javascript.adoc | 2 --
solr/solr-ref-guide/src/using-jmx-with-solr.adoc | 2 --
solr/solr-ref-guide/src/using-python.adoc | 2 --
solr/solr-ref-guide/src/using-solr-from-ruby.adoc | 2 --
solr/solr-ref-guide/src/using-solrj.adoc | 2 --
...sing-the-solr-administration-user-interface.adoc | 2 --
...ing-zookeeper-to-manage-configuration-files.adoc | 2 --
solr/solr-ref-guide/src/v2-api.adoc | 2 --
.../src/velocity-response-writer.adoc | 2 --
solr/solr-ref-guide/src/velocity-search-ui.adoc | 2 --
.../working-with-currencies-and-exchange-rates.adoc | 2 --
solr/solr-ref-guide/src/working-with-dates.adoc | 2 --
.../src/working-with-enum-fields.adoc | 2 --
.../working-with-external-files-and-processes.adoc | 2 --
.../src/zookeeper-access-control.adoc | 2 --
solr/solr-ref-guide/tools/BuildNavAndPDFBody.java | 16 ++++------------
218 files changed, 7 insertions(+), 458 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/a-quick-overview.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/a-quick-overview.adoc b/solr/solr-ref-guide/src/a-quick-overview.adoc
index a88e1a0..bf9fbe8 100644
--- a/solr/solr-ref-guide/src/a-quick-overview.adoc
+++ b/solr/solr-ref-guide/src/a-quick-overview.adoc
@@ -1,6 +1,4 @@
= A Quick Overview
-:page-shortname: a-quick-overview
-:page-permalink: a-quick-overview.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/about-filters.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/about-filters.adoc b/solr/solr-ref-guide/src/about-filters.adoc
index 212f5e5..8bf993d 100644
--- a/solr/solr-ref-guide/src/about-filters.adoc
+++ b/solr/solr-ref-guide/src/about-filters.adoc
@@ -1,6 +1,4 @@
= About Filters
-:page-shortname: about-filters
-:page-permalink: about-filters.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/about-this-guide.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/about-this-guide.adoc b/solr/solr-ref-guide/src/about-this-guide.adoc
index 91d83d3..3f580e2 100644
--- a/solr/solr-ref-guide/src/about-this-guide.adoc
+++ b/solr/solr-ref-guide/src/about-this-guide.adoc
@@ -1,6 +1,4 @@
= About This Guide
-:page-shortname: about-this-guide
-:page-permalink: about-this-guide.html
:page-toc: false
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/about-tokenizers.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/about-tokenizers.adoc b/solr/solr-ref-guide/src/about-tokenizers.adoc
index c88fb62..77898d7 100644
--- a/solr/solr-ref-guide/src/about-tokenizers.adoc
+++ b/solr/solr-ref-guide/src/about-tokenizers.adoc
@@ -1,6 +1,4 @@
= About Tokenizers
-:page-shortname: about-tokenizers
-:page-permalink: about-tokenizers.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/adding-custom-plugins-in-solrcloud-mode.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/adding-custom-plugins-in-solrcloud-mode.adoc b/solr/solr-ref-guide/src/adding-custom-plugins-in-solrcloud-mode.adoc
index 6e9864e..d403e9e 100644
--- a/solr/solr-ref-guide/src/adding-custom-plugins-in-solrcloud-mode.adoc
+++ b/solr/solr-ref-guide/src/adding-custom-plugins-in-solrcloud-mode.adoc
@@ -1,6 +1,4 @@
= Adding Custom Plugins in SolrCloud Mode
-:page-shortname: adding-custom-plugins-in-solrcloud-mode
-:page-permalink: adding-custom-plugins-in-solrcloud-mode.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/analysis-screen.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/analysis-screen.adoc b/solr/solr-ref-guide/src/analysis-screen.adoc
index 9a8b946..40f0329 100644
--- a/solr/solr-ref-guide/src/analysis-screen.adoc
+++ b/solr/solr-ref-guide/src/analysis-screen.adoc
@@ -1,6 +1,4 @@
= Analysis Screen
-:page-shortname: analysis-screen
-:page-permalink: analysis-screen.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/analyzers.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/analyzers.adoc b/solr/solr-ref-guide/src/analyzers.adoc
index 0a0d0b2..206f54f 100644
--- a/solr/solr-ref-guide/src/analyzers.adoc
+++ b/solr/solr-ref-guide/src/analyzers.adoc
@@ -1,6 +1,4 @@
= Analyzers
-:page-shortname: analyzers
-:page-permalink: analyzers.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adoc b/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adoc
index fce8acb..971dbcd 100644
--- a/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adoc
+++ b/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adoc
@@ -1,6 +1,4 @@
= Authentication and Authorization Plugins
-:page-shortname: authentication-and-authorization-plugins
-:page-permalink: authentication-and-authorization-plugins.html
:page-children: basic-authentication-plugin, hadoop-authentication-plugin, kerberos-authentication-plugin, rule-based-authorization-plugin
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/basic-authentication-plugin.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/basic-authentication-plugin.adoc b/solr/solr-ref-guide/src/basic-authentication-plugin.adoc
index b936940..0a68528 100644
--- a/solr/solr-ref-guide/src/basic-authentication-plugin.adoc
+++ b/solr/solr-ref-guide/src/basic-authentication-plugin.adoc
@@ -1,6 +1,4 @@
= Basic Authentication Plugin
-:page-shortname: basic-authentication-plugin
-:page-permalink: basic-authentication-plugin.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/blob-store-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/blob-store-api.adoc b/solr/solr-ref-guide/src/blob-store-api.adoc
index f337c3d..09180ed 100644
--- a/solr/solr-ref-guide/src/blob-store-api.adoc
+++ b/solr/solr-ref-guide/src/blob-store-api.adoc
@@ -1,6 +1,4 @@
= Blob Store API
-:page-shortname: blob-store-api
-:page-permalink: blob-store-api.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/blockjoin-faceting.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/blockjoin-faceting.adoc b/solr/solr-ref-guide/src/blockjoin-faceting.adoc
index 7f057f0..41030d5 100644
--- a/solr/solr-ref-guide/src/blockjoin-faceting.adoc
+++ b/solr/solr-ref-guide/src/blockjoin-faceting.adoc
@@ -1,6 +1,4 @@
= BlockJoin Faceting
-:page-shortname: blockjoin-faceting
-:page-permalink: blockjoin-faceting.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/charfilterfactories.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/charfilterfactories.adoc b/solr/solr-ref-guide/src/charfilterfactories.adoc
index 8f0dd0f..c210c38 100644
--- a/solr/solr-ref-guide/src/charfilterfactories.adoc
+++ b/solr/solr-ref-guide/src/charfilterfactories.adoc
@@ -1,6 +1,4 @@
= CharFilterFactories
-:page-shortname: charfilterfactories
-:page-permalink: charfilterfactories.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/choosing-an-output-format.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/choosing-an-output-format.adoc b/solr/solr-ref-guide/src/choosing-an-output-format.adoc
index 77fca3d..5ef7b1e 100644
--- a/solr/solr-ref-guide/src/choosing-an-output-format.adoc
+++ b/solr/solr-ref-guide/src/choosing-an-output-format.adoc
@@ -1,6 +1,4 @@
= Choosing an Output Format
-:page-shortname: choosing-an-output-format
-:page-permalink: choosing-an-output-format.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/client-api-lineup.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/client-api-lineup.adoc b/solr/solr-ref-guide/src/client-api-lineup.adoc
index 0a5ac2e..61564c9 100644
--- a/solr/solr-ref-guide/src/client-api-lineup.adoc
+++ b/solr/solr-ref-guide/src/client-api-lineup.adoc
@@ -1,6 +1,4 @@
= Client API Lineup
-:page-shortname: client-api-lineup
-:page-permalink: client-api-lineup.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/client-apis.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/client-apis.adoc b/solr/solr-ref-guide/src/client-apis.adoc
index 7c5aed6..7897680 100644
--- a/solr/solr-ref-guide/src/client-apis.adoc
+++ b/solr/solr-ref-guide/src/client-apis.adoc
@@ -1,6 +1,4 @@
= Client APIs
-:page-shortname: client-apis
-:page-permalink: client-apis.html
:page-children: introduction-to-client-apis, choosing-an-output-format, client-api-lineup, using-javascript, using-python, using-solrj, using-solr-from-ruby
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/cloud-screens.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/cloud-screens.adoc b/solr/solr-ref-guide/src/cloud-screens.adoc
index a74b231..f7d0dfb 100644
--- a/solr/solr-ref-guide/src/cloud-screens.adoc
+++ b/solr/solr-ref-guide/src/cloud-screens.adoc
@@ -1,6 +1,4 @@
= Cloud Screens
-:page-shortname: cloud-screens
-:page-permalink: cloud-screens.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/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 388f588..055827b 100644
--- a/solr/solr-ref-guide/src/codec-factory.adoc
+++ b/solr/solr-ref-guide/src/codec-factory.adoc
@@ -1,6 +1,4 @@
= Codec Factory
-:page-shortname: codec-factory
-:page-permalink: codec-factory.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/collapse-and-expand-results.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/collapse-and-expand-results.adoc b/solr/solr-ref-guide/src/collapse-and-expand-results.adoc
index d879c6f..67a2980 100644
--- a/solr/solr-ref-guide/src/collapse-and-expand-results.adoc
+++ b/solr/solr-ref-guide/src/collapse-and-expand-results.adoc
@@ -1,6 +1,4 @@
= Collapse and Expand Results
-:page-shortname: collapse-and-expand-results
-:page-permalink: collapse-and-expand-results.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/collection-specific-tools.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/collection-specific-tools.adoc b/solr/solr-ref-guide/src/collection-specific-tools.adoc
index 487afba..e3ae1c5 100644
--- a/solr/solr-ref-guide/src/collection-specific-tools.adoc
+++ b/solr/solr-ref-guide/src/collection-specific-tools.adoc
@@ -1,6 +1,4 @@
= Collection-Specific Tools
-:page-shortname: collection-specific-tools
-:page-permalink: collection-specific-tools.html
:page-children: analysis-screen, dataimport-screen, documents-screen, files-screen, query-screen, stream-screen, schema-browser-screen
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/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 1821d4d..4879175 100644
--- a/solr/solr-ref-guide/src/collections-api.adoc
+++ b/solr/solr-ref-guide/src/collections-api.adoc
@@ -1,6 +1,4 @@
= Collections API
-:page-shortname: collections-api
-:page-permalink: collections-api.html
:page-toclevels: 1
:page-tocclass: right
// Licensed to the Apache Software Foundation (ASF) under one
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/collections-core-admin.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/collections-core-admin.adoc b/solr/solr-ref-guide/src/collections-core-admin.adoc
index 77d66cf..ad1b4e7 100644
--- a/solr/solr-ref-guide/src/collections-core-admin.adoc
+++ b/solr/solr-ref-guide/src/collections-core-admin.adoc
@@ -1,6 +1,4 @@
= Collections / Core Admin
-:page-shortname: collections-core-admin
-:page-permalink: collections-core-admin.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/combining-distribution-and-replication.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/combining-distribution-and-replication.adoc b/solr/solr-ref-guide/src/combining-distribution-and-replication.adoc
index ff00474..17cae7d 100644
--- a/solr/solr-ref-guide/src/combining-distribution-and-replication.adoc
+++ b/solr/solr-ref-guide/src/combining-distribution-and-replication.adoc
@@ -1,6 +1,4 @@
= Combining Distribution and Replication
-:page-shortname: combining-distribution-and-replication
-:page-permalink: combining-distribution-and-replication.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/command-line-utilities.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/command-line-utilities.adoc b/solr/solr-ref-guide/src/command-line-utilities.adoc
index 0dee64b..ae88327 100644
--- a/solr/solr-ref-guide/src/command-line-utilities.adoc
+++ b/solr/solr-ref-guide/src/command-line-utilities.adoc
@@ -1,6 +1,4 @@
= Command Line Utilities
-:page-shortname: command-line-utilities
-:page-permalink: command-line-utilities.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/common-query-parameters.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/common-query-parameters.adoc b/solr/solr-ref-guide/src/common-query-parameters.adoc
index 1a7ed01..3130722 100644
--- a/solr/solr-ref-guide/src/common-query-parameters.adoc
+++ b/solr/solr-ref-guide/src/common-query-parameters.adoc
@@ -1,6 +1,4 @@
= Common Query Parameters
-:page-shortname: common-query-parameters
-:page-permalink: common-query-parameters.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/config-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/config-api.adoc b/solr/solr-ref-guide/src/config-api.adoc
index 3ad0985..fbe3283 100644
--- a/solr/solr-ref-guide/src/config-api.adoc
+++ b/solr/solr-ref-guide/src/config-api.adoc
@@ -1,6 +1,4 @@
= Config API
-:page-shortname: config-api
-:page-permalink: config-api.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/config-sets.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/config-sets.adoc b/solr/solr-ref-guide/src/config-sets.adoc
index 851327f..9c46265 100644
--- a/solr/solr-ref-guide/src/config-sets.adoc
+++ b/solr/solr-ref-guide/src/config-sets.adoc
@@ -1,6 +1,4 @@
= Config Sets
-:page-shortname: config-sets
-:page-permalink: config-sets.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/configsets-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/configsets-api.adoc b/solr/solr-ref-guide/src/configsets-api.adoc
index 0842538..59b4925 100644
--- a/solr/solr-ref-guide/src/configsets-api.adoc
+++ b/solr/solr-ref-guide/src/configsets-api.adoc
@@ -1,6 +1,4 @@
= ConfigSets API
-:page-shortname: configsets-api
-:page-permalink: configsets-api.html
:page-toclevels: 1
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/configuration-apis.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/configuration-apis.adoc b/solr/solr-ref-guide/src/configuration-apis.adoc
index 3d58e71..2013538 100644
--- a/solr/solr-ref-guide/src/configuration-apis.adoc
+++ b/solr/solr-ref-guide/src/configuration-apis.adoc
@@ -1,6 +1,4 @@
= Configuration APIs
-:page-shortname: configuration-apis
-:page-permalink: configuration-apis.html
:page-children: blob-store-api, config-api, request-parameters-api, managed-resources
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/configuring-logging.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/configuring-logging.adoc b/solr/solr-ref-guide/src/configuring-logging.adoc
index 43bbb2b..8984744 100644
--- a/solr/solr-ref-guide/src/configuring-logging.adoc
+++ b/solr/solr-ref-guide/src/configuring-logging.adoc
@@ -1,6 +1,4 @@
= Configuring Logging
-:page-shortname: configuring-logging
-:page-permalink: configuring-logging.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/configuring-solrconfig-xml.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/configuring-solrconfig-xml.adoc b/solr/solr-ref-guide/src/configuring-solrconfig-xml.adoc
index 7888e29..75da8b7 100644
--- a/solr/solr-ref-guide/src/configuring-solrconfig-xml.adoc
+++ b/solr/solr-ref-guide/src/configuring-solrconfig-xml.adoc
@@ -1,6 +1,4 @@
= Configuring solrconfig.xml
-:page-shortname: configuring-solrconfig-xml
-:page-permalink: configuring-solrconfig-xml.html
:page-children: datadir-and-directoryfactory-in-solrconfig, lib-directives-in-solrconfig, schema-factory-definition-in-solrconfig, indexconfig-in-solrconfig, requesthandlers-and-searchcomponents-in-solrconfig, initparams-in-solrconfig, updatehandlers-in-solrconfig, query-settings-in-solrconfig, requestdispatcher-in-solrconfig, update-request-processors, codec-factory
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/content-streams.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/content-streams.adoc b/solr/solr-ref-guide/src/content-streams.adoc
index c4fc194..5bd09bc 100644
--- a/solr/solr-ref-guide/src/content-streams.adoc
+++ b/solr/solr-ref-guide/src/content-streams.adoc
@@ -1,6 +1,4 @@
= Content Streams
-:page-shortname: content-streams
-:page-permalink: content-streams.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/copying-fields.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/copying-fields.adoc b/solr/solr-ref-guide/src/copying-fields.adoc
index 730230a..c61168f 100644
--- a/solr/solr-ref-guide/src/copying-fields.adoc
+++ b/solr/solr-ref-guide/src/copying-fields.adoc
@@ -1,6 +1,4 @@
= Copying Fields
-:page-shortname: copying-fields
-:page-permalink: copying-fields.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/core-specific-tools.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/core-specific-tools.adoc b/solr/solr-ref-guide/src/core-specific-tools.adoc
index 81bc098..42b15f7 100644
--- a/solr/solr-ref-guide/src/core-specific-tools.adoc
+++ b/solr/solr-ref-guide/src/core-specific-tools.adoc
@@ -1,6 +1,4 @@
= Core-Specific Tools
-:page-shortname: core-specific-tools
-:page-permalink: core-specific-tools.html
:page-children: ping, plugins-stats-screen, replication-screen, segments-info
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/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 0f5eeb1..1b486cd 100644
--- a/solr/solr-ref-guide/src/coreadmin-api.adoc
+++ b/solr/solr-ref-guide/src/coreadmin-api.adoc
@@ -1,6 +1,4 @@
= CoreAdmin API
-:page-shortname: coreadmin-api
-:page-permalink: coreadmin-api.html
:page-toclevels: 1
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/cross-data-center-replication-cdcr.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/cross-data-center-replication-cdcr.adoc b/solr/solr-ref-guide/src/cross-data-center-replication-cdcr.adoc
index 962d82c..3aa4a3b 100644
--- a/solr/solr-ref-guide/src/cross-data-center-replication-cdcr.adoc
+++ b/solr/solr-ref-guide/src/cross-data-center-replication-cdcr.adoc
@@ -1,6 +1,4 @@
= Cross Data Center Replication (CDCR)
-:page-shortname: cross-data-center-replication-cdcr
-:page-permalink: cross-data-center-replication-cdcr.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/datadir-and-directoryfactory-in-solrconfig.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/datadir-and-directoryfactory-in-solrconfig.adoc b/solr/solr-ref-guide/src/datadir-and-directoryfactory-in-solrconfig.adoc
index f4a6b9e..d58b7a9 100644
--- a/solr/solr-ref-guide/src/datadir-and-directoryfactory-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/datadir-and-directoryfactory-in-solrconfig.adoc
@@ -1,6 +1,4 @@
= DataDir and DirectoryFactory in SolrConfig
-:page-shortname: datadir-and-directoryfactory-in-solrconfig
-:page-permalink: datadir-and-directoryfactory-in-solrconfig.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/dataimport-screen.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/dataimport-screen.adoc b/solr/solr-ref-guide/src/dataimport-screen.adoc
index 9f3cb43..647814c 100644
--- a/solr/solr-ref-guide/src/dataimport-screen.adoc
+++ b/solr/solr-ref-guide/src/dataimport-screen.adoc
@@ -1,6 +1,4 @@
= Dataimport Screen
-:page-shortname: dataimport-screen
-:page-permalink: dataimport-screen.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/de-duplication.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/de-duplication.adoc b/solr/solr-ref-guide/src/de-duplication.adoc
index 67f8d8c..9efb575 100644
--- a/solr/solr-ref-guide/src/de-duplication.adoc
+++ b/solr/solr-ref-guide/src/de-duplication.adoc
@@ -1,6 +1,4 @@
= De-Duplication
-:page-shortname: de-duplication
-:page-permalink: de-duplication.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/defining-core-properties.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/defining-core-properties.adoc b/solr/solr-ref-guide/src/defining-core-properties.adoc
index 1424327..dedd513 100644
--- a/solr/solr-ref-guide/src/defining-core-properties.adoc
+++ b/solr/solr-ref-guide/src/defining-core-properties.adoc
@@ -1,6 +1,4 @@
= Defining core.properties
-:page-shortname: defining-core-properties
-:page-permalink: defining-core-properties.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/defining-fields.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/defining-fields.adoc b/solr/solr-ref-guide/src/defining-fields.adoc
index 82f0345..04c1f3e 100644
--- a/solr/solr-ref-guide/src/defining-fields.adoc
+++ b/solr/solr-ref-guide/src/defining-fields.adoc
@@ -1,6 +1,4 @@
= Defining Fields
-:page-shortname: defining-fields
-:page-permalink: defining-fields.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/deployment-and-operations.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/deployment-and-operations.adoc b/solr/solr-ref-guide/src/deployment-and-operations.adoc
index 88c5734..67a405f 100644
--- a/solr/solr-ref-guide/src/deployment-and-operations.adoc
+++ b/solr/solr-ref-guide/src/deployment-and-operations.adoc
@@ -1,6 +1,4 @@
= Deployment and Operations
-:page-shortname: deployment-and-operations
-:page-permalink: deployment-and-operations.html
:page-children: solr-control-script-reference, solr-configuration-files, taking-solr-to-production, making-and-restoring-backups, running-solr-on-hdfs, upgrading-a-solr-cluster, solr-upgrade-notes
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/detecting-languages-during-indexing.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/detecting-languages-during-indexing.adoc b/solr/solr-ref-guide/src/detecting-languages-during-indexing.adoc
index 392a0df..12e8804 100644
--- a/solr/solr-ref-guide/src/detecting-languages-during-indexing.adoc
+++ b/solr/solr-ref-guide/src/detecting-languages-during-indexing.adoc
@@ -1,6 +1,4 @@
= Detecting Languages During Indexing
-:page-shortname: detecting-languages-during-indexing
-:page-permalink: detecting-languages-during-indexing.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/distributed-requests.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/distributed-requests.adoc b/solr/solr-ref-guide/src/distributed-requests.adoc
index b9c3920..c2f6d1c 100644
--- a/solr/solr-ref-guide/src/distributed-requests.adoc
+++ b/solr/solr-ref-guide/src/distributed-requests.adoc
@@ -1,6 +1,4 @@
= Distributed Requests
-:page-shortname: distributed-requests
-:page-permalink: distributed-requests.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/distributed-search-with-index-sharding.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/distributed-search-with-index-sharding.adoc b/solr/solr-ref-guide/src/distributed-search-with-index-sharding.adoc
index 8e4b9f6..70324ac 100644
--- a/solr/solr-ref-guide/src/distributed-search-with-index-sharding.adoc
+++ b/solr/solr-ref-guide/src/distributed-search-with-index-sharding.adoc
@@ -1,6 +1,4 @@
= Distributed Search with Index Sharding
-:page-shortname: distributed-search-with-index-sharding
-:page-permalink: distributed-search-with-index-sharding.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/documents-fields-and-schema-design.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/documents-fields-and-schema-design.adoc b/solr/solr-ref-guide/src/documents-fields-and-schema-design.adoc
index 608fafe..8e7baff 100644
--- a/solr/solr-ref-guide/src/documents-fields-and-schema-design.adoc
+++ b/solr/solr-ref-guide/src/documents-fields-and-schema-design.adoc
@@ -1,6 +1,4 @@
= Documents, Fields, and Schema Design
-:page-shortname: documents-fields-and-schema-design
-:page-permalink: documents-fields-and-schema-design.html
:page-children: overview-of-documents-fields-and-schema-design, solr-field-types, defining-fields, copying-fields, dynamic-fields, other-schema-elements, schema-api, putting-the-pieces-together, docvalues, schemaless-mode
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/documents-screen.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/documents-screen.adoc b/solr/solr-ref-guide/src/documents-screen.adoc
index fe64ed8..abeeb9e 100644
--- a/solr/solr-ref-guide/src/documents-screen.adoc
+++ b/solr/solr-ref-guide/src/documents-screen.adoc
@@ -1,6 +1,4 @@
= Documents Screen
-:page-shortname: documents-screen
-:page-permalink: documents-screen.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/docvalues.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/docvalues.adoc b/solr/solr-ref-guide/src/docvalues.adoc
index c8c65e6..d25a8c8 100644
--- a/solr/solr-ref-guide/src/docvalues.adoc
+++ b/solr/solr-ref-guide/src/docvalues.adoc
@@ -1,6 +1,4 @@
= DocValues
-:page-shortname: docvalues
-:page-permalink: docvalues.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/dynamic-fields.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/dynamic-fields.adoc b/solr/solr-ref-guide/src/dynamic-fields.adoc
index d135dde..65a91ff 100644
--- a/solr/solr-ref-guide/src/dynamic-fields.adoc
+++ b/solr/solr-ref-guide/src/dynamic-fields.adoc
@@ -1,6 +1,4 @@
= Dynamic Fields
-:page-shortname: dynamic-fields
-:page-permalink: dynamic-fields.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/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 dba8522..fd6223e 100644
--- a/solr/solr-ref-guide/src/enabling-ssl.adoc
+++ b/solr/solr-ref-guide/src/enabling-ssl.adoc
@@ -1,6 +1,4 @@
= Enabling SSL
-:page-shortname: enabling-ssl
-:page-permalink: enabling-ssl.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/errata.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/errata.adoc b/solr/solr-ref-guide/src/errata.adoc
index d87de35..10f3edb 100644
--- a/solr/solr-ref-guide/src/errata.adoc
+++ b/solr/solr-ref-guide/src/errata.adoc
@@ -1,6 +1,4 @@
= Errata
-:page-shortname: errata
-:page-permalink: errata.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/exporting-result-sets.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/exporting-result-sets.adoc b/solr/solr-ref-guide/src/exporting-result-sets.adoc
index 0f8866d..be1811f 100644
--- a/solr/solr-ref-guide/src/exporting-result-sets.adoc
+++ b/solr/solr-ref-guide/src/exporting-result-sets.adoc
@@ -1,6 +1,4 @@
= Exporting Result Sets
-:page-shortname: exporting-result-sets
-:page-permalink: exporting-result-sets.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/faceting.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/faceting.adoc b/solr/solr-ref-guide/src/faceting.adoc
index 2c1213f..d8c0d0e 100644
--- a/solr/solr-ref-guide/src/faceting.adoc
+++ b/solr/solr-ref-guide/src/faceting.adoc
@@ -1,6 +1,4 @@
= Faceting
-:page-shortname: faceting
-:page-permalink: faceting.html
:page-children: blockjoin-faceting
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/field-properties-by-use-case.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/field-properties-by-use-case.adoc b/solr/solr-ref-guide/src/field-properties-by-use-case.adoc
index c3fb020..2c4a6d3 100644
--- a/solr/solr-ref-guide/src/field-properties-by-use-case.adoc
+++ b/solr/solr-ref-guide/src/field-properties-by-use-case.adoc
@@ -1,6 +1,4 @@
= Field Properties by Use Case
-:page-shortname: field-properties-by-use-case
-:page-permalink: field-properties-by-use-case.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/field-type-definitions-and-properties.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/field-type-definitions-and-properties.adoc b/solr/solr-ref-guide/src/field-type-definitions-and-properties.adoc
index 2770904..54fda3c 100644
--- a/solr/solr-ref-guide/src/field-type-definitions-and-properties.adoc
+++ b/solr/solr-ref-guide/src/field-type-definitions-and-properties.adoc
@@ -1,6 +1,4 @@
= Field Type Definitions and Properties
-:page-shortname: field-type-definitions-and-properties
-:page-permalink: field-type-definitions-and-properties.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/field-types-included-with-solr.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/field-types-included-with-solr.adoc b/solr/solr-ref-guide/src/field-types-included-with-solr.adoc
index 39ddb95..3c4e613 100644
--- a/solr/solr-ref-guide/src/field-types-included-with-solr.adoc
+++ b/solr/solr-ref-guide/src/field-types-included-with-solr.adoc
@@ -1,6 +1,4 @@
= Field Types Included with Solr
-:page-shortname: field-types-included-with-solr
-:page-permalink: field-types-included-with-solr.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/files-screen.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/files-screen.adoc b/solr/solr-ref-guide/src/files-screen.adoc
index 394c489..6fd417a 100644
--- a/solr/solr-ref-guide/src/files-screen.adoc
+++ b/solr/solr-ref-guide/src/files-screen.adoc
@@ -1,6 +1,4 @@
= Files Screen
-:page-shortname: files-screen
-:page-permalink: files-screen.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/filter-descriptions.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/filter-descriptions.adoc b/solr/solr-ref-guide/src/filter-descriptions.adoc
index 751edea..00cf179 100644
--- a/solr/solr-ref-guide/src/filter-descriptions.adoc
+++ b/solr/solr-ref-guide/src/filter-descriptions.adoc
@@ -1,6 +1,4 @@
= Filter Descriptions
-:page-shortname: filter-descriptions
-:page-permalink: filter-descriptions.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/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 98f21d1..65ea9f0 100644
--- a/solr/solr-ref-guide/src/format-of-solr-xml.adoc
+++ b/solr/solr-ref-guide/src/format-of-solr-xml.adoc
@@ -1,6 +1,4 @@
= Format of solr.xml
-:page-shortname: format-of-solr-xml
-:page-permalink: format-of-solr-xml.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/function-queries.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/function-queries.adoc b/solr/solr-ref-guide/src/function-queries.adoc
index 1a82fff..daa838b 100644
--- a/solr/solr-ref-guide/src/function-queries.adoc
+++ b/solr/solr-ref-guide/src/function-queries.adoc
@@ -1,6 +1,4 @@
= Function Queries
-:page-shortname: function-queries
-:page-permalink: function-queries.html
:page-tocclass: right
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/further-assistance.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/further-assistance.adoc b/solr/solr-ref-guide/src/further-assistance.adoc
index f8de457..0c23e00 100644
--- a/solr/solr-ref-guide/src/further-assistance.adoc
+++ b/solr/solr-ref-guide/src/further-assistance.adoc
@@ -1,6 +1,4 @@
= Further Assistance
-:page-shortname: further-assistance
-:page-permalink: further-assistance.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/getting-assistance.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/getting-assistance.adoc b/solr/solr-ref-guide/src/getting-assistance.adoc
index d92e49d..aece567 100644
--- a/solr/solr-ref-guide/src/getting-assistance.adoc
+++ b/solr/solr-ref-guide/src/getting-assistance.adoc
@@ -1,6 +1,4 @@
= Getting Assistance
-:page-shortname: getting-assistance
-:page-permalink: getting-assistance.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/getting-started-with-solrcloud.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/getting-started-with-solrcloud.adoc b/solr/solr-ref-guide/src/getting-started-with-solrcloud.adoc
index 11e8350..c145bd2 100644
--- a/solr/solr-ref-guide/src/getting-started-with-solrcloud.adoc
+++ b/solr/solr-ref-guide/src/getting-started-with-solrcloud.adoc
@@ -1,6 +1,4 @@
= Getting Started with SolrCloud
-:page-shortname: getting-started-with-solrcloud
-:page-permalink: getting-started-with-solrcloud.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/getting-started.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/getting-started.adoc b/solr/solr-ref-guide/src/getting-started.adoc
index 3c31d11..90e8ba0 100644
--- a/solr/solr-ref-guide/src/getting-started.adoc
+++ b/solr/solr-ref-guide/src/getting-started.adoc
@@ -1,6 +1,4 @@
= Getting Started
-:page-shortname: getting-started
-:page-permalink: getting-started.html
:page-children: solr-tutorial, a-quick-overview, solr-system-requirements, installing-solr
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
@@ -30,4 +28,4 @@ This section introduces you to the basic Solr architecture and features to help
<<solr-system-requirements.adoc#solr-system-requirements,Solr System Requirements>>: Solr System Requirement
-<<installing-solr.adoc#installing-solr,Installing Solr>>: A walkthrough of the Solr installation process.
\ No newline at end of file
+<<installing-solr.adoc#installing-solr,Installing Solr>>: A walkthrough of the Solr installation process.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/graph-traversal.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/graph-traversal.adoc b/solr/solr-ref-guide/src/graph-traversal.adoc
index a23b32e..29d2aef 100644
--- a/solr/solr-ref-guide/src/graph-traversal.adoc
+++ b/solr/solr-ref-guide/src/graph-traversal.adoc
@@ -1,6 +1,4 @@
= Graph Traversal
-:page-shortname: graph-traversal
-:page-permalink: graph-traversal.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/hadoop-authentication-plugin.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/hadoop-authentication-plugin.adoc b/solr/solr-ref-guide/src/hadoop-authentication-plugin.adoc
index 7ed0a15..1644aef 100644
--- a/solr/solr-ref-guide/src/hadoop-authentication-plugin.adoc
+++ b/solr/solr-ref-guide/src/hadoop-authentication-plugin.adoc
@@ -1,6 +1,4 @@
= Hadoop Authentication Plugin
-:page-shortname: hadoop-authentication-plugin
-:page-permalink: hadoop-authentication-plugin.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/highlighting.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/highlighting.adoc b/solr/solr-ref-guide/src/highlighting.adoc
index 1d60f16..d27ff75 100644
--- a/solr/solr-ref-guide/src/highlighting.adoc
+++ b/solr/solr-ref-guide/src/highlighting.adoc
@@ -1,6 +1,4 @@
= Highlighting
-:page-shortname: highlighting
-:page-permalink: highlighting.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/how-solrcloud-works.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/how-solrcloud-works.adoc b/solr/solr-ref-guide/src/how-solrcloud-works.adoc
index d18d1b9..fc68a70 100644
--- a/solr/solr-ref-guide/src/how-solrcloud-works.adoc
+++ b/solr/solr-ref-guide/src/how-solrcloud-works.adoc
@@ -1,6 +1,4 @@
= How SolrCloud Works
-:page-shortname: how-solrcloud-works
-:page-permalink: how-solrcloud-works.html
:page-children: shards-and-indexing-data-in-solrcloud, distributed-requests
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/how-to-contribute.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/how-to-contribute.adoc b/solr/solr-ref-guide/src/how-to-contribute.adoc
index 6c5ef1b..0116b66 100644
--- a/solr/solr-ref-guide/src/how-to-contribute.adoc
+++ b/solr/solr-ref-guide/src/how-to-contribute.adoc
@@ -1,8 +1,6 @@
= How to Contribute to Solr Documentation
:page-tocclass: right
:page-toclevels: 2
-:page-shortname: how-to-contribute
-:page-permalink: how-to-contribute.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/implicit-requesthandlers.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/implicit-requesthandlers.adoc b/solr/solr-ref-guide/src/implicit-requesthandlers.adoc
index 077ed91..f2319a1 100644
--- a/solr/solr-ref-guide/src/implicit-requesthandlers.adoc
+++ b/solr/solr-ref-guide/src/implicit-requesthandlers.adoc
@@ -1,6 +1,4 @@
= Implicit RequestHandlers
-:page-shortname: implicit-requesthandlers
-:page-permalink: implicit-requesthandlers.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/index-replication.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/index-replication.adoc b/solr/solr-ref-guide/src/index-replication.adoc
index bef8e28..de1e8d6 100644
--- a/solr/solr-ref-guide/src/index-replication.adoc
+++ b/solr/solr-ref-guide/src/index-replication.adoc
@@ -1,6 +1,4 @@
= Index Replication
-:page-shortname: index-replication
-:page-permalink: index-replication.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/index.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/index.adoc b/solr/solr-ref-guide/src/index.adoc
index d326527..ed6d4fd 100644
--- a/solr/solr-ref-guide/src/index.adoc
+++ b/solr/solr-ref-guide/src/index.adoc
@@ -1,6 +1,4 @@
= Apache Solr Reference Guide
-:page-shortname: index
-:page-permalink: index.html
:page-children: about-this-guide, getting-started, deployment-and-operations, using-the-solr-administration-user-interface, documents-fields-and-schema-design, understanding-analyzers-tokenizers-and-filters, indexing-and-basic-data-operations, searching, solrcloud, legacy-scaling-and-distribution, the-well-configured-solr-instance, monitoring-solr, securing-solr, client-apis, further-assistance, solr-glossary, errata, how-to-contribute
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/indexconfig-in-solrconfig.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/indexconfig-in-solrconfig.adoc b/solr/solr-ref-guide/src/indexconfig-in-solrconfig.adoc
index d74763c..3b79eab 100644
--- a/solr/solr-ref-guide/src/indexconfig-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/indexconfig-in-solrconfig.adoc
@@ -1,6 +1,4 @@
= IndexConfig in SolrConfig
-:page-shortname: indexconfig-in-solrconfig
-:page-permalink: indexconfig-in-solrconfig.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/indexing-and-basic-data-operations.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/indexing-and-basic-data-operations.adoc b/solr/solr-ref-guide/src/indexing-and-basic-data-operations.adoc
index d55ec83..f473fe6 100644
--- a/solr/solr-ref-guide/src/indexing-and-basic-data-operations.adoc
+++ b/solr/solr-ref-guide/src/indexing-and-basic-data-operations.adoc
@@ -1,6 +1,4 @@
= Indexing and Basic Data Operations
-:page-shortname: indexing-and-basic-data-operations
-:page-permalink: indexing-and-basic-data-operations.html
:page-children: introduction-to-solr-indexing, post-tool, uploading-data-with-index-handlers, uploading-data-with-solr-cell-using-apache-tika, uploading-structured-data-store-data-with-the-data-import-handler, updating-parts-of-documents, detecting-languages-during-indexing, de-duplication, content-streams, uima-integration
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/indexupgrader-tool.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/indexupgrader-tool.adoc b/solr/solr-ref-guide/src/indexupgrader-tool.adoc
index a505b35..ff60c42 100644
--- a/solr/solr-ref-guide/src/indexupgrader-tool.adoc
+++ b/solr/solr-ref-guide/src/indexupgrader-tool.adoc
@@ -1,6 +1,4 @@
= IndexUpgrader Tool
-:page-shortname: indexupgrader-tool
-:page-permalink: indexupgrader-tool.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/initparams-in-solrconfig.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/initparams-in-solrconfig.adoc b/solr/solr-ref-guide/src/initparams-in-solrconfig.adoc
index 83806aa..7334021 100644
--- a/solr/solr-ref-guide/src/initparams-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/initparams-in-solrconfig.adoc
@@ -1,6 +1,4 @@
= InitParams in SolrConfig
-:page-shortname: initparams-in-solrconfig
-:page-permalink: initparams-in-solrconfig.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/installing-solr.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/installing-solr.adoc b/solr/solr-ref-guide/src/installing-solr.adoc
index 7182899..a85264a 100644
--- a/solr/solr-ref-guide/src/installing-solr.adoc
+++ b/solr/solr-ref-guide/src/installing-solr.adoc
@@ -1,6 +1,4 @@
= Installing Solr
-:page-shortname: installing-solr
-:page-permalink: installing-solr.html
:page-toclevels: 1
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/introduction-to-client-apis.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/introduction-to-client-apis.adoc b/solr/solr-ref-guide/src/introduction-to-client-apis.adoc
index 8430f53..ae2640b 100644
--- a/solr/solr-ref-guide/src/introduction-to-client-apis.adoc
+++ b/solr/solr-ref-guide/src/introduction-to-client-apis.adoc
@@ -1,6 +1,4 @@
= Introduction to Client APIs
-:page-shortname: introduction-to-client-apis
-:page-permalink: introduction-to-client-apis.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/introduction-to-scaling-and-distribution.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/introduction-to-scaling-and-distribution.adoc b/solr/solr-ref-guide/src/introduction-to-scaling-and-distribution.adoc
index 1bca385..2b0f769 100644
--- a/solr/solr-ref-guide/src/introduction-to-scaling-and-distribution.adoc
+++ b/solr/solr-ref-guide/src/introduction-to-scaling-and-distribution.adoc
@@ -1,6 +1,4 @@
= Introduction to Scaling and Distribution
-:page-shortname: introduction-to-scaling-and-distribution
-:page-permalink: introduction-to-scaling-and-distribution.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/introduction-to-solr-indexing.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/introduction-to-solr-indexing.adoc b/solr/solr-ref-guide/src/introduction-to-solr-indexing.adoc
index 83a9378..4f9258b 100644
--- a/solr/solr-ref-guide/src/introduction-to-solr-indexing.adoc
+++ b/solr/solr-ref-guide/src/introduction-to-solr-indexing.adoc
@@ -1,6 +1,4 @@
= Introduction to Solr Indexing
-:page-shortname: introduction-to-solr-indexing
-:page-permalink: introduction-to-solr-indexing.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/java-properties.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/java-properties.adoc b/solr/solr-ref-guide/src/java-properties.adoc
index 45f111b..f6afb7d 100644
--- a/solr/solr-ref-guide/src/java-properties.adoc
+++ b/solr/solr-ref-guide/src/java-properties.adoc
@@ -1,6 +1,4 @@
= Java Properties
-:page-shortname: java-properties
-:page-permalink: java-properties.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/json-query-dsl.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/json-query-dsl.adoc b/solr/solr-ref-guide/src/json-query-dsl.adoc
index 5d87c7e..58d2baa 100644
--- a/solr/solr-ref-guide/src/json-query-dsl.adoc
+++ b/solr/solr-ref-guide/src/json-query-dsl.adoc
@@ -1,6 +1,4 @@
= JSON Query DSL
-:page-shortname: json-query-dsl
-:page-permalink: json-query-dsl.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/json-request-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/json-request-api.adoc b/solr/solr-ref-guide/src/json-request-api.adoc
index dcddb24..d51e692 100644
--- a/solr/solr-ref-guide/src/json-request-api.adoc
+++ b/solr/solr-ref-guide/src/json-request-api.adoc
@@ -1,6 +1,4 @@
= JSON Request API
-:page-shortname: json-request-api
-:page-permalink: json-request-api.html
:page-children: json-query-dsl
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/jvm-settings.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/jvm-settings.adoc b/solr/solr-ref-guide/src/jvm-settings.adoc
index 532e1a7..268f58a 100644
--- a/solr/solr-ref-guide/src/jvm-settings.adoc
+++ b/solr/solr-ref-guide/src/jvm-settings.adoc
@@ -1,6 +1,4 @@
= JVM Settings
-:page-shortname: jvm-settings
-:page-permalink: jvm-settings.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/kerberos-authentication-plugin.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/kerberos-authentication-plugin.adoc b/solr/solr-ref-guide/src/kerberos-authentication-plugin.adoc
index c67708c..a6ae946 100644
--- a/solr/solr-ref-guide/src/kerberos-authentication-plugin.adoc
+++ b/solr/solr-ref-guide/src/kerberos-authentication-plugin.adoc
@@ -1,6 +1,4 @@
= Kerberos Authentication Plugin
-:page-shortname: kerberos-authentication-plugin
-:page-permalink: kerberos-authentication-plugin.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/language-analysis.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/language-analysis.adoc b/solr/solr-ref-guide/src/language-analysis.adoc
index ee1c862..8e6a214 100644
--- a/solr/solr-ref-guide/src/language-analysis.adoc
+++ b/solr/solr-ref-guide/src/language-analysis.adoc
@@ -1,6 +1,4 @@
= Language Analysis
-:page-shortname: language-analysis
-:page-permalink: language-analysis.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/learning-to-rank.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/learning-to-rank.adoc b/solr/solr-ref-guide/src/learning-to-rank.adoc
index c3b0a83..02475c6 100644
--- a/solr/solr-ref-guide/src/learning-to-rank.adoc
+++ b/solr/solr-ref-guide/src/learning-to-rank.adoc
@@ -1,6 +1,4 @@
= Learning To Rank
-:page-shortname: learning-to-rank
-:page-permalink: learning-to-rank.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/legacy-scaling-and-distribution.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/legacy-scaling-and-distribution.adoc b/solr/solr-ref-guide/src/legacy-scaling-and-distribution.adoc
index 722ee62..fa8cc1e 100644
--- a/solr/solr-ref-guide/src/legacy-scaling-and-distribution.adoc
+++ b/solr/solr-ref-guide/src/legacy-scaling-and-distribution.adoc
@@ -1,6 +1,4 @@
= Legacy Scaling and Distribution
-:page-shortname: legacy-scaling-and-distribution
-:page-permalink: legacy-scaling-and-distribution.html
:page-children: introduction-to-scaling-and-distribution, distributed-search-with-index-sharding, index-replication, combining-distribution-and-replication, merging-indexes
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/lib-directives-in-solrconfig.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/lib-directives-in-solrconfig.adoc b/solr/solr-ref-guide/src/lib-directives-in-solrconfig.adoc
index 78c7ee4..dc3b319 100644
--- a/solr/solr-ref-guide/src/lib-directives-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/lib-directives-in-solrconfig.adoc
@@ -1,6 +1,4 @@
= Lib Directives in SolrConfig
-:page-shortname: lib-directives-in-solrconfig
-:page-permalink: lib-directives-in-solrconfig.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/local-parameters-in-queries.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/local-parameters-in-queries.adoc b/solr/solr-ref-guide/src/local-parameters-in-queries.adoc
index e7becd7..747b436 100644
--- a/solr/solr-ref-guide/src/local-parameters-in-queries.adoc
+++ b/solr/solr-ref-guide/src/local-parameters-in-queries.adoc
@@ -1,6 +1,4 @@
= Local Parameters in Queries
-:page-shortname: local-parameters-in-queries
-:page-permalink: local-parameters-in-queries.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/logging.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/logging.adoc b/solr/solr-ref-guide/src/logging.adoc
index 8b847f7..f514c05 100644
--- a/solr/solr-ref-guide/src/logging.adoc
+++ b/solr/solr-ref-guide/src/logging.adoc
@@ -1,6 +1,4 @@
= Logging
-:page-shortname: logging
-:page-permalink: logging.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/major-changes-from-solr-5-to-solr-6.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/major-changes-from-solr-5-to-solr-6.adoc b/solr/solr-ref-guide/src/major-changes-from-solr-5-to-solr-6.adoc
index 8b3798e..0ebb793 100644
--- a/solr/solr-ref-guide/src/major-changes-from-solr-5-to-solr-6.adoc
+++ b/solr/solr-ref-guide/src/major-changes-from-solr-5-to-solr-6.adoc
@@ -1,6 +1,4 @@
= Major Changes from Solr 5 to Solr 6
-:page-shortname: major-changes-from-solr-5-to-solr-6
-:page-permalink: major-changes-from-solr-5-to-solr-6.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/major-changes-in-solr-7.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/major-changes-in-solr-7.adoc b/solr/solr-ref-guide/src/major-changes-in-solr-7.adoc
index a82a028..445bbbc 100644
--- a/solr/solr-ref-guide/src/major-changes-in-solr-7.adoc
+++ b/solr/solr-ref-guide/src/major-changes-in-solr-7.adoc
@@ -1,6 +1,4 @@
= Major Changes in Solr 7
-:page-shortname: major-changes-in-solr-7
-:page-permalink: major-changes-in-solr-7.html
:page-tocclass: right
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/making-and-restoring-backups.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/making-and-restoring-backups.adoc b/solr/solr-ref-guide/src/making-and-restoring-backups.adoc
index 3697010..291b4d5 100644
--- a/solr/solr-ref-guide/src/making-and-restoring-backups.adoc
+++ b/solr/solr-ref-guide/src/making-and-restoring-backups.adoc
@@ -1,6 +1,4 @@
= Making and Restoring Backups
-:page-shortname: making-and-restoring-backups
-:page-permalink: making-and-restoring-backups.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/managed-resources.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/managed-resources.adoc b/solr/solr-ref-guide/src/managed-resources.adoc
index aa3c476..acf029a 100644
--- a/solr/solr-ref-guide/src/managed-resources.adoc
+++ b/solr/solr-ref-guide/src/managed-resources.adoc
@@ -1,6 +1,4 @@
= Managed Resources
-:page-shortname: managed-resources
-:page-permalink: managed-resources.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/mbean-request-handler.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/mbean-request-handler.adoc b/solr/solr-ref-guide/src/mbean-request-handler.adoc
index 45c2fa9..f7767bf 100644
--- a/solr/solr-ref-guide/src/mbean-request-handler.adoc
+++ b/solr/solr-ref-guide/src/mbean-request-handler.adoc
@@ -1,6 +1,4 @@
= MBean Request Handler
-:page-shortname: mbean-request-handler
-:page-permalink: mbean-request-handler.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/merging-indexes.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/merging-indexes.adoc b/solr/solr-ref-guide/src/merging-indexes.adoc
index cf1cd37..2bcd493 100644
--- a/solr/solr-ref-guide/src/merging-indexes.adoc
+++ b/solr/solr-ref-guide/src/merging-indexes.adoc
@@ -1,6 +1,4 @@
= Merging Indexes
-:page-shortname: merging-indexes
-:page-permalink: merging-indexes.html
// 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
[50/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11285: Fix
merge issues.
Posted by ab...@apache.org.
SOLR-11285: Fix merge issues.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/2772945f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/2772945f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/2772945f
Branch: refs/heads/jira/solr-11285-sim
Commit: 2772945fb0105e20c6de1cd53f12ac0038396d25
Parents: 75b2a88
Author: Andrzej Bialecki <ab...@apache.org>
Authored: Tue Oct 31 15:00:54 2017 +0100
Committer: Andrzej Bialecki <ab...@apache.org>
Committed: Tue Oct 31 15:00:54 2017 +0100
----------------------------------------------------------------------
.../cloud/autoscaling/sim/SimCloudManager.java | 6 ++++++
.../sim/SimClusterStateProvider.java | 11 +++-------
.../sim/SimDistributedQueueFactory.java | 4 ++--
.../solrj/cloud/autoscaling/ReplicaInfo.java | 21 ++++++++++++++++----
4 files changed, 28 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2772945f/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimCloudManager.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimCloudManager.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimCloudManager.java
index c683003..60d7836 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimCloudManager.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimCloudManager.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.SolrResponse;
import org.apache.solr.client.solrj.SolrServerException;
+import org.apache.solr.client.solrj.cloud.DistributedQueueFactory;
import org.apache.solr.client.solrj.cloud.autoscaling.DistribStateManager;
import org.apache.solr.client.solrj.cloud.autoscaling.NodeStateProvider;
import org.apache.solr.client.solrj.cloud.autoscaling.SolrCloudManager;
@@ -109,4 +110,9 @@ public class SimCloudManager implements SolrCloudManager {
public byte[] httpRequest(String url, SolrRequest.METHOD method, Map<String, String> headers, String payload, int timeout, boolean followRedirects) throws IOException {
return httpServer.httpRequest(url, method, headers, payload, timeout, followRedirects);
}
+
+ @Override
+ public void close() throws IOException {
+
+ }
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2772945f/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.java
index bce019c..4692b4b 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimClusterStateProvider.java
@@ -79,7 +79,7 @@ public class SimClusterStateProvider implements ClusterStateProvider {
sliceProperties.computeIfAbsent(dc.getName(), name -> new HashMap<>())
.computeIfAbsent(s.getName(), name -> new HashMap<>()).putAll(s.getProperties());
s.getReplicas().forEach(r -> {
- ReplicaInfo ri = new ReplicaInfo(r.getName(), dc.getName(), s.getName(), r.getProperties());
+ ReplicaInfo ri = new ReplicaInfo(r.getName(), r.getCoreName(), dc.getName(), s.getName(), r.getType(), r.getNodeName(), r.getProperties());
if (liveNodes.contains(r.getNodeName())) {
nodeReplicaMap.computeIfAbsent(r.getNodeName(), rn -> new ArrayList<>()).add(ri);
}
@@ -267,13 +267,8 @@ public class SimClusterStateProvider implements ClusterStateProvider {
}
@Override
- public String getAlias(String alias) {
- return null;
- }
-
- @Override
- public String getCollectionName(String name) {
- return null;
+ public List<String> resolveAlias(String alias) {
+ throw new UnsupportedOperationException("resolveAlias not implemented");
}
@Override
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2772945f/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimDistributedQueueFactory.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimDistributedQueueFactory.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimDistributedQueueFactory.java
index 019e88c..6f9b493 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimDistributedQueueFactory.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/sim/SimDistributedQueueFactory.java
@@ -22,7 +22,7 @@ import java.util.function.Predicate;
import com.codahale.metrics.Timer;
import com.google.common.base.Preconditions;
import org.apache.solr.client.solrj.cloud.DistributedQueue;
-import org.apache.solr.client.solrj.cloud.autoscaling.SolrCloudManager;
+import org.apache.solr.client.solrj.cloud.DistributedQueueFactory;
import org.apache.solr.cloud.Stats;
import org.apache.solr.common.util.Pair;
import org.slf4j.Logger;
@@ -31,7 +31,7 @@ import org.slf4j.LoggerFactory;
/**
*
*/
-public class SimDistributedQueueFactory implements SolrCloudManager.DistributedQueueFactory {
+public class SimDistributedQueueFactory implements DistributedQueueFactory {
private static final Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
Map<String, SimDistributedQueue> queues = new ConcurrentHashMap<>();
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2772945f/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaInfo.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaInfo.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaInfo.java
index 6f32e05..561c966 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaInfo.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/ReplicaInfo.java
@@ -34,7 +34,7 @@ public class ReplicaInfo implements MapWriter {
private String core, collection, shard;
private Replica.Type type;
private String node;
- private Map<String, Object> variables;
+ private final Map<String, Object> variables = new HashMap<>();
public ReplicaInfo(String coll,String shard, Replica r, Map<String, Object> vals){
this.name = r.getName();
@@ -42,7 +42,9 @@ public class ReplicaInfo implements MapWriter {
this.collection = coll;
this.shard = shard;
this.type = r.getType();
- this.variables = vals;
+ if (vals != null) {
+ this.variables.putAll(vals);
+ }
this.node = r.getNodeName();
}
@@ -64,6 +66,19 @@ public class ReplicaInfo implements MapWriter {
for (Map.Entry<String, Object> e : variables.entrySet()) {
ew1.put(e.getKey(), e.getValue());
}
+ if (core != null && !variables.containsKey(ZkStateReader.CORE_NAME_PROP)) {
+ ew1.put(ZkStateReader.CORE_NAME_PROP, core);
+ }
+ if (shard != null && !variables.containsKey(ZkStateReader.SHARD_ID_PROP)) {
+ ew1.put(ZkStateReader.SHARD_ID_PROP, shard);
+ }
+ if (collection != null && !variables.containsKey(ZkStateReader.COLLECTION_PROP)) {
+ ew1.put(ZkStateReader.COLLECTION_PROP, collection);
+ }
+ if (node != null && !variables.containsKey(ZkStateReader.NODE_NAME_PROP)) {
+ ew1.put(ZkStateReader.NODE_NAME_PROP, node);
+ }
+ if (type != null) ew1.put(ZkStateReader.REPLICA_TYPE, type.toString());
});
}
@@ -86,13 +101,11 @@ public class ReplicaInfo implements MapWriter {
public Replica.Type getType() {
Object o = type == null ? variables.get(ZkStateReader.REPLICA_TYPE) : type;
if (o == null) {
- variables.put(ZkStateReader.REPLICA_TYPE, Replica.Type.NRT);
return Replica.Type.NRT;
} else if (o instanceof Replica.Type) {
return (Replica.Type)o;
} else {
Replica.Type type = Replica.Type.get(String.valueOf(o).toUpperCase(Locale.ROOT));
- variables.put(ZkStateReader.REPLICA_TYPE, type);
return type;
}
}
[38/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11461: change
contrib/ltr test-files away from luceneMatchVersion 6.0.0
Posted by ab...@apache.org.
SOLR-11461: change contrib/ltr test-files away from luceneMatchVersion 6.0.0
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/309481f6
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/309481f6
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/309481f6
Branch: refs/heads/jira/solr-11285-sim
Commit: 309481f6ec432cb0c53fa397925cb2fd88729de8
Parents: b8bcaf9
Author: Christine Poerschke <cp...@apache.org>
Authored: Wed Oct 25 09:09:34 2017 +0100
Committer: Christine Poerschke <cp...@apache.org>
Committed: Mon Oct 30 18:03:25 2017 +0000
----------------------------------------------------------------------
.../ltr/src/test-files/solr/collection1/conf/solrconfig-ltr.xml | 2 +-
.../test-files/solr/collection1/conf/solrconfig-ltr_Th10_10.xml | 2 +-
.../src/test-files/solr/collection1/conf/solrconfig-multiseg.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/309481f6/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-ltr.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-ltr.xml b/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-ltr.xml
index d5f66d3..4f1f5ca 100644
--- a/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-ltr.xml
+++ b/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-ltr.xml
@@ -11,7 +11,7 @@
language governing permissions and limitations under the License. -->
<config>
- <luceneMatchVersion>6.0.0</luceneMatchVersion>
+ <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
<dataDir>${solr.data.dir:}</dataDir>
<directoryFactory name="DirectoryFactory"
class="${solr.directoryFactory:solr.RAMDirectoryFactory}" />
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/309481f6/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-ltr_Th10_10.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-ltr_Th10_10.xml b/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-ltr_Th10_10.xml
index 8380653..e375793 100644
--- a/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-ltr_Th10_10.xml
+++ b/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-ltr_Th10_10.xml
@@ -11,7 +11,7 @@
language governing permissions and limitations under the License. -->
<config>
- <luceneMatchVersion>6.0.0</luceneMatchVersion>
+ <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
<dataDir>${solr.data.dir:}</dataDir>
<directoryFactory name="DirectoryFactory"
class="${solr.directoryFactory:solr.RAMDirectoryFactory}" />
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/309481f6/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-multiseg.xml
----------------------------------------------------------------------
diff --git a/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-multiseg.xml b/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-multiseg.xml
index 7008ec1..a251407 100644
--- a/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-multiseg.xml
+++ b/solr/contrib/ltr/src/test-files/solr/collection1/conf/solrconfig-multiseg.xml
@@ -11,7 +11,7 @@
language governing permissions and limitations under the License. -->
<config>
- <luceneMatchVersion>6.0.0</luceneMatchVersion>
+ <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>
<dataDir>${solr.data.dir:}</dataDir>
<directoryFactory name="DirectoryFactory"
class="${solr.directoryFactory:solr.RAMDirectoryFactory}" />
[23/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11532: Update
CHANGES.txt
Posted by ab...@apache.org.
SOLR-11532: Update 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/8a05e6ea
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/8a05e6ea
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/8a05e6ea
Branch: refs/heads/jira/solr-11285-sim
Commit: 8a05e6ea88eeb15a4ddfabdfc5aae66302335259
Parents: 7a19128
Author: Cao Manh Dat <da...@apache.org>
Authored: Fri Oct 27 14:50:03 2017 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Fri Oct 27 14:50:03 2017 +0700
----------------------------------------------------------------------
solr/CHANGES.txt | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8a05e6ea/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index de1d93d..20bf837 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -77,6 +77,7 @@ Bug Fixes
* SOLR-11484: CloudSolrClient does not invalidate cache or retry for RouteException (noble, hossman)
+* SOLR-11532: Solr hits NPE when fl only contains DV fields and any of them is a spatial field. (Cao Manh Dat, David Smiley)
Optimizations
----------------------
[37/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-10132: A new
optional facet.matches parameter to return facet buckets only for terms that
match a regular expression. (Gus Heck, Christine Poerschke)
Posted by ab...@apache.org.
SOLR-10132: A new optional facet.matches parameter to return facet buckets only for terms that match a regular expression. (Gus Heck, Christine Poerschke)
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/b8bcaf92
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b8bcaf92
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b8bcaf92
Branch: refs/heads/jira/solr-11285-sim
Commit: b8bcaf92465eed8477baf9932bea624b6b7830f8
Parents: b7332f6
Author: Christine Poerschke <cp...@apache.org>
Authored: Tue Oct 24 21:54:01 2017 +0100
Committer: Christine Poerschke <cp...@apache.org>
Committed: Mon Oct 30 18:03:25 2017 +0000
----------------------------------------------------------------------
solr/CHANGES.txt | 3 ++
.../solr/request/RegexBytesRefFilter.java | 46 ++++++++++++++++++++
.../org/apache/solr/request/SimpleFacets.java | 44 +++++++++++++------
.../solr/request/RegexBytesRefFilterTest.java | 34 +++++++++++++++
.../apache/solr/request/SimpleFacetsTest.java | 30 +++++++++++++
solr/solr-ref-guide/src/faceting.adoc | 4 ++
.../apache/solr/common/params/FacetParams.java | 5 +++
7 files changed, 153 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b8bcaf92/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 22dfaf9..4c2c149 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -57,6 +57,9 @@ New Features
* SOLR-11518: Implement Suggestions for freedisk violations (noble)
+* SOLR-10132: A new optional facet.matches parameter to return facet buckets only
+ for terms that match a regular expression. (Gus Heck, Christine Poerschke)
+
Bug Fixes
----------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b8bcaf92/solr/core/src/java/org/apache/solr/request/RegexBytesRefFilter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/request/RegexBytesRefFilter.java b/solr/core/src/java/org/apache/solr/request/RegexBytesRefFilter.java
new file mode 100644
index 0000000..5cf85df
--- /dev/null
+++ b/solr/core/src/java/org/apache/solr/request/RegexBytesRefFilter.java
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+package org.apache.solr.request;
+
+import java.util.function.Predicate;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.lucene.util.BytesRef;
+
+/**
+ * An implementation of {@link Predicate} which returns true if the BytesRef matches the supplied regular expression.
+ */
+public class RegexBytesRefFilter implements Predicate<BytesRef> {
+
+ final private Pattern compiled;
+
+ public RegexBytesRefFilter(String regex) {
+ this.compiled = Pattern.compile(regex);
+ }
+
+ protected boolean includeString(String term) {
+ Matcher m = compiled.matcher(term);
+ return m.matches();
+ }
+
+ @Override
+ public boolean test(BytesRef term) {
+ return includeString(term.utf8ToString());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b8bcaf92/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/request/SimpleFacets.java b/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
index 4a911d2..cc5559d 100644
--- a/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
+++ b/solr/core/src/java/org/apache/solr/request/SimpleFacets.java
@@ -348,6 +348,16 @@ public class SimpleFacets {
ENUM, FC, FCS, UIF;
}
+ /**
+ * Create a new bytes ref filter for excluding facet terms.
+ *
+ * This method by default uses the {@link FacetParams#FACET_EXCLUDETERMS} parameter
+ * but custom SimpleFacets classes could use a different implementation.
+ *
+ * @param field the field to check for facet term filters
+ * @param params the request parameter object
+ * @return A predicate for filtering terms or null if no filters are applicable.
+ */
protected Predicate<BytesRef> newExcludeBytesRefFilter(String field, SolrParams params) {
final String exclude = params.getFieldParam(field, FacetParams.FACET_EXCLUDETERMS);
if (exclude == null) {
@@ -364,30 +374,37 @@ public class SimpleFacets {
};
}
+ /**
+ * Create a new bytes ref filter for filtering facet terms. If more than one filter is
+ * applicable the applicable filters will be returned as an {@link Predicate#and(Predicate)}
+ * of all such filters.
+ *
+ * @param field the field to check for facet term filters
+ * @param params the request parameter object
+ * @return A predicate for filtering terms or null if no filters are applicable.
+ */
protected Predicate<BytesRef> newBytesRefFilter(String field, SolrParams params) {
final String contains = params.getFieldParam(field, FacetParams.FACET_CONTAINS);
- final Predicate<BytesRef> containsFilter;
+ Predicate<BytesRef> finalFilter = null;
+
if (contains != null) {
final boolean containsIgnoreCase = params.getFieldBool(field, FacetParams.FACET_CONTAINS_IGNORE_CASE, false);
- containsFilter = new SubstringBytesRefFilter(contains, containsIgnoreCase);
- } else {
- containsFilter = null;
+ finalFilter = new SubstringBytesRefFilter(contains, containsIgnoreCase);
}
- final Predicate<BytesRef> excludeFilter = newExcludeBytesRefFilter(field, params);
-
- if (containsFilter == null && excludeFilter == null) {
- return null;
+ final String regex = params.getFieldParam(field, FacetParams.FACET_MATCHES);
+ if (regex != null) {
+ final RegexBytesRefFilter regexBytesRefFilter = new RegexBytesRefFilter(regex);
+ finalFilter = (finalFilter == null) ? regexBytesRefFilter : finalFilter.and(regexBytesRefFilter);
}
- if (containsFilter != null && excludeFilter == null) {
- return containsFilter;
- } else if (containsFilter == null && excludeFilter != null) {
- return excludeFilter;
+ final Predicate<BytesRef> excludeFilter = newExcludeBytesRefFilter(field, params);
+ if (excludeFilter != null) {
+ finalFilter = (finalFilter == null) ? excludeFilter : finalFilter.and(excludeFilter);
}
- return containsFilter.and(excludeFilter);
+ return finalFilter;
}
/**
@@ -493,6 +510,7 @@ public class SimpleFacets {
}
if (termFilter != null) {
throw new SolrException(ErrorCode.BAD_REQUEST, "BytesRef term filters ("
+ + FacetParams.FACET_MATCHES + ", "
+ FacetParams.FACET_CONTAINS + ", "
+ FacetParams.FACET_EXCLUDETERMS + ") are not supported on numeric types");
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b8bcaf92/solr/core/src/test/org/apache/solr/request/RegexBytesRefFilterTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/request/RegexBytesRefFilterTest.java b/solr/core/src/test/org/apache/solr/request/RegexBytesRefFilterTest.java
new file mode 100644
index 0000000..22af631
--- /dev/null
+++ b/solr/core/src/test/org/apache/solr/request/RegexBytesRefFilterTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+package org.apache.solr.request;
+
+import org.apache.lucene.util.BytesRef;
+import org.apache.lucene.util.LuceneTestCase;
+import org.junit.Test;
+
+public class RegexBytesRefFilterTest extends LuceneTestCase {
+
+ @Test
+ public void testSubstringBytesRefFilter() {
+ final RegexBytesRefFilter filter = new RegexBytesRefFilter("^f[o]{2}.*");
+
+ assertTrue(filter.test(new BytesRef("foobar")));
+ assertFalse(filter.test(new BytesRef("qux")));
+ assertFalse(filter.test(new BytesRef("quxfoo")));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b8bcaf92/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java b/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java
index ac9125e..1f87786 100644
--- a/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java
+++ b/solr/core/src/test/org/apache/solr/request/SimpleFacetsTest.java
@@ -568,6 +568,36 @@ public class SimpleFacetsTest extends SolrTestCaseJ4 {
@Test
+ public void testFacetMatches() {
+ final String[][] uifSwitch = new String[][] {
+ new String[]{"f.trait_s.facet.method", "uif"},
+ new String[]{"facet.method", "uif"}
+ };
+ final String[] none = new String[]{};
+ for (String[] aSwitch : uifSwitch) {
+ for(String[] methodParam : new String[][]{ none, aSwitch}) {
+ assertQ("check facet.match filters facets returned",
+ req(methodParam
+ , "q", "id:[42 TO 47]"
+ , "facet", "true"
+ , "facet.field", "trait_s"
+ , "facet.matches", ".*o.*"
+ )
+ , "*[count(//doc)=6]"
+
+ , "//lst[@name='facet_counts']/lst[@name='facet_queries']"
+
+ , "//lst[@name='facet_counts']/lst[@name='facet_fields']"
+ , "//lst[@name='facet_fields']/lst[@name='trait_s']"
+ , "*[count(//lst[@name='trait_s']/int)=2]"
+ , "//lst[@name='trait_s']/int[@name='Tool'][.='2']"
+ , "//lst[@name='trait_s']/int[@name='Obnoxious'][.='2']"
+ );
+ }
+ }
+ }
+
+ @Test
public void testSimpleFacetCounts() {
assertQ("standard request handler returns all matches",
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b8bcaf92/solr/solr-ref-guide/src/faceting.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/faceting.adoc b/solr/solr-ref-guide/src/faceting.adoc
index d8c0d0e..00a7ef1 100644
--- a/solr/solr-ref-guide/src/faceting.adoc
+++ b/solr/solr-ref-guide/src/faceting.adoc
@@ -65,6 +65,10 @@ The `facet.contains` parameter limits the terms on which to facet to those conta
If `facet.contains` is used, the `facet.contains.ignoreCase` parameter causes case to be ignored when matching the given substring against candidate facet terms.
+`facet.matches`::
+
+If you want to only return facet buckets for the terms that match a regular expression.
+
`facet.sort`::
This parameter determines the ordering of the facet field constraints.
+
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b8bcaf92/solr/solrj/src/java/org/apache/solr/common/params/FacetParams.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/FacetParams.java b/solr/solrj/src/java/org/apache/solr/common/params/FacetParams.java
index e91b9af..52e5f4a 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/FacetParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/FacetParams.java
@@ -176,6 +176,11 @@ public interface FacetParams {
public static final String FACET_CONTAINS = FACET + ".contains";
/**
+ * Only return constraints of a facet field containing the given string.
+ */
+ public static final String FACET_MATCHES = FACET + ".matches";
+
+ /**
* If using facet contains, ignore case when comparing values.
*/
public static final String FACET_CONTAINS_IGNORE_CASE = FACET_CONTAINS + ".ignoreCase";
[32/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11568: Add
matrix Stream Evaluator to support efficient matrix operations
Posted by ab...@apache.org.
SOLR-11568: Add matrix Stream Evaluator to support efficient matrix operations
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/e0239b9e
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/e0239b9e
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/e0239b9e
Branch: refs/heads/jira/solr-11285-sim
Commit: e0239b9e84ab16172a124491c06dde390a4d8fa6
Parents: 8d03028
Author: Joel Bernstein <jb...@apache.org>
Authored: Sun Oct 29 20:59:10 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Sun Oct 29 20:59:57 2017 -0400
----------------------------------------------------------------------
.../org/apache/solr/handler/StreamHandler.java | 1 +
.../solr/client/solrj/io/eval/Matrix.java | 59 ++++++++++++++++++++
.../client/solrj/io/eval/MatrixEvaluator.java | 52 +++++++++++++++++
.../solrj/io/stream/StreamExpressionTest.java | 27 +++++++++
4 files changed, 139 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0239b9e/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/StreamHandler.java b/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
index 51e0575..046a7f5 100644
--- a/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
@@ -268,6 +268,7 @@ public class StreamHandler extends RequestHandlerBase implements SolrCoreAware,
.withFunctionName("polyfitDerivative", PolyFitDerivativeEvaluator.class)
.withFunctionName("harmonicFit", HarmonicFitEvaluator.class)
.withFunctionName("loess", LoessEvaluator.class)
+ .withFunctionName("matrix", MatrixEvaluator.class)
// Boolean Stream Evaluators
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0239b9e/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/Matrix.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/Matrix.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/Matrix.java
new file mode 100644
index 0000000..abde021
--- /dev/null
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/Matrix.java
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ */
+package org.apache.solr.client.solrj.io.eval;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import java.util.Iterator;
+
+public class Matrix implements Iterable {
+
+ private double[][] data;
+
+ public Matrix(double[][] data) {
+ this.data = data;
+ }
+
+ public Iterator iterator() {
+ return new MatrixIterator(data);
+ }
+
+ private static class MatrixIterator implements Iterator {
+
+ private double[][] d;
+ private int index;
+
+ public MatrixIterator(double[][] data) {
+ d = data;
+ }
+
+ public Object next() {
+ double[] row = d[index++];
+ List list = new ArrayList();
+ for(double value : row) {
+ list.add(value);
+ }
+
+ return list;
+ }
+
+ public boolean hasNext() {
+ return index < d.length;
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0239b9e/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/MatrixEvaluator.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/MatrixEvaluator.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/MatrixEvaluator.java
new file mode 100644
index 0000000..f17af33
--- /dev/null
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/eval/MatrixEvaluator.java
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+package org.apache.solr.client.solrj.io.eval;
+
+import java.io.IOException;
+
+import java.util.List;
+import java.util.Locale;
+
+import org.apache.solr.client.solrj.io.stream.expr.StreamExpression;
+import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
+
+public class MatrixEvaluator extends RecursiveNumericListEvaluator implements ManyValueWorker {
+ protected static final long serialVersionUID = 1L;
+
+ public MatrixEvaluator(StreamExpression expression, StreamFactory factory) throws IOException{
+ super(expression, factory);
+
+ if(containedEvaluators.size() < 1){
+ throw new IOException(String.format(Locale.ROOT,"Invalid expression %s - expecting at least one value but found %d",expression,containedEvaluators.size()));
+ }
+ }
+
+ @Override
+ public Object doWork(Object... values) throws IOException {
+ double[][] data = new double[values.length][];
+ for(int i=0; i<values.length; i++) {
+ List<Number> vec = (List<Number>)values[i];
+ double[] array = new double[vec.size()];
+ for(int j=0; j<array.length; j++) {
+ array[j] = vec.get(j).doubleValue();
+ }
+ data[i] = array;
+ }
+
+ return new Matrix(data);
+ }
+}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0239b9e/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 ac06b58..a035f3e 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
@@ -6039,6 +6039,33 @@ public class StreamExpressionTest extends SolrCloudTestCase {
@Test
+ public void testMatrix() throws Exception {
+ String cexpr = "matrix(array(1, 2, 3), rev(array(4,5,6)))";
+ ModifiableSolrParams paramsLoc = new ModifiableSolrParams();
+ paramsLoc.set("expr", cexpr);
+ paramsLoc.set("qt", "/stream");
+ String url = cluster.getJettySolrRunners().get(0).getBaseUrl().toString()+"/"+COLLECTIONORALIAS;
+ TupleStream solrStream = new SolrStream(url, paramsLoc);
+ StreamContext context = new StreamContext();
+ solrStream.setStreamContext(context);
+ List<Tuple> tuples = getTuples(solrStream);
+ assertTrue(tuples.size() == 1);
+ List<List<Number>> out = (List<List<Number>>)tuples.get(0).get("return-value");
+
+ List<Number> array1 = out.get(0);
+ assertEquals(array1.size(), 3);
+ assertEquals(array1.get(0).doubleValue(), 1.0, 0.0);
+ assertEquals(array1.get(1).doubleValue(), 2.0, 0.0);
+ assertEquals(array1.get(2).doubleValue(), 3.0, 0.0);
+
+ List<Number> array2 = out.get(1);
+ assertEquals(array2.size(), 3);
+ assertEquals(array2.get(0).doubleValue(), 6.0, 0.0);
+ assertEquals(array2.get(1).doubleValue(), 5.0, 0.0);
+ assertEquals(array2.get(2).doubleValue(), 4.0, 0.0);
+ }
+
+ @Test
public void testAddAll() throws Exception {
String cexpr = "addAll(array(1, 2, 3), array(4.5, 5.5, 6.5), array(7,8,9))";
ModifiableSolrParams paramsLoc = new ModifiableSolrParams();
[09/50] [abbrv] lucene-solr:jira/solr-11285-sim: Ref Guide: copy edit
new autoscaling pages;
fixes in lots of other pages for "eg" and "ie" misspellings
Posted by ab...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/solrcloud-autoscaling-triggers.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-triggers.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-triggers.adoc
index 0893166..d5a779a 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-triggers.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-triggers.adoc
@@ -18,19 +18,20 @@
// specific language governing permissions and limitations
// under the License.
-Triggers are used by autoscaling API to watch for cluster events such as node joining or leaving,
-and in the future also for other cluster, node and replica events that are important from the
-point of view of cluster performance.
+Triggers are used in autoscaling to watch for cluster events such as nodes joining or leaving.
+
+In the future other cluster, node, and replica events that are important from the
+point of view of cluster performance will also have available triggers.
Trigger implementations verify the state of resources that they monitor. When they detect a
change that merits attention they generate events, which are then queued and processed by configured
-`TriggerAction` implementations - this usually involves computing and executing a plan to manage the new cluster
-resources (eg. move replicas). Solr provides predefined implementations of triggers for specific event types.
+`TriggerAction` implementations. This usually involves computing and executing a plan to manage the new cluster
+resources (e.g., move replicas). Solr provides predefined implementations of triggers for specific event types.
Triggers execute on the node that runs `Overseer`. They are scheduled to run periodically,
-currently at fixed interval of 1s between each execution (not every execution produces events).
+currently at fixed interval of 1 second between each execution (not every execution produces events).
-== Event types
+== Event Types
Currently the following event types (and corresponding trigger implementations) are defined:
* `nodeAdded` - generated when a new node joins the cluster
@@ -41,49 +42,45 @@ maximum rate of events is controlled by the `waitFor` configuration parameter (s
The following properties are common to all event types:
-* `id` - (string) unique time-based event id.
-* `eventType` - (string) event type.
-* `source` - (string) name of the trigger that produced this event.
-* `eventTime` - (long) Unix time when the condition that caused this event occurred. For example, for
+* `id` - (string) A unique time-based event id.
+* `eventType` - (string) The type of event.
+* `source` - (string) The name of the trigger that produced this event.
+* `eventTime` - (long) Unix time when the condition that caused this event occurred. For example, for a
`nodeAdded` event this will be the time when the node was added and not when the event was actually
generated, which may significantly differ due to the rate limits set by `waitFor`.
-* `properties` - (map, optional) additional properties. Currently contains `nodeName` property that
+* `properties` - (map, optional) Any additional properties. Currently includes `nodeName` property that
indicates the node that was lost or added.
-== `.autoAddReplicas` trigger
-When a collection has a flag `autoAddReplicas` set to true then a trigger configuration named `.auto_add_replicas`
-is automatically created to watch for nodes going away. This trigger produces `nodeLost` events,
+== Auto Add Replicas Trigger
+
+When a collection has the parameter `autoAddReplicas` set to true then a trigger configuration named `.auto_add_replicas` is automatically created to watch for nodes going away. This trigger produces `nodeLost` events,
which are then processed by configured actions (usually resulting in computing and executing a plan
to add replicas on the live nodes to maintain the expected replication factor).
-You can see the section <<solrcloud-autoscaling-auto-add-replicas.adoc#solrcloud-autoscaling-auto-add-replicas,SolrCloud AutoScaling Automatically Adding Replicas>> to learn more about how `.autoAddReplicas` work.
+You can see the section <<solrcloud-autoscaling-auto-add-replicas.adoc#solrcloud-autoscaling-auto-add-replicas, Autoscaling Automatically Adding Replicas>> to learn more about how the `.autoAddReplicas` trigger works.
-== Trigger configuration
-Trigger configurations are managed using autoscaling Write API with commands `set-trigger`, `remove-trigger`,
-`suspend-trigger`, `resume-trigger`.
+== Trigger Configuration
+Trigger configurations are managed using the Autoscaling Write API and the commands `set-trigger`, `remove-trigger`,
+`suspend-trigger`, and `resume-trigger`.
Trigger configuration consists of the following properties:
-* `name` - (string, required) unique trigger configuration name.
-* `event` - (string, required) one of predefined event types (nodeAdded, nodeLost).
-* `actions` - (list of action configs, optional) ordered list of actions to execute when event is fired
-* `waitFor` - (string, optional) time to wait between generating new events, as an integer number immediately followed
-by unit symbol, one of "s" (seconds), "m" (minutes), or "h" (hours). Default is "0s".
-* `enabled` - (boolean, optional) when true the trigger is enabled. Default is true.
-* additional implementation-specific properties may be provided
+* `name` - (string, required) A unique trigger configuration name.
+* `event` - (string, required) One of the predefined event types (`nodeAdded` or `nodeLost`).
+* `actions` - (list of action configs, optional) An ordered list of actions to execute when event is fired.
+* `waitFor` - (string, optional) The time to wait between generating new events, as an integer number immediately followed by unit symbol, one of `s` (seconds), `m` (minutes), or `h` (hours). Default is `0s`.
+* `enabled` - (boolean, optional) When `true` the trigger is enabled. Default is `true`.
+* Additional implementation-specific properties may be provided.
Action configuration consists of the following properties:
-* `name` - (string, required) unique name of the action configuration.
-* `class` - (string, required) action implementation class
-* additional implementation-specific properties may be provided
+* `name` - (string, required) A unique name of the action configuration.
+* `class` - (string, required) The action implementation class.
+* A dditional implementation-specific properties may be provided
-If the Action configuration is omitted, then by default, the ComputePlanAction and the ExecutePlanAction are automatically
-added to the trigger configuration.
+If the Action configuration is omitted, then by default, the `ComputePlanAction` and the `ExecutePlanAction` are automatically added to the trigger configuration.
-Example: adding / updating a trigger for `nodeAdded` events. This trigger configuration will
-compute and execute a plan to allocate the resources available on the new node. A custom action
-is also used to possibly modify the plan.
+.Example: adding or updating a trigger for `nodeAdded` events
[source,json]
----
{
@@ -110,3 +107,4 @@ is also used to possibly modify the plan.
}
----
+This trigger configuration will compute and execute a plan to allocate the resources available on the new node. A custom action is also used to possibly modify the plan.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc
index 5d53b6e..0bebed84 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc
@@ -1,4 +1,4 @@
-= SolrCloud AutoScaling
+= SolrCloud Autoscaling
:page-shortname: solrcloud-autoscaling
:page-permalink: solrcloud-autoscaling.html
:page-children: solrcloud-autoscaling-overview, solrcloud-autoscaling-api, solrcloud-autoscaling-policy-preferences, solrcloud-autoscaling-triggers, solrcloud-autoscaling-trigger-actions, solrcloud-autoscaling-listeners, solrcloud-autoscaling-auto-add-replicas, solrcloud-autoscaling-fault-tolerance
@@ -27,10 +27,10 @@ Autoscaling includes an API to manage cluster-wide and collection-specific polic
The following sections describe the autoscaling features of SolrCloud:
* <<solrcloud-autoscaling-overview.adoc#solrcloud-autoscaling-overview,Overview of Autoscaling in SolrCloud>>
-* <<solrcloud-autoscaling-api.adoc#solrcloud-autoscaling-api,SolrCloud Autoscaling API>>
-* <<solrcloud-autoscaling-policy-preferences.adoc#solrcloud-autoscaling-policy-preferences,SolrCloud Autoscaling Policy and Preferences>>
-* <<solrcloud-autoscaling-triggers.adoc#solrcloud-autoscaling-triggers,SolrCloud AutoScaling Triggers>>
-* <<solrcloud-autoscaling-trigger-actions.adoc#solrcloud-autoscaling-trigger-actions,SolrCloud AutoScaling Trigger Actions>>
-* <<solrcloud-autoscaling-listeners.adoc#solrcloud-autoscaling-listeners,SolrCloud AutoScaling Listeners>>
-* <<solrcloud-autoscaling-auto-add-replicas.adoc#solrcloud-autoscaling-auto-add-replicas,SolrCloud AutoScaling - Automatically Adding Replicas>>
-* <<solrcloud-autoscaling-fault-tolerance.adoc#solrcloud-autoscaling-fault-tolerance,SolrCloud AutoScaling Fault Tolerance>>
+* <<solrcloud-autoscaling-api.adoc#solrcloud-autoscaling-api,Autoscaling API>>
+* <<solrcloud-autoscaling-policy-preferences.adoc#solrcloud-autoscaling-policy-preferences,Autoscaling Policy and Preferences>>
+* <<solrcloud-autoscaling-triggers.adoc#solrcloud-autoscaling-triggers,Autoscaling Triggers>>
+* <<solrcloud-autoscaling-trigger-actions.adoc#solrcloud-autoscaling-trigger-actions,Autoscaling Trigger Actions>>
+* <<solrcloud-autoscaling-listeners.adoc#solrcloud-autoscaling-listeners,Autoscaling Listeners>>
+* <<solrcloud-autoscaling-auto-add-replicas.adoc#solrcloud-autoscaling-auto-add-replicas,Autoscaling - Automatically Adding Replicas>>
+* <<solrcloud-autoscaling-fault-tolerance.adoc#solrcloud-autoscaling-fault-tolerance,Autoscaling Fault Tolerance>>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/spatial-search.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/spatial-search.adoc b/solr/solr-ref-guide/src/spatial-search.adoc
index 7afda63..528f35c 100644
--- a/solr/solr-ref-guide/src/spatial-search.adoc
+++ b/solr/solr-ref-guide/src/spatial-search.adoc
@@ -73,7 +73,7 @@ The center point using the format "lat,lon" if latitude & longitude. Otherwise,
A spatial indexed field.
`score`::
-(Advanced option; not supported by LatLonType (deprecated) or PointType) If the query is used in a scoring context (e.g. as the main query in `q`), this _<<local-parameters-in-queries.adoc#local-parameters-in-queries,local parameter>>_ determines what scores will be produced. Valid values are:
+(Advanced option; not supported by LatLonType (deprecated) or PointType) If the query is used in a scoring context (e.g., as the main query in `q`), this _<<local-parameters-in-queries.adoc#local-parameters-in-queries,local parameter>>_ determines what scores will be produced. Valid values are:
* `none`: A fixed score of 1.0. (the default)
* `kilometers`: distance in kilometers between the field value and the specified center point
@@ -84,7 +84,7 @@ A spatial indexed field.
+
[WARNING]
====
-Don't use this for indexed non-point shapes (e.g. polygons). The results will be erroneous. And with RPT, it's only recommended for multi-valued point data, as the implementation doesn't scale very well and for single-valued fields, you should instead use a separate non-RPT field purely for distance sorting.
+Don't use this for indexed non-point shapes (e.g., polygons). The results will be erroneous. And with RPT, it's only recommended for multi-valued point data, as the implementation doesn't scale very well and for single-valued fields, you should instead use a separate non-RPT field purely for distance sorting.
====
+
When used with `BBoxField`, additional options are supported:
@@ -129,7 +129,7 @@ Here's an example:
`&q=*:*&fq=store:[45,-94 TO 46,-93]`
-LatLonType (deprecated) does *not* support rectangles that cross the dateline. For RPT and BBoxField, if you are non-geospatial coordinates (`geo="false"`) then you must quote the points due to the space, e.g. `"x y"`.
+LatLonType (deprecated) does *not* support rectangles that cross the dateline. For RPT and BBoxField, if you are non-geospatial coordinates (`geo="false"`) then you must quote the points due to the space, e.g., `"x y"`.
=== Optimizing: Cache or Not
@@ -193,7 +193,7 @@ RPT offers several functional improvements over LatLonPointSpatialField:
* Non-geodetic – geo=false general x & y (_not_ latitude and longitude) -- if desired
* Query by polygons and other complex shapes, in addition to circles & rectangles
-* Ability to index non-point shapes (e.g. polygons) as well as points – see RptWithGeometrySpatialField
+* Ability to index non-point shapes (e.g., polygons) as well as points – see RptWithGeometrySpatialField
* Heatmap grid faceting
RPT _shares_ various features in common with `LatLonPointSpatialField`. Some are listed here:
@@ -411,7 +411,7 @@ BBoxField is actually based off of 4 instances of another field type referred to
To index a box, add a field value to a bbox field that's a string in the WKT/CQL ENVELOPE syntax. Example: `ENVELOPE(-10, 20, 15, 10)` which is minX, maxX, maxY, minY order. The parameter ordering is unintuitive but that's what the spec calls for. Alternatively, you could provide a rectangular polygon in WKT (or GeoJSON if you set set `format="GeoJSON"`).
-To search, you can use the `{!bbox}` query parser, or the range syntax e.g. `[10,-10 TO 15,20]`, or the ENVELOPE syntax wrapped in parenthesis with a leading search predicate. The latter is the only way to choose a predicate other than Intersects. For example:
+To search, you can use the `{!bbox}` query parser, or the range syntax e.g., `[10,-10 TO 15,20]`, or the ENVELOPE syntax wrapped in parenthesis with a leading search predicate. The latter is the only way to choose a predicate other than Intersects. For example:
[source,plain]
&q={!field f=bbox}Contains(ENVELOPE(-10, 20, 15, 10))
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/stream-decorator-reference.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-decorator-reference.adoc b/solr/solr-ref-guide/src/stream-decorator-reference.adoc
index d15d270..c70d995 100644
--- a/solr/solr-ref-guide/src/stream-decorator-reference.adoc
+++ b/solr/solr-ref-guide/src/stream-decorator-reference.adoc
@@ -22,7 +22,7 @@
== cartesianProduct
-The `cartesianProduct` function turns a single tuple with a multi-valued field (ie. an array) into multiple tuples, one for each value in the array field. That is, given a single tuple containing an array of N values for fieldA, the `cartesianProduct` function will output N tuples, each with one value from the original tuple's array. In essence, you can flatten arrays for further processing.
+The `cartesianProduct` function turns a single tuple with a multi-valued field (i.e., an array) into multiple tuples, one for each value in the array field. That is, given a single tuple containing an array of N values for fieldA, the `cartesianProduct` function will output N tuples, each with one value from the original tuple's array. In essence, you can flatten arrays for further processing.
For example, using `cartesianProduct` you can turn this tuple
[source,text]
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/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 ea3ebca..3fd1c0e 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
@@ -41,7 +41,7 @@ In addition to all the <<the-dismax-query-parser.adoc#dismax-query-parser-parame
Split on whitespace. If set to `true`, text analysis is invoked separately for each individual whitespace-separated term. The default is `false`; whitespace-separated term sequences will be provided to text analysis in one shot, enabling proper function of analysis filters that operate over term sequences, e.g., multi-word synonyms and shingles.
`mm.autoRelax`::
-If `true`, the number of clauses required (<<the-dismax-query-parser.adoc#mm-minimum-should-match-parameter,minimum should match>>) will automatically be relaxed if a clause is removed (by e.g. stopwords filter) from some but not all <<the-dismax-query-parser.adoc#qf-query-fields-parameter,`qf`>> fields. Use this parameter as a workaround if you experience that queries return zero hits due to uneven stopword removal between the `qf` fields.
+If `true`, the number of clauses required (<<the-dismax-query-parser.adoc#mm-minimum-should-match-parameter,minimum should match>>) will automatically be relaxed if a clause is removed (by e.g., stopwords filter) from some but not all <<the-dismax-query-parser.adoc#qf-query-fields-parameter,`qf`>> fields. Use this parameter as a workaround if you experience that queries return zero hits due to uneven stopword removal between the `qf` fields.
+
Note that relaxing `mm` may cause undesired side effects, such as hurting the precision of the search, depending on the nature of your index content.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/using-solrj.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-solrj.adoc b/solr/solr-ref-guide/src/using-solrj.adoc
index 9ac5acc..efdb7cd 100644
--- a/solr/solr-ref-guide/src/using-solrj.adoc
+++ b/solr/solr-ref-guide/src/using-solrj.adoc
@@ -72,8 +72,8 @@ If you are worried about the SolrJ libraries expanding the size of your client a
Most `SolrClient` implementations (with the notable exception of `CloudSolrClient`) require users to specify one or more Solr base URLs, which the client then uses to send HTTP requests to Solr. The path users include on the base URL they provide has an effect on the behavior of the created client from that point on.
-. A URL with a path pointing to a specific core or collection (e.g. `http://hostname:8983/solr/core1`). When a core or collection is specified in the base URL, subsequent requests made with that client are not required to re-specify the affected collection. However, the client is limited to sending requests to that core/collection, and can not send requests to any others.
-. A URL with a generic path pointing to the root Solr path (e.g. `http://hostname:8983/solr`). When no core or collection is specified in the base URL, requests can be made to any core/collection, but the affected core/collection must be specified on all requests.
+. A URL with a path pointing to a specific core or collection (e.g., `http://hostname:8983/solr/core1`). When a core or collection is specified in the base URL, subsequent requests made with that client are not required to re-specify the affected collection. However, the client is limited to sending requests to that core/collection, and can not send requests to any others.
+. A URL with a generic path pointing to the root Solr path (e.g., `http://hostname:8983/solr`). When no core or collection is specified in the base URL, requests can be made to any core/collection, but the affected core/collection must be specified on all requests.
== Setting XMLResponseParser
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/working-with-currencies-and-exchange-rates.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/working-with-currencies-and-exchange-rates.adoc b/solr/solr-ref-guide/src/working-with-currencies-and-exchange-rates.adoc
index 9208775..8461040 100644
--- a/solr/solr-ref-guide/src/working-with-currencies-and-exchange-rates.adoc
+++ b/solr/solr-ref-guide/src/working-with-currencies-and-exchange-rates.adoc
@@ -70,7 +70,7 @@ You must specify parameters `amountLongSuffix` and `codeStrSuffix`, correspondin
defaultCurrency="USD" currencyConfig="currency.xml" />
----
-In the above example, the raw amount field will use the `"*_l_ns"` dynamic field, which must exist in the schema and use a long field type, i.e. one that extends `LongValueFieldType`. The currency code field will use the `"*_s_ns"` dynamic field, which must exist in the schema and use a string field type, i.e. one that is or extends `StrField`.
+In the above example, the raw amount field will use the `"*_l_ns"` dynamic field, which must exist in the schema and use a long field type, i.e., one that extends `LongValueFieldType`. The currency code field will use the `"*_s_ns"` dynamic field, which must exist in the schema and use a string field type, i.e., one that is or extends `StrField`.
.Atomic Updates won't work if dynamic sub-fields are stored
[NOTE]
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/working-with-dates.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/working-with-dates.adoc b/solr/solr-ref-guide/src/working-with-dates.adoc
index 8affc1a..f4e0933 100644
--- a/solr/solr-ref-guide/src/working-with-dates.adoc
+++ b/solr/solr-ref-guide/src/working-with-dates.adoc
@@ -62,7 +62,7 @@ These are valid queries: +
Solr's `DateRangeField` supports the same point in time date syntax described above (with _date math_ described below) and more to express date ranges. One class of examples is truncated dates, which represent the entire date span to the precision indicated. The other class uses the range syntax (`[ TO ]`). Here are some examples:
* `2000-11` – The entire month of November, 2000.
-* `2000-11T13` – Likewise but for an hour of the day (1300 to before 1400, i.e. 1pm to 2pm).
+* `2000-11T13` – Likewise but for an hour of the day (1300 to before 1400, i.e., 1pm to 2pm).
* `-0009` – The year 10 BC. A 0 in the year position is 0 AD, and is also considered 1 BC.
* `[2000-11-01 TO 2014-12-01]` – The specified date range at a day resolution.
* `[2014 TO 2014-12-01]` – From the start of 2014 till the end of the first day of December.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/working-with-external-files-and-processes.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/working-with-external-files-and-processes.adoc b/solr/solr-ref-guide/src/working-with-external-files-and-processes.adoc
index 20f0bdc..fea056b 100644
--- a/solr/solr-ref-guide/src/working-with-external-files-and-processes.adoc
+++ b/solr/solr-ref-guide/src/working-with-external-files-and-processes.adoc
@@ -179,7 +179,7 @@ Special characters in "text" values can be escaped using the escape character `\
|`\t` |horizontal tab
|===
-Please note that Unicode sequences (e.g. `\u0001`) are not supported.
+Please note that Unicode sequences (e.g., `\u0001`) are not supported.
==== Supported Attributes
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/79baebb8/solr/solr-ref-guide/src/zookeeper-access-control.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/zookeeper-access-control.adoc b/solr/solr-ref-guide/src/zookeeper-access-control.adoc
index 78944f3..7271802 100644
--- a/solr/solr-ref-guide/src/zookeeper-access-control.adoc
+++ b/solr/solr-ref-guide/src/zookeeper-access-control.adoc
@@ -51,11 +51,11 @@ We want to be able to:
. Control which ACLs Solr will add to znodes (ZooKeeper files/folders) it creates in ZooKeeper.
. Control it "from the outside", so that you do not have to modify and/or recompile Solr code to turn this on.
-Solr nodes, clients and tools (e.g. ZkCLI) always use a java class called {solr-javadocs}/solr-solrj/org/apache/solr/common/cloud/SolrZkClient.html[`SolrZkClient`] to deal with their ZooKeeper stuff. The implementation of the solution described here is all about changing `SolrZkClient`. If you use `SolrZkClient` in your application, the descriptions below will be true for your application too.
+Solr nodes, clients and tools (e.g., ZkCLI) always use a java class called {solr-javadocs}/solr-solrj/org/apache/solr/common/cloud/SolrZkClient.html[`SolrZkClient`] to deal with their ZooKeeper stuff. The implementation of the solution described here is all about changing `SolrZkClient`. If you use `SolrZkClient` in your application, the descriptions below will be true for your application too.
=== Controlling Credentials
-You control which credentials provider will be used by configuring the `zkCredentialsProvider` property in `solr.xml` 's `<solrcloud>` section to the name of a class (on the classpath) implementing the {solr-javadocs}/solr-solrj/org/apache/solr/common/cloud/ZkCredentialsProvider[`ZkCredentialsProvider`] interface. `server/solr/solr.xml` in the Solr distribution defines the `zkCredentialsProvider` such that it will take on the value of the same-named `zkCredentialsProvider` system property if it is defined (e.g. by uncommenting the `SOLR_ZK_CREDS_AND_ACLS` environment variable definition in `solr.in.sh/.cmd` - see below), or if not, default to the `DefaultZkCredentialsProvider` implementation.
+You control which credentials provider will be used by configuring the `zkCredentialsProvider` property in `solr.xml` 's `<solrcloud>` section to the name of a class (on the classpath) implementing the {solr-javadocs}/solr-solrj/org/apache/solr/common/cloud/ZkCredentialsProvider[`ZkCredentialsProvider`] interface. `server/solr/solr.xml` in the Solr distribution defines the `zkCredentialsProvider` such that it will take on the value of the same-named `zkCredentialsProvider` system property if it is defined (e.g., by uncommenting the `SOLR_ZK_CREDS_AND_ACLS` environment variable definition in `solr.in.sh/.cmd` - see below), or if not, default to the `DefaultZkCredentialsProvider` implementation.
==== Out of the Box Credential Implementations
@@ -68,7 +68,7 @@ You can always make you own implementation, but Solr comes with two implementati
=== Controlling ACLs
-You control which ACLs will be added by configuring `zkACLProvider` property in `solr.xml` 's `<solrcloud>` section to the name of a class (on the classpath) implementing the {solr-javadocs}//solr-solrj/org/apache/solr/common/cloud/ZkACLProvider[`ZkACLProvider`] interface. `server/solr/solr.xml` in the Solr distribution defines the `zkACLProvider` such that it will take on the value of the same-named `zkACLProvider` system property if it is defined (e.g. by uncommenting the `SOLR_ZK_CREDS_AND_ACLS` environment variable definition in `solr.in.sh/.cmd` - see below), or if not, default to the `DefaultZkACLProvider` implementation.
+You control which ACLs will be added by configuring `zkACLProvider` property in `solr.xml` 's `<solrcloud>` section to the name of a class (on the classpath) implementing the {solr-javadocs}//solr-solrj/org/apache/solr/common/cloud/ZkACLProvider[`ZkACLProvider`] interface. `server/solr/solr.xml` in the Solr distribution defines the `zkACLProvider` such that it will take on the value of the same-named `zkACLProvider` system property if it is defined (e.g., by uncommenting the `SOLR_ZK_CREDS_AND_ACLS` environment variable definition in `solr.in.sh/.cmd` - see below), or if not, default to the `DefaultZkACLProvider` implementation.
==== Out of the Box ACL Implementations
@@ -90,7 +90,7 @@ If none of the above ACLs is added to the list, the (empty) ACL list of `Default
Notice the overlap in system property names with credentials provider `VMParamsSingleSetCredentialsDigestZkCredentialsProvider` (described above). This is to let the two providers collaborate in a nice and perhaps common way: we always protect access to content by limiting to two users - an admin-user and a readonly-user - AND we always connect with credentials corresponding to this same admin-user, basically so that we can do anything to the content/znodes we create ourselves.
-You can give the readonly credentials to "clients" of your SolrCloud cluster - e.g. to be used by SolrJ clients. They will be able to read whatever is necessary to run a functioning SolrJ client, but they will not be able to modify any content in ZooKeeper.
+You can give the readonly credentials to "clients" of your SolrCloud cluster - e.g., to be used by SolrJ clients. They will be able to read whatever is necessary to run a functioning SolrJ client, but they will not be able to modify any content in ZooKeeper.
=== ZooKeeper ACLs in Solr Scripts
[16/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11032: forgot
to save merge conflict resolution...grrrrr
Posted by ab...@apache.org.
SOLR-11032: forgot to save merge conflict resolution...grrrrr
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/4e993880
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4e993880
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4e993880
Branch: refs/heads/jira/solr-11285-sim
Commit: 4e993880842fc282af1af5a67859233ff680b422
Parents: 7ece47c
Author: Cassandra Targett <ct...@apache.org>
Authored: Thu Oct 26 15:27:49 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Thu Oct 26 15:27:49 2017 -0500
----------------------------------------------------------------------
solr/solr-ref-guide/src/using-solrj.adoc | 5 -----
1 file changed, 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4e993880/solr/solr-ref-guide/src/using-solrj.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-solrj.adoc b/solr/solr-ref-guide/src/using-solrj.adoc
index 5eea5b7..f3abaab 100644
--- a/solr/solr-ref-guide/src/using-solrj.adoc
+++ b/solr/solr-ref-guide/src/using-solrj.adoc
@@ -77,12 +77,7 @@ If you are worried about the SolrJ libraries expanding the size of your client a
For all its flexibility, SolrJ is built around a few simple interfaces.
-<<<<<<< ours
-. A URL with a path pointing to a specific core or collection (e.g., `http://hostname:8983/solr/core1`). When a core or collection is specified in the base URL, subsequent requests made with that client are not required to re-specify the affected collection. However, the client is limited to sending requests to that core/collection, and can not send requests to any others.
-. A URL with a generic path pointing to the root Solr path (e.g., `http://hostname:8983/solr`). When no core or collection is specified in the base URL, requests can be made to any core/collection, but the affected core/collection must be specified on all requests.
-=======
All requests to Solr are sent by a {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/SolrClient.html[`SolrClient`]. SolrClient's are the main workhorses at the core of SolrJ. They handle the work of connecting to and communicating with Solr, and are where most of the user configuration happens.
->>>>>>> theirs
Requests are sent in the form of {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/SolrRequest.html[`SolrRequests`], and are returned as {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/SolrResponse.html[`SolrResponses`].
[05/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-9735: Fix v2
API for AutoscalingHistoryHandler.
Posted by ab...@apache.org.
SOLR-9735: Fix v2 API for AutoscalingHistoryHandler.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/99f57601
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/99f57601
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/99f57601
Branch: refs/heads/jira/solr-11285-sim
Commit: 99f5760142330ea4c00de9d1a17807f913aab6be
Parents: 4674d26
Author: Andrzej Bialecki <ab...@apache.org>
Authored: Thu Oct 26 12:14:30 2017 +0200
Committer: Andrzej Bialecki <ab...@apache.org>
Committed: Thu Oct 26 15:21:10 2017 +0200
----------------------------------------------------------------------
.../admin/AutoscalingHistoryHandler.java | 13 +++++
.../resources/apispec/autoscaling.history.json | 61 ++++++++++++++++++++
2 files changed, 74 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/99f57601/solr/core/src/java/org/apache/solr/handler/admin/AutoscalingHistoryHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/AutoscalingHistoryHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/AutoscalingHistoryHandler.java
index 1c568d6..a70afcf 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/AutoscalingHistoryHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/AutoscalingHistoryHandler.java
@@ -17,10 +17,13 @@
package org.apache.solr.handler.admin;
import java.lang.invoke.MethodHandles;
+import java.util.Collection;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
+import org.apache.solr.api.Api;
+import org.apache.solr.api.ApiBag;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.cloud.autoscaling.SystemLogListener;
@@ -146,4 +149,14 @@ public class AutoscalingHistoryHandler extends RequestHandlerBase implements Per
return Category.ADMIN;
}
+ @Override
+ public Boolean registerV2() {
+ return Boolean.TRUE;
+ }
+
+ @Override
+ public Collection<Api> getApis() {
+ return ApiBag.wrapRequestHandlers(this, "autoscaling.history");
+ }
+
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/99f57601/solr/solrj/src/resources/apispec/autoscaling.history.json
----------------------------------------------------------------------
diff --git a/solr/solrj/src/resources/apispec/autoscaling.history.json b/solr/solrj/src/resources/apispec/autoscaling.history.json
new file mode 100644
index 0000000..dadd6cb
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/autoscaling.history.json
@@ -0,0 +1,61 @@
+{
+ "documentation": "https://lucene.apache.org/solr/guide/solrcloud-autoscaling-api.html",
+ "description": "Autoscaling history handler allows retrieving past autoscaling events recorded in the .system collection.",
+ "methods": [
+ "GET"
+ ],
+ "url": {
+ "paths": [
+ "/cluster/autoscaling/history"
+ ],
+ "params": {
+ "collection": {
+ "type": "string",
+ "description": "Collection where autoscaling events are stored, '.system' by default.",
+ "default": ".system"
+ },
+ "q": {
+ "type": "string",
+ "description": "Arbitrary query to limit the selected events.",
+ "default": "*:*"
+ },
+ "sort": {
+ "type": "string",
+ "description": "Sorting criteria for returned events.",
+ "default": "id asc"
+ },
+ "action": {
+ "type": "string",
+ "description": "Trigger action name to select"
+ },
+ "message": {
+ "type": "string",
+ "description": "Event message to select"
+ },
+ "trigger": {
+ "type": "string",
+ "description": "Trigger name to select"
+ },
+ "type": {
+ "type": "string",
+ "description": "Event type to select"
+ },
+ "node": {
+ "type": "string",
+ "description": "Node name to select"
+ },
+ "stage": {
+ "type": "string",
+ "description": "Processing stage to select"
+ },
+ "beforeAction": {
+ "type": "string",
+ "description": "Action name to select events before the action was executed"
+ },
+ "afterAction": {
+ "type": "string",
+ "description": "Action name to select events after the action was executed"
+ }
+ }
+ }
+}
[34/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11413:
SolrGraphiteReporter fails to report metrics due to non-thread safe code.
Posted by ab...@apache.org.
SOLR-11413: SolrGraphiteReporter fails to report metrics due to non-thread safe code.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/c8d55cc6
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/c8d55cc6
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/c8d55cc6
Branch: refs/heads/jira/solr-11285-sim
Commit: c8d55cc6d45afaff31160a22fbe01dc36bb6675f
Parents: cc519b9
Author: Andrzej Bialecki <ab...@apache.org>
Authored: Mon Oct 30 12:52:01 2017 +0100
Committer: Andrzej Bialecki <ab...@apache.org>
Committed: Mon Oct 30 12:52:01 2017 +0100
----------------------------------------------------------------------
solr/CHANGES.txt | 2 ++
.../solr/metrics/reporters/SolrGraphiteReporter.java | 12 +++++-------
solr/core/src/test-files/solr/solr-graphitereporter.xml | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c8d55cc6/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index b292625..22dfaf9 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -81,6 +81,8 @@ Bug Fixes
* SOLR-11557: Fix SolrZkClient.checkInterrupted (Tomás Fernández Löbbe)
+* SOLR-11413: SolrGraphiteReporter fails to report metrics due to non-thread safe code. (Erik Persson, ab)
+
Optimizations
----------------------
* SOLR-11285: Refactor autoscaling framework to avoid direct references to Zookeeper and Solr
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c8d55cc6/solr/core/src/java/org/apache/solr/metrics/reporters/SolrGraphiteReporter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/metrics/reporters/SolrGraphiteReporter.java b/solr/core/src/java/org/apache/solr/metrics/reporters/SolrGraphiteReporter.java
index 68111d5..4a55f46 100644
--- a/solr/core/src/java/org/apache/solr/metrics/reporters/SolrGraphiteReporter.java
+++ b/solr/core/src/java/org/apache/solr/metrics/reporters/SolrGraphiteReporter.java
@@ -75,13 +75,11 @@ public class SolrGraphiteReporter extends FilteringSolrMetricReporter {
}
GraphiteSender graphite;
String id = host + ":" + port + ":" + pickled;
- graphite = serviceRegistry.getOrCreate(id, () -> {
- if (pickled) {
- return new PickledGraphite(host, port);
- } else {
- return new Graphite(host, port);
- }
- });
+ if (pickled) {
+ graphite = new PickledGraphite(host, port);
+ } else {
+ graphite = new Graphite(host, port);
+ }
if (instancePrefix == null) {
instancePrefix = registryName;
} else {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c8d55cc6/solr/core/src/test-files/solr/solr-graphitereporter.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/solr-graphitereporter.xml b/solr/core/src/test-files/solr/solr-graphitereporter.xml
index 7c7f5ca..de12313 100644
--- a/solr/core/src/test-files/solr/solr-graphitereporter.xml
+++ b/solr/core/src/test-files/solr/solr-graphitereporter.xml
@@ -18,7 +18,7 @@
<solr>
<metrics>
- <reporter name="test" group="node" class="org.apache.solr.metrics.reporters.SolrGraphiteReporter">
+ <reporter name="test" group="node,core" class="org.apache.solr.metrics.reporters.SolrGraphiteReporter">
<str name="host">localhost</str>
<int name="port">${mock-graphite-port}</int>
<!-- for unit tests this is set to 1 second - DO NOT USE THIS VALUE IN PRODUCTION! -->
[35/50] [abbrv] lucene-solr:jira/solr-11285-sim: TestFunctionQuery:
clear index before each test to avoid cross contamination
Posted by ab...@apache.org.
TestFunctionQuery: clear index before each test to avoid cross contamination
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/84fa17d4
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/84fa17d4
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/84fa17d4
Branch: refs/heads/jira/solr-11285-sim
Commit: 84fa17d42a9c0c24f784ecc7afdb107e2503c610
Parents: c8d55cc
Author: Steve Rowe <sa...@apache.org>
Authored: Mon Oct 30 11:25:28 2017 -0400
Committer: Steve Rowe <sa...@apache.org>
Committed: Mon Oct 30 11:26:31 2017 -0400
----------------------------------------------------------------------
.../solr/search/function/TestFunctionQuery.java | 27 ++++++++++++++++++--
1 file changed, 25 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/84fa17d4/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java b/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java
index dc23c4c..8c03203 100644
--- a/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java
+++ b/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java
@@ -138,6 +138,8 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
}
void doTest(String field) {
+ clearIndex();
+
// lrf.args.put("version","2.0");
int[] vals = { 100,-4,0,10,25,5 };
createIndex(field,vals);
@@ -209,6 +211,8 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
@Test
public void testExternalField() throws Exception {
+ clearIndex();
+
String field = "foo_extf";
int[] ids = {100,-4,0,10,25,5,77,23,55,-78,-45,-24,63,78,94,22,34,54321,261,-627};
@@ -283,6 +287,8 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
@Test
public void testExternalFileFieldStringKeys() throws Exception {
+ clearIndex();
+
final String extField = "foo_extfs";
final String keyField = "sfile_s";
assertU(adoc("id", "991", keyField, "AAA=AAA"));
@@ -295,6 +301,8 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
@Test
public void testExternalFileFieldNumericKey() throws Exception {
+ clearIndex();
+
final String extField = "eff_trie";
final String keyField = "eff_tint";
assertU(adoc("id", "991", keyField, "91"));
@@ -512,6 +520,7 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
@Test
public void testRetrievePayloads() throws Exception {
clearIndex();
+
int numDocs = 100 + random().nextInt(100);
int numLocations = 1000 + random().nextInt(2000);
for (int docNum = 0 ; docNum < numDocs ; ++docNum) {
@@ -536,6 +545,8 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
@Test
public void testSortByFunc() throws Exception {
+ clearIndex();
+
assertU(adoc("id", "1", "const_s", "xx",
"x_i", "100", "1_s", "a",
"x:x_i", "100", "1-1_s", "a"));
@@ -625,7 +636,9 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
}
@Test
- public void testDegreeRads() throws Exception {
+ public void testDegreeRads() throws Exception {
+ clearIndex();
+
assertU(adoc("id", "1", "x_td", "0", "y_td", "0"));
assertU(adoc("id", "2", "x_td", "90", "y_td", String.valueOf(Math.PI / 2)));
assertU(adoc("id", "3", "x_td", "45", "y_td", String.valueOf(Math.PI / 4)));
@@ -643,6 +656,8 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
@Test
public void testStrDistance() throws Exception {
+ clearIndex();
+
assertU(adoc("id", "1", "x_s", "foil"));
assertU(commit());
assertQ(req("fl", "*,score", "q", "{!func}strdist(x_s, 'foit', edit)", "fq", "id:1"), "//float[@name='score']='0.75'");
@@ -683,6 +698,8 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
@Test
public void testFuncs() throws Exception {
+ clearIndex();
+
assertU(adoc("id", "1", "foo_d", "9"));
assertU(commit());
@@ -777,8 +794,10 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
singleTest(fieldAsFunc, "log(\0)", 1,0);
}
- @Test
+ @Test
public void testBooleanFunctions() throws Exception {
+ clearIndex();
+
assertU(adoc("id", "1", "text", "hello", "foo_s","A", "foo_ti", "0", "foo_tl","0"));
assertU(adoc("id", "2" , "foo_ti","10", "foo_tl","11"));
assertU(commit());
@@ -844,6 +863,8 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
@Test
public void testPseudoFieldFunctions() throws Exception {
+ clearIndex();
+
assertU(adoc("id", "1", "text", "hello", "foo_s","A", "yak_i", "32"));
assertU(adoc("id", "2"));
assertU(commit());
@@ -886,6 +907,8 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
@Test
public void testNumericComparisons() throws Exception {
+ clearIndex();
+
assertU(adoc("id", "1", "age_i", "35"));
assertU(adoc("id", "2", "age_i", "25"));
assertU(commit());
[41/50] [abbrv] lucene-solr:jira/solr-11285-sim: LUCENE-8020: don't
force sim to score bogus terms (e.g. docfreq=0)
Posted by ab...@apache.org.
LUCENE-8020: don't force sim to score bogus terms (e.g. docfreq=0)
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/e0bde579
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/e0bde579
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/e0bde579
Branch: refs/heads/jira/solr-11285-sim
Commit: e0bde579815ae5ce2525bb659d04e908812f1605
Parents: 3edb234
Author: Robert Muir <rm...@apache.org>
Authored: Mon Oct 30 20:31:38 2017 -0400
Committer: Robert Muir <rm...@apache.org>
Committed: Mon Oct 30 20:32:12 2017 -0400
----------------------------------------------------------------------
lucene/CHANGES.txt | 5 ++
.../lucene/search/CollectionStatistics.java | 51 +++++++++++++++--
.../org/apache/lucene/search/IndexSearcher.java | 24 ++++----
.../apache/lucene/search/MultiPhraseQuery.java | 11 +++-
.../org/apache/lucene/search/PhraseQuery.java | 12 +++-
.../org/apache/lucene/search/SynonymQuery.java | 27 ++++++---
.../org/apache/lucene/search/TermQuery.java | 13 +++--
.../apache/lucene/search/TermStatistics.java | 22 ++++++-
.../apache/lucene/search/spans/SpanWeight.java | 15 +++--
.../similarities/TestClassicSimilarity.java | 3 +-
.../search/similarities/TestSimilarity2.java | 5 +-
.../lucene/search/TermAutomatonQuery.java | 13 ++++-
.../lucene/search/TestTermAutomatonQuery.java | 60 ++++++++++++++++++++
.../lucene/search/ShardSearchingTestBase.java | 42 ++++++++------
.../solr/search/stats/CollectionStats.java | 3 +
.../solr/search/stats/ExactStatsCache.java | 7 ++-
.../org/apache/solr/search/stats/TermStats.java | 3 +
17 files changed, 252 insertions(+), 64 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index ea4b8be..f214620 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -11,6 +11,11 @@ Changes in Runtime Behavior
will now fail to open even if they have been merged with the previous major
version. (Adrien Grand)
+* LUCENE-8020: Similarities are no longer passed terms that don't exist by
+ queries such as SpanOrQuery, so scoring formulas no longer require
+ divide-by-zero hacks. IndexSearcher.termStatistics/collectionStatistics return null
+ instead of returning bogus values for a non-existent term or field. (Robert Muir)
+
Improvements
* LUCENE-7997: Add BaseSimilarityTestCase to sanity check similarities.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/lucene/core/src/java/org/apache/lucene/search/CollectionStatistics.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/CollectionStatistics.java b/lucene/core/src/java/org/apache/lucene/search/CollectionStatistics.java
index ef19abd..a6a1e19 100644
--- a/lucene/core/src/java/org/apache/lucene/search/CollectionStatistics.java
+++ b/lucene/core/src/java/org/apache/lucene/search/CollectionStatistics.java
@@ -16,6 +16,8 @@
*/
package org.apache.lucene.search;
+import java.util.Objects;
+
import org.apache.lucene.index.IndexReader; // javadocs
import org.apache.lucene.index.Terms; // javadocs
@@ -31,11 +33,52 @@ public class CollectionStatistics {
private final long sumTotalTermFreq;
private final long sumDocFreq;
+ /**
+ * Creates statistics instance for a collection (field).
+ * @param field Field's name
+ * @param maxDoc total number of documents.
+ * @param docCount number of documents containing the field.
+ * @param sumTotalTermFreq number of tokens in the field.
+ * @param sumDocFreq number of postings list entries for the field.
+ * @throws IllegalArgumentException if {@code maxDoc} is negative or zero.
+ * @throws IllegalArgumentException if {@code docCount} is negative or zero.
+ * @throws IllegalArgumentException if {@code docCount} is more than {@code maxDoc}.
+ * @throws IllegalArgumentException if {@code sumDocFreq} is less than {@code docCount}.
+ * @throws IllegalArgumentException if {@code sumTotalTermFreq} is less than {@code sumDocFreq}.
+ */
public CollectionStatistics(String field, long maxDoc, long docCount, long sumTotalTermFreq, long sumDocFreq) {
- assert maxDoc >= 0;
- assert docCount >= -1 && docCount <= maxDoc; // #docs with field must be <= #docs
- assert sumDocFreq == -1 || sumDocFreq >= docCount; // #postings must be >= #docs with field
- assert sumTotalTermFreq == -1 || sumTotalTermFreq >= sumDocFreq; // #positions must be >= #postings
+ Objects.requireNonNull(field);
+ if (maxDoc <= 0) {
+ throw new IllegalArgumentException("maxDoc must be positive, maxDoc: " + maxDoc);
+ }
+ if (docCount != -1) {
+ if (docCount <= 0) {
+ throw new IllegalArgumentException("docCount must be positive, docCount: " + docCount);
+ }
+ if (docCount > maxDoc) {
+ throw new IllegalArgumentException("docCount must not exceed maxDoc, docCount: " + docCount + ", maxDoc: " + maxDoc);
+ }
+ }
+ if (sumDocFreq != -1) {
+ if (sumDocFreq <= 0) {
+ throw new IllegalArgumentException("sumDocFreq must be positive, sumDocFreq: " + sumDocFreq);
+ }
+ if (docCount != -1) {
+ if (sumDocFreq < docCount) {
+ throw new IllegalArgumentException("sumDocFreq must be at least docCount, sumDocFreq: " + sumDocFreq + ", docCount: " + docCount);
+ }
+ }
+ }
+ if (sumTotalTermFreq != -1) {
+ if (sumTotalTermFreq <= 0) {
+ throw new IllegalArgumentException("sumTotalTermFreq must be positive, sumTotalTermFreq: " + sumTotalTermFreq);
+ }
+ if (sumDocFreq != -1) {
+ if (sumTotalTermFreq < sumDocFreq) {
+ throw new IllegalArgumentException("sumTotalTermFreq must be at least sumDocFreq, sumTotalTermFreq: " + sumTotalTermFreq + ", sumDocFreq: " + sumDocFreq);
+ }
+ }
+ }
this.field = field;
this.maxDoc = maxDoc;
this.docCount = docCount;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java b/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
index c5d9ddc..c8f45bf 100644
--- a/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
+++ b/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
@@ -767,18 +767,24 @@ public class IndexSearcher {
}
/**
- * Returns {@link TermStatistics} for a term.
+ * Returns {@link TermStatistics} for a term, or {@code null} if
+ * the term does not exist.
*
* This can be overridden for example, to return a term's statistics
* across a distributed collection.
* @lucene.experimental
*/
public TermStatistics termStatistics(Term term, TermContext context) throws IOException {
- return new TermStatistics(term.bytes(), context.docFreq(), context.totalTermFreq());
+ if (context.docFreq() == 0) {
+ return null;
+ } else {
+ return new TermStatistics(term.bytes(), context.docFreq(), context.totalTermFreq());
+ }
}
/**
- * Returns {@link CollectionStatistics} for a field.
+ * Returns {@link CollectionStatistics} for a field, or {@code null} if
+ * the field does not exist (has no indexed terms)
*
* This can be overridden for example, to return a field's statistics
* across a distributed collection.
@@ -793,15 +799,13 @@ public class IndexSearcher {
Terms terms = MultiFields.getTerms(reader, field);
if (terms == null) {
- docCount = 0;
- sumTotalTermFreq = 0;
- sumDocFreq = 0;
- } else {
- docCount = terms.getDocCount();
- sumTotalTermFreq = terms.getSumTotalTermFreq();
- sumDocFreq = terms.getSumDocFreq();
+ return null;
}
+ docCount = terms.getDocCount();
+ sumTotalTermFreq = terms.getSumTotalTermFreq();
+ sumDocFreq = terms.getSumDocFreq();
+
return new CollectionStatistics(field, reader.maxDoc(), docCount, sumTotalTermFreq, sumDocFreq);
}
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/lucene/core/src/java/org/apache/lucene/search/MultiPhraseQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/MultiPhraseQuery.java b/lucene/core/src/java/org/apache/lucene/search/MultiPhraseQuery.java
index afb6fc7..d39fdc6 100644
--- a/lucene/core/src/java/org/apache/lucene/search/MultiPhraseQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/MultiPhraseQuery.java
@@ -203,13 +203,20 @@ public class MultiPhraseQuery extends Query {
termContext = TermContext.build(context, term);
termContexts.put(term, termContext);
}
- allTermStats.add(searcher.termStatistics(term, termContext));
+ TermStatistics termStatistics = searcher.termStatistics(term, termContext);
+ if (termStatistics != null) {
+ allTermStats.add(termStatistics);
+ }
}
}
- stats = similarity.computeWeight(
+ if (allTermStats.isEmpty()) {
+ stats = null; // none of the terms were found, we won't use sim at all
+ } else {
+ stats = similarity.computeWeight(
boost,
searcher.collectionStatistics(field),
allTermStats.toArray(new TermStatistics[allTermStats.size()]));
+ }
}
@Override
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/lucene/core/src/java/org/apache/lucene/search/PhraseQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/PhraseQuery.java b/lucene/core/src/java/org/apache/lucene/search/PhraseQuery.java
index d0bf828..79703f5 100644
--- a/lucene/core/src/java/org/apache/lucene/search/PhraseQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/PhraseQuery.java
@@ -370,12 +370,20 @@ public class PhraseQuery extends Query {
final IndexReaderContext context = searcher.getTopReaderContext();
states = new TermContext[terms.length];
TermStatistics termStats[] = new TermStatistics[terms.length];
+ int termUpTo = 0;
for (int i = 0; i < terms.length; i++) {
final Term term = terms[i];
states[i] = TermContext.build(context, term);
- termStats[i] = searcher.termStatistics(term, states[i]);
+ TermStatistics termStatistics = searcher.termStatistics(term, states[i]);
+ if (termStatistics != null) {
+ termStats[termUpTo++] = termStatistics;
+ }
+ }
+ if (termUpTo > 0) {
+ stats = similarity.computeWeight(boost, searcher.collectionStatistics(field), Arrays.copyOf(termStats, termUpTo));
+ } else {
+ stats = null; // no terms at all, we won't use similarity
}
- stats = similarity.computeWeight(boost, searcher.collectionStatistics(field), termStats);
}
@Override
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/lucene/core/src/java/org/apache/lucene/search/SynonymQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/SynonymQuery.java b/lucene/core/src/java/org/apache/lucene/search/SynonymQuery.java
index c718dc9..e9e6636 100644
--- a/lucene/core/src/java/org/apache/lucene/search/SynonymQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/SynonymQuery.java
@@ -34,6 +34,7 @@ import org.apache.lucene.index.TermState;
import org.apache.lucene.index.TermsEnum;
import org.apache.lucene.search.similarities.Similarity;
import org.apache.lucene.search.similarities.Similarity.SimScorer;
+import org.apache.lucene.util.BytesRef;
/**
* A query that treats multiple terms as synonyms.
@@ -137,16 +138,22 @@ public final class SynonymQuery extends Query {
for (int i = 0; i < termContexts.length; i++) {
termContexts[i] = TermContext.build(searcher.getTopReaderContext(), terms[i]);
TermStatistics termStats = searcher.termStatistics(terms[i], termContexts[i]);
- docFreq = Math.max(termStats.docFreq(), docFreq);
- if (termStats.totalTermFreq() == -1) {
- totalTermFreq = -1;
- } else if (totalTermFreq != -1) {
- totalTermFreq += termStats.totalTermFreq();
+ if (termStats != null) {
+ docFreq = Math.max(termStats.docFreq(), docFreq);
+ if (termStats.totalTermFreq() == -1) {
+ totalTermFreq = -1;
+ } else if (totalTermFreq != -1) {
+ totalTermFreq += termStats.totalTermFreq();
+ }
}
}
- TermStatistics pseudoStats = new TermStatistics(null, docFreq, totalTermFreq);
this.similarity = searcher.getSimilarity(true);
- this.simWeight = similarity.computeWeight(boost, collectionStats, pseudoStats);
+ if (docFreq > 0) {
+ TermStatistics pseudoStats = new TermStatistics(new BytesRef("synonym pseudo-term"), docFreq, totalTermFreq);
+ this.simWeight = similarity.computeWeight(boost, collectionStats, pseudoStats);
+ } else {
+ this.simWeight = null; // no terms exist at all, we won't use similarity
+ }
}
@Override
@@ -185,7 +192,7 @@ public final class SynonymQuery extends Query {
@Override
public Scorer scorer(LeafReaderContext context) throws IOException {
- Similarity.SimScorer simScorer = similarity.simScorer(simWeight, context);
+ Similarity.SimScorer simScorer = null;
// we use termscorers + disjunction as an impl detail
List<Scorer> subScorers = new ArrayList<>();
for (int i = 0; i < terms.length; i++) {
@@ -194,6 +201,10 @@ public final class SynonymQuery extends Query {
TermsEnum termsEnum = context.reader().terms(terms[i].field()).iterator();
termsEnum.seekExact(terms[i].bytes(), state);
PostingsEnum postings = termsEnum.postings(null, PostingsEnum.FREQS);
+ // lazy init sim, in case no terms exist
+ if (simScorer == null) {
+ simScorer = similarity.simScorer(simWeight, context);
+ }
subScorers.add(new TermScorer(this, postings, simScorer));
}
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/TermQuery.java b/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
index 48c61fa..587c513 100644
--- a/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
+++ b/lucene/core/src/java/org/apache/lucene/search/TermQuery.java
@@ -65,13 +65,16 @@ public class TermQuery extends Query {
collectionStats = searcher.collectionStatistics(term.field());
termStats = searcher.termStatistics(term, termStates);
} else {
- // we do not need the actual stats, use fake stats with docFreq=maxDoc and ttf=-1
- final int maxDoc = searcher.getIndexReader().maxDoc();
- collectionStats = new CollectionStatistics(term.field(), maxDoc, -1, -1, -1);
- termStats = new TermStatistics(term.bytes(), maxDoc, -1);
+ // we do not need the actual stats, use fake stats with docFreq=maxDoc=1 and ttf=-1
+ collectionStats = new CollectionStatistics(term.field(), 1, -1, -1, -1);
+ termStats = new TermStatistics(term.bytes(), 1, -1);
}
- this.stats = similarity.computeWeight(boost, collectionStats, termStats);
+ if (termStats == null) {
+ this.stats = null; // term doesn't exist in any segment, we won't use similarity at all
+ } else {
+ this.stats = similarity.computeWeight(boost, collectionStats, termStats);
+ }
}
@Override
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/lucene/core/src/java/org/apache/lucene/search/TermStatistics.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/TermStatistics.java b/lucene/core/src/java/org/apache/lucene/search/TermStatistics.java
index a8e2e06..7d4f03a 100644
--- a/lucene/core/src/java/org/apache/lucene/search/TermStatistics.java
+++ b/lucene/core/src/java/org/apache/lucene/search/TermStatistics.java
@@ -17,6 +17,8 @@
package org.apache.lucene.search;
+import java.util.Objects;
+
import org.apache.lucene.index.Term;
import org.apache.lucene.index.TermsEnum; // javadocs
import org.apache.lucene.util.BytesRef;
@@ -29,9 +31,25 @@ public class TermStatistics {
private final long docFreq;
private final long totalTermFreq;
+ /**
+ * Creates statistics instance for a term.
+ * @param term Term bytes
+ * @param docFreq number of documents containing the term in the collection.
+ * @param totalTermFreq number of occurrences of the term in the collection.
+ * @throws NullPointerException if {@code term} is {@code null}.
+ * @throws IllegalArgumentException if {@code docFreq} is negative or zero.
+ * @throws IllegalArgumentException if {@code totalTermFreq} is less than {@code docFreq}.
+ */
public TermStatistics(BytesRef term, long docFreq, long totalTermFreq) {
- assert docFreq >= 0;
- assert totalTermFreq == -1 || totalTermFreq >= docFreq; // #positions must be >= #postings
+ Objects.requireNonNull(term);
+ if (docFreq <= 0) {
+ throw new IllegalArgumentException("docFreq must be positive, docFreq: " + docFreq);
+ }
+ if (totalTermFreq != -1) {
+ if (totalTermFreq < docFreq) {
+ throw new IllegalArgumentException("totalTermFreq must be at least docFreq, totalTermFreq: " + totalTermFreq + ", docFreq: " + docFreq);
+ }
+ }
this.term = term;
this.docFreq = docFreq;
this.totalTermFreq = totalTermFreq;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/lucene/core/src/java/org/apache/lucene/search/spans/SpanWeight.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/search/spans/SpanWeight.java b/lucene/core/src/java/org/apache/lucene/search/spans/SpanWeight.java
index 4d08172..0dad614 100644
--- a/lucene/core/src/java/org/apache/lucene/search/spans/SpanWeight.java
+++ b/lucene/core/src/java/org/apache/lucene/search/spans/SpanWeight.java
@@ -18,6 +18,7 @@ package org.apache.lucene.search.spans;
import java.io.IOException;
+import java.util.Arrays;
import java.util.Map;
import org.apache.lucene.index.LeafReaderContext;
@@ -93,13 +94,19 @@ public abstract class SpanWeight extends Weight {
if (termContexts == null || termContexts.size() == 0 || query.getField() == null)
return null;
TermStatistics[] termStats = new TermStatistics[termContexts.size()];
- int i = 0;
+ int termUpTo = 0;
for (Term term : termContexts.keySet()) {
- termStats[i] = searcher.termStatistics(term, termContexts.get(term));
- i++;
+ TermStatistics termStatistics = searcher.termStatistics(term, termContexts.get(term));
+ if (termStatistics != null) {
+ termStats[termUpTo++] = termStatistics;
+ }
}
CollectionStatistics collectionStats = searcher.collectionStatistics(query.getField());
- return similarity.computeWeight(boost, collectionStats, termStats);
+ if (termUpTo > 0) {
+ return similarity.computeWeight(boost, collectionStats, Arrays.copyOf(termStats, termUpTo));
+ } else {
+ return null; // no terms at all exist, we won't use similarity
+ }
}
/**
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/lucene/core/src/test/org/apache/lucene/search/similarities/TestClassicSimilarity.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/similarities/TestClassicSimilarity.java b/lucene/core/src/test/org/apache/lucene/search/similarities/TestClassicSimilarity.java
index 4a5a10f..a0fa0f3 100644
--- a/lucene/core/src/test/org/apache/lucene/search/similarities/TestClassicSimilarity.java
+++ b/lucene/core/src/test/org/apache/lucene/search/similarities/TestClassicSimilarity.java
@@ -28,7 +28,6 @@ import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.FieldInvertState;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.MultiReader;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery;
@@ -158,7 +157,7 @@ public class TestClassicSimilarity extends BaseSimilarityTestCase {
public void testSaneNormValues() throws IOException {
ClassicSimilarity sim = new ClassicSimilarity();
- TFIDFSimilarity.IDFStats stats = (IDFStats) sim.computeWeight(1f, new IndexSearcher(new MultiReader()).collectionStatistics("foo"));
+ TFIDFSimilarity.IDFStats stats = (IDFStats) sim.computeWeight(1f, indexSearcher.collectionStatistics("test"));
for (int i = 0; i < 256; i++) {
float boost = stats.normTable[i];
assertFalse("negative boost: " + boost + ", byte=" + i, boost < 0.0f);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarity2.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarity2.java b/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarity2.java
index 09683b2..6fd38bd 100644
--- a/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarity2.java
+++ b/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarity2.java
@@ -262,10 +262,7 @@ public class TestSimilarity2 extends LuceneTestCase {
/** make sure all sims work with spanOR(termX, termY) where termY does not exist */
public void testCrazySpans() throws Exception {
- // The problem: "normal" lucene queries create scorers, returning null if terms dont exist
- // This means they never score a term that does not exist.
- // however with spans, there is only one scorer for the whole hierarchy:
- // inner queries are not real queries, their boosts are ignored, etc.
+ // historically this was a problem, but sim's no longer have to score terms that dont exist
Directory dir = newDirectory();
RandomIndexWriter iw = new RandomIndexWriter(random(), dir);
Document doc = new Document();
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonQuery.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonQuery.java b/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonQuery.java
index 04c8736..67d8027 100644
--- a/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonQuery.java
+++ b/lucene/sandbox/src/java/org/apache/lucene/search/TermAutomatonQuery.java
@@ -347,12 +347,19 @@ public class TermAutomatonQuery extends Query {
for(Map.Entry<Integer,BytesRef> ent : idToTerm.entrySet()) {
Integer termID = ent.getKey();
if (ent.getValue() != null) {
- allTermStats.add(searcher.termStatistics(new Term(field, ent.getValue()), termStates.get(termID)));
+ TermStatistics stats = searcher.termStatistics(new Term(field, ent.getValue()), termStates.get(termID));
+ if (stats != null) {
+ allTermStats.add(stats);
+ }
}
}
- stats = similarity.computeWeight(boost, searcher.collectionStatistics(field),
- allTermStats.toArray(new TermStatistics[allTermStats.size()]));
+ if (allTermStats.isEmpty()) {
+ stats = null; // no terms matched at all, will not use sim
+ } else {
+ stats = similarity.computeWeight(boost, searcher.collectionStatistics(field),
+ allTermStats.toArray(new TermStatistics[allTermStats.size()]));
+ }
}
@Override
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java
----------------------------------------------------------------------
diff --git a/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java b/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java
index 6ef9baf..5a1d506 100644
--- a/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java
+++ b/lucene/sandbox/src/test/org/apache/lucene/search/TestTermAutomatonQuery.java
@@ -965,4 +965,64 @@ public class TestTermAutomatonQuery extends LuceneTestCase {
IOUtils.close(w, r, dir);
}
+
+ // we query with sun|moon but moon doesn't exist
+ public void testOneTermMissing() throws Exception {
+ Directory dir = newDirectory();
+ RandomIndexWriter w = new RandomIndexWriter(random(), dir);
+ Document doc = new Document();
+ doc.add(newTextField("field", "here comes the sun", Field.Store.NO));
+ w.addDocument(doc);
+
+ IndexReader r = w.getReader();
+ IndexSearcher s = newSearcher(r);
+
+ TermAutomatonQuery q = new TermAutomatonQuery("field");
+ int init = q.createState();
+ int s1 = q.createState();
+ q.addTransition(init, s1, "comes");
+ int s2 = q.createState();
+ q.addAnyTransition(s1, s2);
+ int s3 = q.createState();
+ q.setAccept(s3, true);
+ q.addTransition(s2, s3, "sun");
+ q.addTransition(s2, s3, "moon");
+ q.finish();
+
+ assertEquals(1, s.search(q, 1).totalHits);
+
+ w.close();
+ r.close();
+ dir.close();
+ }
+
+ // we query with sun|moon but no terms exist for the field
+ public void testFieldMissing() throws Exception {
+ Directory dir = newDirectory();
+ RandomIndexWriter w = new RandomIndexWriter(random(), dir);
+ Document doc = new Document();
+ doc.add(newTextField("field", "here comes the sun", Field.Store.NO));
+ w.addDocument(doc);
+
+ IndexReader r = w.getReader();
+ IndexSearcher s = newSearcher(r);
+
+ TermAutomatonQuery q = new TermAutomatonQuery("bogusfield");
+ int init = q.createState();
+ int s1 = q.createState();
+ q.addTransition(init, s1, "comes");
+ int s2 = q.createState();
+ q.addAnyTransition(s1, s2);
+ int s3 = q.createState();
+ q.setAccept(s3, true);
+ q.addTransition(s2, s3, "sun");
+ q.addTransition(s2, s3, "moon");
+ q.finish();
+
+ assertEquals(0, s.search(q, 1).totalHits);
+
+ w.close();
+ r.close();
+ dir.close();
+ }
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java b/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java
index 9449a72..a6b44b0 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/ShardSearchingTestBase.java
@@ -136,11 +136,13 @@ public abstract class ShardSearchingTestBase extends LuceneTestCase {
// other nodes:
for(String field : fieldsToShare) {
final CollectionStatistics stats = newSearcher.collectionStatistics(field);
- for (NodeState node : nodes) {
- // Don't put my own collection stats into the cache;
- // we pull locally:
- if (node.myNodeID != nodeID) {
- node.collectionStatsCache.put(new FieldAndShardVersion(nodeID, version, field), stats);
+ if (stats != null) {
+ for (NodeState node : nodes) {
+ // Don't put my own collection stats into the cache;
+ // we pull locally:
+ if (node.myNodeID != nodeID) {
+ node.collectionStatsCache.put(new FieldAndShardVersion(nodeID, version, field), stats);
+ }
}
}
}
@@ -248,8 +250,10 @@ public abstract class ShardSearchingTestBase extends LuceneTestCase {
}
if (missing.size() != 0) {
for(Map.Entry<Term,TermStatistics> ent : getNodeTermStats(missing, nodeID, nodeVersions[nodeID]).entrySet()) {
- final TermAndShardVersion key = new TermAndShardVersion(nodeID, nodeVersions[nodeID], ent.getKey());
- termStatsCache.put(key, ent.getValue());
+ if (ent.getValue() != null) {
+ final TermAndShardVersion key = new TermAndShardVersion(nodeID, nodeVersions[nodeID], ent.getKey());
+ termStatsCache.put(key, ent.getValue());
+ }
}
}
}
@@ -270,9 +274,10 @@ public abstract class ShardSearchingTestBase extends LuceneTestCase {
} else {
final TermAndShardVersion key = new TermAndShardVersion(nodeID, nodeVersions[nodeID], term);
subStats = termStatsCache.get(key);
- // We pre-cached during rewrite so all terms
- // better be here...
- assert subStats != null;
+ }
+
+ if (subStats == null) {
+ continue; // term not found
}
long nodeDocFreq = subStats.docFreq();
@@ -290,7 +295,11 @@ public abstract class ShardSearchingTestBase extends LuceneTestCase {
}
}
- return new TermStatistics(term.bytes(), docFreq, totalTermFreq);
+ if (docFreq == 0) {
+ return null; // term not found in any node whatsoever
+ } else {
+ return new TermStatistics(term.bytes(), docFreq, totalTermFreq);
+ }
}
@Override
@@ -312,11 +321,8 @@ public abstract class ShardSearchingTestBase extends LuceneTestCase {
nodeStats = collectionStatsCache.get(key);
}
if (nodeStats == null) {
- System.out.println("coll stats myNodeID=" + myNodeID + ": " + collectionStatsCache.keySet());
+ continue; // field not in sub at all
}
- // Collection stats are pre-shared on reopen, so,
- // we better not have a cache miss:
- assert nodeStats != null: "myNodeID=" + myNodeID + " nodeID=" + nodeID + " version=" + nodeVersions[nodeID] + " field=" + field;
long nodeDocCount = nodeStats.docCount();
if (docCount >= 0 && nodeDocCount >= 0) {
@@ -343,7 +349,11 @@ public abstract class ShardSearchingTestBase extends LuceneTestCase {
maxDoc += nodeStats.maxDoc();
}
- return new CollectionStatistics(field, maxDoc, docCount, sumTotalTermFreq, sumDocFreq);
+ if (maxDoc == 0) {
+ return null; // field not found across any node whatsoever
+ } else {
+ return new CollectionStatistics(field, maxDoc, docCount, sumTotalTermFreq, sumDocFreq);
+ }
}
@Override
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/solr/core/src/java/org/apache/solr/search/stats/CollectionStats.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/stats/CollectionStats.java b/solr/core/src/java/org/apache/solr/search/stats/CollectionStats.java
index d151a0f..e57f768 100644
--- a/solr/core/src/java/org/apache/solr/search/stats/CollectionStats.java
+++ b/solr/core/src/java/org/apache/solr/search/stats/CollectionStats.java
@@ -74,6 +74,9 @@ public class CollectionStats {
}
public CollectionStatistics toCollectionStatistics() {
+ if (maxDoc == 0 || docCount == 0) {
+ return null;
+ }
return new CollectionStatistics(field, maxDoc, docCount, sumTotalTermFreq, sumDocFreq);
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java b/solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
index b4e76d4..e1f3984 100644
--- a/solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
+++ b/solr/core/src/java/org/apache/solr/search/stats/ExactStatsCache.java
@@ -164,11 +164,14 @@ public class ExactStatsCache extends StatsCache {
TermContext termContext = TermContext.build(context, t);
if (!colMap.containsKey(t.field())) { // collection stats for this field
- colMap.put(t.field(), new CollectionStats(searcher.localCollectionStatistics(t.field())));
+ CollectionStatistics collectionStatistics = searcher.localCollectionStatistics(t.field());
+ if (collectionStatistics != null) {
+ colMap.put(t.field(), new CollectionStats(collectionStatistics));
+ }
}
TermStatistics tst = searcher.localTermStatistics(t, termContext);
- if (tst.docFreq() == 0) { // skip terms that are not present here
+ if (tst == null) { // skip terms that are not present here
continue;
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/e0bde579/solr/core/src/java/org/apache/solr/search/stats/TermStats.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/stats/TermStats.java b/solr/core/src/java/org/apache/solr/search/stats/TermStats.java
index 8f45a9b..62b311e 100644
--- a/solr/core/src/java/org/apache/solr/search/stats/TermStats.java
+++ b/solr/core/src/java/org/apache/solr/search/stats/TermStats.java
@@ -72,6 +72,9 @@ public class TermStats {
}
public TermStatistics toTermStatistics() {
+ if (docFreq == 0) {
+ return null;
+ }
return new TermStatistics(t.bytes(), docFreq, totalTermFreq);
}
[04/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11524: Added
/admin/autoscaling/suggestions to ADMIN_PATHS so that SolrJ can call this API
without a requiring a collection name
Posted by ab...@apache.org.
SOLR-11524: Added /admin/autoscaling/suggestions to ADMIN_PATHS so that SolrJ can call this API without a requiring a collection 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/4674d264
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4674d264
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4674d264
Branch: refs/heads/jira/solr-11285-sim
Commit: 4674d26408697f8e37fc52a6c0feeb63d3fb8f8d
Parents: 0fad80b
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Thu Oct 26 17:35:58 2017 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Thu Oct 26 17:35:58 2017 +0530
----------------------------------------------------------------------
.../src/java/org/apache/solr/common/params/CommonParams.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4674d264/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
index 73b46a3..505a8a6 100644
--- a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
+++ b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java
@@ -186,6 +186,7 @@ public interface CommonParams {
String AUTOSCALING_PATH = "/admin/autoscaling";
String AUTOSCALING_HISTORY_PATH = "/admin/autoscaling/history";
String AUTOSCALING_DIAGNOSTICS_PATH = "/admin/autoscaling/diagnostics";
+ String AUTOSCALING_SUGGESTIONS_PATH = "/admin/autoscaling/suggestions";
String STATUS = "status";
@@ -202,7 +203,8 @@ public interface CommonParams {
METRICS_PATH,
AUTOSCALING_PATH,
AUTOSCALING_HISTORY_PATH,
- AUTOSCALING_DIAGNOSTICS_PATH)));
+ AUTOSCALING_DIAGNOSTICS_PATH,
+ AUTOSCALING_SUGGESTIONS_PATH)));
String APISPEC_LOCATION = "apispec/";
String INTROSPECT = "/_introspect";
[20/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11484:
CloudSolrClient does not invalidate cache or retry for RouteException
Posted by ab...@apache.org.
SOLR-11484: CloudSolrClient does not invalidate cache or retry for RouteException
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/0d29f7a1
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0d29f7a1
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0d29f7a1
Branch: refs/heads/jira/solr-11285-sim
Commit: 0d29f7a1a24c98149485bb96f835fe0d35df8f7f
Parents: 161be0a
Author: Noble Paul <no...@apache.org>
Authored: Fri Oct 27 15:28:24 2017 +1030
Committer: Noble Paul <no...@apache.org>
Committed: Fri Oct 27 15:28:24 2017 +1030
----------------------------------------------------------------------
solr/CHANGES.txt | 3 +
.../solr/client/solrj/impl/CloudSolrClient.java | 10 +++-
.../client/solrj/impl/CloudSolrClientTest.java | 59 ++++++++++++++++++++
3 files changed, 71 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0d29f7a1/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index f2ae5fb..de1d93d 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -75,6 +75,9 @@ Bug Fixes
more than the given term's frequency in overridden FloatDocValues.floatVal().
(Michael Kosten, Erik Hatcher, Steve Rowe)
+* SOLR-11484: CloudSolrClient does not invalidate cache or retry for RouteException (noble, hossman)
+
+
Optimizations
----------------------
* SOLR-11285: Refactor autoscaling framework to avoid direct references to Zookeeper and Solr
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0d29f7a1/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
index f63eedd..772c741 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
@@ -607,6 +607,14 @@ public class CloudSolrClient extends SolrClient {
String name = slice.getName();
List<String> urls = new ArrayList<>();
Replica leader = slice.getLeader();
+ if (directUpdatesToLeadersOnly && leader == null) {
+ for (Replica replica : slice.getReplicas(
+ replica -> replica.isActive(getClusterStateProvider().getLiveNodes())
+ && replica.getType() == Replica.Type.NRT)) {
+ leader = replica;
+ break;
+ }
+ }
if (leader == null) {
if (directUpdatesToLeadersOnly) {
continue;
@@ -908,7 +916,7 @@ public class CloudSolrClient extends SolrClient {
rootCause instanceof NoHttpResponseException ||
rootCause instanceof SocketException);
- if (wasCommError) {
+ if (wasCommError || (exc instanceof RouteException)) {
// it was a communication error. it is likely that
// the node to which the request to be sent is down . So , expire the state
// so that the next attempt would fetch the fresh state
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0d29f7a1/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
index 2a441b9..8779a71 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudSolrClientTest.java
@@ -787,6 +787,65 @@ public class CloudSolrClientTest extends SolrCloudTestCase {
}
}
+ public void testRetryUpdatesWhenClusterStateIsStale() throws Exception {
+ final String COL = "stale_state_test_col";
+ assert cluster.getJettySolrRunners().size() >= 2;
+
+ final JettySolrRunner old_leader_node = cluster.getJettySolrRunners().get(0);
+ final JettySolrRunner new_leader_node = cluster.getJettySolrRunners().get(1);
+
+ // start with exactly 1 shard/replica...
+ assertEquals("Couldn't create collection", 0,
+ CollectionAdminRequest.createCollection(COL, "conf", 1, 1)
+ .setCreateNodeSet(old_leader_node.getNodeName())
+ .process(cluster.getSolrClient()).getStatus());
+ AbstractDistribZkTestBase.waitForRecoveriesToFinish
+ (COL, cluster.getSolrClient().getZkStateReader(), true, true, 330);
+
+ // determine the coreNodeName of only current replica
+ Collection<Slice> slices = cluster.getSolrClient().getZkStateReader().getClusterState().getCollection(COL).getSlices();
+ assertEquals(1, slices.size()); // sanity check
+ Slice slice = slices.iterator().next();
+ assertEquals(1, slice.getReplicas().size()); // sanity check
+ final String old_leader_core_node_name = slice.getLeader().getName();
+
+ // NOTE: creating our own CloudSolrClient whose settings we can muck with...
+ try (CloudSolrClient stale_client = getCloudSolrClient(cluster.getZkServer().getZkAddress())) {
+ // don't let collection cache entries get expired, even on a slow machine...
+ stale_client.setCollectionCacheTTl(Integer.MAX_VALUE);
+ stale_client.setDefaultCollection(COL);
+
+ // do a query to populate stale_client's cache...
+ assertEquals(0, stale_client.query(new SolrQuery("*:*")).getResults().getNumFound());
+
+ // add 1 replica on a diff node...
+ assertEquals("Couldn't create collection", 0,
+ CollectionAdminRequest.addReplicaToShard(COL, "shard1")
+ .setNode(new_leader_node.getNodeName())
+ // NOTE: don't use our stale_client for this -- don't tip it off of a collection change
+ .process(cluster.getSolrClient()).getStatus());
+ AbstractDistribZkTestBase.waitForRecoveriesToFinish
+ (COL, cluster.getSolrClient().getZkStateReader(), true, true, 330);
+
+ // ...and delete our original leader.
+ assertEquals("Couldn't create collection", 0,
+ CollectionAdminRequest.deleteReplica(COL, "shard1", old_leader_core_node_name)
+ // NOTE: don't use our stale_client for this -- don't tip it off of a collection change
+ .process(cluster.getSolrClient()).getStatus());
+ AbstractDistribZkTestBase.waitForRecoveriesToFinish
+ (COL, cluster.getSolrClient().getZkStateReader(), true, true, 330);
+
+ // stale_client's collection state cache should now only point at a leader that no longer exists.
+
+ // attempt a (direct) update that should succeed in spite of cached cluster state
+ // pointing solely to a node that's no longer part of our collection...
+ assertEquals(0, (new UpdateRequest().add("id", "1").commit(stale_client, COL)).getStatus());
+ assertEquals(1, stale_client.query(new SolrQuery("*:*")).getResults().getNumFound());
+
+ }
+ }
+
+
private static void checkSingleServer(NamedList<Object> response) {
final CloudSolrClient.RouteResponse rr = (CloudSolrClient.RouteResponse) response;
final Map<String,LBHttpSolrClient.Req> routes = rr.getRoutes();
[03/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-9735: Enable
randomized testing between v1 and v2 APIs
Posted by ab...@apache.org.
SOLR-9735: Enable randomized testing between v1 and v2 APIs
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/0fad80b4
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/0fad80b4
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/0fad80b4
Branch: refs/heads/jira/solr-11285-sim
Commit: 0fad80b4094fa7e06123839f5f2735065c0bc329
Parents: b5d3d24
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Thu Oct 26 15:19:32 2017 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Thu Oct 26 15:19:32 2017 +0530
----------------------------------------------------------------------
.../org/apache/solr/cloud/autoscaling/AutoScalingHandlerTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0fad80b4/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoScalingHandlerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoScalingHandlerTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoScalingHandlerTest.java
index 7f820d0..ca01220 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoScalingHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoScalingHandlerTest.java
@@ -806,7 +806,7 @@ public class AutoScalingHandlerTest extends SolrCloudTestCase {
}
static SolrRequest createAutoScalingRequest(SolrRequest.METHOD m, String subPath, String message) {
- boolean useV1 = false;
+ boolean useV1 = random().nextBoolean();
String path = useV1 ? "/admin/autoscaling" : "/cluster/autoscaling";
path += subPath != null ? subPath : "";
return useV1
[45/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11380: use the
inNull() method to check for empty UpdateRequest
Posted by ab...@apache.org.
SOLR-11380: use the inNull() method to check for empty UpdateRequest
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/cb3ed762
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/cb3ed762
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/cb3ed762
Branch: refs/heads/jira/solr-11285-sim
Commit: cb3ed762fb418ff2af43b520cbe233cf74bccdd1
Parents: 706b6c9
Author: Noble Paul <no...@apache.org>
Authored: Tue Oct 31 16:33:08 2017 +1030
Committer: Noble Paul <no...@apache.org>
Committed: Tue Oct 31 16:34:00 2017 +1030
----------------------------------------------------------------------
.../solr/client/solrj/impl/BinaryRequestWriter.java | 14 ++------------
.../solr/client/solrj/request/RequestWriter.java | 2 +-
2 files changed, 3 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/cb3ed762/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java
index 1f32e07..ee961ef 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BinaryRequestWriter.java
@@ -40,12 +40,7 @@ public class BinaryRequestWriter extends RequestWriter {
public ContentWriter getContentWriter(SolrRequest req) {
if (req instanceof UpdateRequest) {
UpdateRequest updateRequest = (UpdateRequest) req;
- if (isNull(updateRequest.getDocuments()) &&
- isNull(updateRequest.getDeleteByIdMap()) &&
- isNull(updateRequest.getDeleteQuery())
- && (updateRequest.getDocIterator() == null)) {
- return null;
- }
+ if (isEmpty(updateRequest)) return null;
return new ContentWriter() {
@Override
public void write(OutputStream os) throws IOException {
@@ -66,12 +61,7 @@ public class BinaryRequestWriter extends RequestWriter {
public Collection<ContentStream> getContentStreams(SolrRequest req) throws IOException {
if (req instanceof UpdateRequest) {
UpdateRequest updateRequest = (UpdateRequest) req;
- if (isNull(updateRequest.getDocuments()) &&
- isNull(updateRequest.getDeleteByIdMap()) &&
- isNull(updateRequest.getDeleteQuery())
- && (updateRequest.getDocIterator() == null) ) {
- return null;
- }
+ if (isEmpty(updateRequest) ) return null;
throw new RuntimeException("This Should not happen");
} else {
return super.getContentStreams(req);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/cb3ed762/solr/solrj/src/java/org/apache/solr/client/solrj/request/RequestWriter.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/RequestWriter.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/RequestWriter.java
index 8cefa0b..d83ca91 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/RequestWriter.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/RequestWriter.java
@@ -73,7 +73,7 @@ public class RequestWriter {
return req.getContentStreams();
}
- private boolean isEmpty(UpdateRequest updateRequest) {
+ protected boolean isEmpty(UpdateRequest updateRequest) {
return isNull(updateRequest.getDocuments()) &&
isNull(updateRequest.getDeleteByIdMap()) &&
isNull(updateRequest.getDeleteQuery()) &&
[39/50] [abbrv] lucene-solr:jira/solr-11285-sim: LUCENE-8021: Add
AssertingSimilarity
Posted by ab...@apache.org.
LUCENE-8021: Add AssertingSimilarity
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/489ca238
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/489ca238
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/489ca238
Branch: refs/heads/jira/solr-11285-sim
Commit: 489ca238c4792efe0d893f0f2f297013bd0820bf
Parents: 309481f
Author: Robert Muir <rm...@apache.org>
Authored: Mon Oct 30 18:38:26 2017 -0400
Committer: Robert Muir <rm...@apache.org>
Committed: Mon Oct 30 18:38:26 2017 -0400
----------------------------------------------------------------------
.../similarities/AssertingSimilarity.java | 152 +++++++++++++++++++
.../util/TestRuleSetupAndRestoreClassEnv.java | 3 +-
2 files changed, 154 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/489ca238/lucene/test-framework/src/java/org/apache/lucene/search/similarities/AssertingSimilarity.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/search/similarities/AssertingSimilarity.java b/lucene/test-framework/src/java/org/apache/lucene/search/similarities/AssertingSimilarity.java
new file mode 100644
index 0000000..37747c8
--- /dev/null
+++ b/lucene/test-framework/src/java/org/apache/lucene/search/similarities/AssertingSimilarity.java
@@ -0,0 +1,152 @@
+/*
+ * 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.
+ */
+package org.apache.lucene.search.similarities;
+
+import java.io.IOException;
+
+import org.apache.lucene.index.FieldInvertState;
+import org.apache.lucene.index.LeafReaderContext;
+import org.apache.lucene.search.CollectionStatistics;
+import org.apache.lucene.search.Explanation;
+import org.apache.lucene.search.TermStatistics;
+import org.apache.lucene.util.BytesRef;
+
+/** wraps a similarity with checks for testing */
+public class AssertingSimilarity extends Similarity {
+ private final Similarity delegate;
+
+ public AssertingSimilarity(Similarity delegate) {
+ this.delegate = delegate;
+ }
+
+ @Override
+ public long computeNorm(FieldInvertState state) {
+ assert state != null;
+ assert state.getLength() > 0;
+ assert state.getPosition() >= 0;
+ assert state.getOffset() >= 0;
+ assert state.getMaxTermFrequency() >= 0; // TODO: seems to be 0 for omitTFAP?
+ assert state.getMaxTermFrequency() <= state.getLength();
+ assert state.getNumOverlap() >= 0;
+ assert state.getNumOverlap() < state.getLength();
+ assert state.getUniqueTermCount() > 0;
+ assert state.getUniqueTermCount() <= state.getLength();
+ return delegate.computeNorm(state);
+ }
+
+ @Override
+ public SimWeight computeWeight(float boost, CollectionStatistics collectionStats, TermStatistics... termStats) {
+ assert collectionStats != null;
+ assert termStats.length > 0;
+ for (TermStatistics term : termStats) {
+ assert term != null;
+ }
+ // TODO: check that TermStats is in bounds with respect to collection? e.g. docFreq <= maxDoc
+ SimWeight weight = delegate.computeWeight(boost, collectionStats, termStats);
+ assert weight != null;
+ return new AssertingWeight(weight, boost);
+ }
+
+ static class AssertingWeight extends SimWeight {
+ final SimWeight delegate;
+ final float boost;
+
+ AssertingWeight(SimWeight delegate, float boost) {
+ this.delegate = delegate;
+ this.boost = boost;
+ }
+ }
+
+ @Override
+ public SimScorer simScorer(SimWeight weight, LeafReaderContext context) throws IOException {
+ assert weight != null;
+ assert context != null;
+ AssertingWeight assertingWeight = (AssertingWeight)weight;
+ SimScorer delegateScorer = delegate.simScorer(assertingWeight.delegate, context);
+ assert delegateScorer != null;
+
+ return new SimScorer() {
+ @Override
+ public float score(int doc, float freq) throws IOException {
+ // doc in bounds
+ assert doc >= 0;
+ assert doc < context.reader().maxDoc();
+ // freq in bounds
+ assert Float.isFinite(freq);
+ assert freq > 0;
+ // result in bounds
+ float score = delegateScorer.score(doc, freq);
+ assert Float.isFinite(score);
+ // TODO: some tests have negative boosts today
+ assert score >= 0 || assertingWeight.boost < 0;
+ return score;
+ }
+
+ @Override
+ public float computeSlopFactor(int distance) {
+ // distance in bounds
+ assert distance >= 0;
+ // result in bounds
+ float slopFactor = delegateScorer.computeSlopFactor(distance);
+ assert Float.isFinite(slopFactor);
+ assert slopFactor > 0;
+ assert slopFactor <= 1;
+ return slopFactor;
+ }
+
+ @Override
+ public float computePayloadFactor(int doc, int start, int end, BytesRef payload) {
+ // doc in bounds
+ assert doc >= 0;
+ assert doc < context.reader().maxDoc();
+ // payload in bounds
+ assert start >= 0;
+ assert end >= start;
+ assert payload.isValid();
+ assert end <= payload.length;
+ // result in bounds
+ float payloadFactor = delegateScorer.computePayloadFactor(doc, start, end, payload);
+ assert Float.isFinite(payloadFactor);
+ assert payloadFactor >= 0;
+ return payloadFactor;
+ }
+
+ @Override
+ public Explanation explain(int doc, Explanation freq) throws IOException {
+ // doc in bounds
+ assert doc >= 0;
+ assert doc < context.reader().maxDoc();
+ // freq in bounds
+ assert freq != null;
+ assert Float.isFinite(freq.getValue());
+ // result in bounds
+ Explanation explanation = delegateScorer.explain(doc, freq);
+ assert explanation != null;
+ assert Float.isFinite(explanation.getValue());
+ // result matches score exactly
+ assert explanation.getValue() == delegateScorer.score(doc, freq.getValue());
+ return explanation;
+ }
+ };
+ }
+
+ @Override
+ public String toString() {
+ return "Asserting(" + super.toString() + ")";
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/489ca238/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java
----------------------------------------------------------------------
diff --git a/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java b/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java
index 96b4353..603bd50 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/util/TestRuleSetupAndRestoreClassEnv.java
@@ -36,6 +36,7 @@ import org.apache.lucene.codecs.lucene70.Lucene70Codec;
import org.apache.lucene.codecs.mockrandom.MockRandomPostingsFormat;
import org.apache.lucene.codecs.simpletext.SimpleTextCodec;
import org.apache.lucene.index.RandomCodec;
+import org.apache.lucene.search.similarities.AssertingSimilarity;
import org.apache.lucene.search.similarities.RandomSimilarity;
import org.apache.lucene.search.similarities.Similarity;
import org.apache.lucene.util.LuceneTestCase.SuppressCodecs;
@@ -212,7 +213,7 @@ final class TestRuleSetupAndRestoreClassEnv extends AbstractBeforeAfterRule {
TimeZone randomTimeZone = randomTimeZone(random());
timeZone = testTimeZone.equals("random") ? randomTimeZone : TimeZone.getTimeZone(testTimeZone);
TimeZone.setDefault(timeZone);
- similarity = new RandomSimilarity(random());
+ similarity = new AssertingSimilarity(new RandomSimilarity(random()));
// Check codec restrictions once at class level.
try {
[17/50] [abbrv] lucene-solr:jira/solr-11285-sim: Add 6.6.2 back
compat test indexes.
Posted by ab...@apache.org.
Add 6.6.2 back compat test indexes.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/7d9cf438
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7d9cf438
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7d9cf438
Branch: refs/heads/jira/solr-11285-sim
Commit: 7d9cf438730e9cb7e251d1d2f5c6e81eba456f5c
Parents: 8388b19
Author: Steve Rowe <sa...@gmail.com>
Authored: Thu Oct 26 17:12:26 2017 -0400
Committer: Steve Rowe <sa...@gmail.com>
Committed: Thu Oct 26 17:13:26 2017 -0400
----------------------------------------------------------------------
.../lucene/index/TestBackwardsCompatibility.java | 4 +++-
.../apache/lucene/index/unsupported.6.6.2-cfs.zip | Bin 0 -> 15823 bytes
.../lucene/index/unsupported.6.6.2-nocfs.zip | Bin 0 -> 15820 bytes
3 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7d9cf438/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
----------------------------------------------------------------------
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
index a4d2e8b..0ba6fa3 100644
--- a/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
+++ b/lucene/backward-codecs/src/test/org/apache/lucene/index/TestBackwardsCompatibility.java
@@ -466,7 +466,9 @@ public class TestBackwardsCompatibility extends LuceneTestCase {
"6.6.0-cfs",
"6.6.0-nocfs",
"6.6.1-cfs",
- "6.6.1-nocfs"
+ "6.6.1-nocfs",
+ "6.6.2-cfs",
+ "6.6.2-nocfs"
};
// TODO: on 6.0.0 release, gen the single segment indices and add here:
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7d9cf438/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.2-cfs.zip
----------------------------------------------------------------------
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.2-cfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.2-cfs.zip
new file mode 100644
index 0000000..9510301
Binary files /dev/null and b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.2-cfs.zip differ
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7d9cf438/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.2-nocfs.zip
----------------------------------------------------------------------
diff --git a/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.2-nocfs.zip b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.2-nocfs.zip
new file mode 100644
index 0000000..c06f7c6
Binary files /dev/null and b/lucene/backward-codecs/src/test/org/apache/lucene/index/unsupported.6.6.2-nocfs.zip differ
[13/50] [abbrv] lucene-solr:jira/solr-11285-sim: Ref Guide: copy edit
metrics updates; change param presentation format
Posted by ab...@apache.org.
Ref Guide: copy edit metrics updates; change param presentation format
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f748fc24
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f748fc24
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f748fc24
Branch: refs/heads/jira/solr-11285-sim
Commit: f748fc24b1c5059e3a77c697ddc937d12f608bce
Parents: be4a084
Author: Cassandra Targett <ct...@apache.org>
Authored: Thu Oct 26 14:57:37 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Thu Oct 26 14:58:08 2017 -0500
----------------------------------------------------------------------
solr/solr-ref-guide/src/metrics-reporting.adoc | 121 ++++++++++++++------
1 file changed, 85 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f748fc24/solr/solr-ref-guide/src/metrics-reporting.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/metrics-reporting.adoc b/solr/solr-ref-guide/src/metrics-reporting.adoc
index 451f93e..f7d173c 100644
--- a/solr/solr-ref-guide/src/metrics-reporting.adoc
+++ b/solr/solr-ref-guide/src/metrics-reporting.adoc
@@ -178,17 +178,30 @@ This example configures two reporters: <<Graphite Reporter,Graphite>> and <<SLF4
Reporter plugins use the following arguments:
-* *name* - (required) unique name of the reporter plugin
-* *class* - (required) fully-qualified implementation class of the plugin, must extend `SolrMetricReporter`
-* *group* - (optional) one or more of the predefined groups (see above)
-* *registry* - (optional) one or more of valid fully-qualified registry names
-* If both `group` and `registry` attributes are specified only the `group` attribute is considered. If neither attribute is specified then the plugin will be used for all groups and registries. Multiple group or registry names can be specified, separated by comma and/or space.
+`name`::
+The unique name of the reporter plugin (required).
+
+`class`::
+The fully-qualified implementation class of the plugin, which must extend `SolrMetricReporter` (required).
+
+`group`::
+One or more of the predefined groups (see above).
+
+`registry`::
+One or more of valid fully-qualified registry names.
+
+If both `group` and `registry` attributes are specified only the `group` attribute is considered. If neither attribute is specified then the plugin will be used for all groups and registries. Multiple group or registry names can be specified, separated by comma and/or space.
Additionally, several implementation-specific initialization arguments can be specified in nested elements. There are some arguments that are common to SLF4J, Ganglia and Graphite reporters:
-* *period* - (optional int) period in seconds between reports. Default value is 60.
-* *prefix* - (optional str) prefix to be added to metric names, may be helpful in logical grouping of related Solr instances, e.g., machine name or cluster name. Default is empty string, i.e., just the registry name and metric name will be used to form a fully-qualified metric name.
-* *filter* - (optional str) if not empty then only metric names that start with this value will be reported. Default is no filtering, i.e., all metrics from selected registry will be reported.
+`period`::
+The period in seconds between reports. Default value is `60`.
+
+`prefix`::
+A prefix to be added to metric names, which may be helpful in logical grouping of related Solr instances, e.g., machine name or cluster name. Default is empty string, i.e., just the registry name and metric name will be used to form a fully-qualified metric name.
+
+`filter`::
+If not empty then only metric names that start with this value will be reported. Default is no filtering, i.e., all metrics from the selected registry will be reported.
Reporters are instantiated for every group and registry that they were configured for, at the time when the respective components are initialized (e.g., on JVM startup or SolrCore load).
@@ -204,9 +217,14 @@ The JMX Reporter uses the `org.apache.solr.metrics.reporters.SolrJmxReporter` cl
It takes the following arguments:
-* *domain* - (optional string) JMX domain name. If not specified then the registry name will be used.
-* *serviceUrl* - (optional string) The service URL for a JMX server. If not specified, Solr will attempt to discover if the JVM has an MBean server and will use that address. See below for additional information on this.
-* *agentId* - (optional string) The agent ID for a JMX server. Note either `serviceUrl` or `agentId` can be specified but not both - if both are specified then the default MBean server will be used.
+`domain`::
+The JMX domain name. If not specified then the registry name will be used.
+
+`serviceUrl`::
+The service URL for a JMX server. If not specified, Solr will attempt to discover if the JVM has an MBean server and will use that address. See below for additional information on this.
+
+`agentId`::
+The agent ID for a JMX server. Note either `serviceUrl` or `agentId` can be specified but not both - if both are specified then the default MBean server will be used.
Object names created by this reporter are hierarchical, dot-separated but also properly structured to form corresponding hierarchies in e.g., JConsole. This hierarchy consists of the following elements in the top-down order:
@@ -225,7 +243,8 @@ The SLF4J Reporter uses the `org.apache.solr.metrics.reporters.SolrSlf4jReporter
It takes the following arguments, in addition to the common arguments <<Reporter Arguments,above>>.
-* *logger* - (optional str) name of the logger to use. Default is empty, in which case the group or registry name will be used if specified in the plugin configuration.
+`logger`::
+The name of the logger to use. Default is empty, in which case the group or registry name will be used if specified in the plugin configuration.
Users can specify logger name (and the corresponding logger configuration in e.g., Log4j configuration) to output metrics-related logging to separate file(s), which can then be processed by external applications.
@@ -252,9 +271,13 @@ The http://graphiteapp.org[Graphite] Reporter uses the `org.apache.solr.metrics.
It takes the following attributes, in addition to the common attributes <<Reporter Arguments,above>>.
-* *host* - (required str) host name where Graphite server is running.
-* *port* - (required int) port number for the server
-* *pickled* - (optional bool) use "pickled" Graphite protocol which may be more efficient. Default is false (use plain-text protocol).
+`host`::
+The host name where Graphite server is running (required).
+
+`port`::
+The port number for the server (required).
+`pickled`::
+If `true`, use "pickled" Graphite protocol which may be more efficient. Default is `false` (use plain-text protocol).
When plain-text protocol is used (`pickled==false`) it's possible to use this reporter to integrate with systems other than Graphite, if they can accept space-separated and line-oriented input over network in the following format:
@@ -282,9 +305,14 @@ The http://ganglia.info[Ganglia] reporter uses the `org.apache.solr.metrics.repo
It take the following arguments, in addition to the common arguments <<Reporter Arguments,above>>.
-* *host* - (required str) host name where Ganglia server is running.
-* *port* - (required int) port number for the server
-* *multicast* - (optional bool) when true use multicast UDP communication, otherwise use UDP unicast. Default is false.
+`host`::
+The host name where Ganglia server is running (required).
+
+`port`::
+The port number for the server.
+
+`multicast`::
+When `true` use multicast UDP communication, otherwise use UDP unicast. Default is `false`.
=== Shard and Cluster Reporters
These two reporters can be used for aggregation of metrics reported from replicas to shard leader (the "shard" reporter),
@@ -299,7 +327,7 @@ and re-reported elsewhere as necessary.
In case of shard reporter the target node is the shard leader, in case of cluster reporter the
target node is the Overseer leader.
-=== Shard Reporter
+==== Shard Reporter
This reporter uses predefined `shard` group, and the implementing class must be (a subclass of)
`solr.SolrShardReporter`. It publishes selected metrics from replicas to the node where shard leader is
located. Reports use a target registry name that is the replica's registry name with a `.leader` suffix, e.g., for a
@@ -308,12 +336,18 @@ SolrCore name `collection1_shard1_replica_n3` the target registry name is
The following configuration properties are supported:
-* *handler* - (optional str) handler path where reports are sent. Default is `/admin/metrics/collector`.
-* *period* - (optional int) how often reports are sent, in seconds. Default is 60. Setting this to 0 disables the reporter.
-* *filter* - (optional multiple str) regex expression(s) matching selected metrics to be reported.
+`handler`::
+The handler path where reports are sent. Default is `/admin/metrics/collector`.
+
+`period`::
+How often reports are sent, in seconds. Default is `60`. Setting this to `0` disables the reporter.
+`filter`::
+An optional regular expression(s) matching selected metrics to be reported.
++
The following filter expressions are used by default:
-[source]
++
+[source,text]
----
TLOG.*
CORE\.fs.*
@@ -334,27 +368,39 @@ Example configuration:
</reporter>
----
-=== Cluster Reporter
+==== Cluster Reporter
This reporter uses predefined `cluster` group and the implementing class must be (a subclass of)
`solr.SolrClusterReporter`. It publishes selected metrics from any local registry to the Overseer leader node.
The following configuration properties are supported:
-* *handler* - (optional str) handler path where reports are sent. Default is `/admin/metrics/collector`.
-* *period* - (optional int) how often reports are sent, in seconds. Default is 60. Setting this to 0 disables the reporter.
-* *report* - (optional multiple lst) report configuration(s), see below.
+`handler`::
+The handler path where reports are sent. Default is `/admin/metrics/collector`.
+
+`period`::
+How often reports are sent, in seconds. Default is `60`. Setting this to `0` disables the reporter.
+
+`report`::
+report configuration(s), see below.
+
+Each report configuration consists of the following properties:
-Each report configuration consist of the following properties:
+`registry`::
+A regular expression pattern matching local source registries (see `SolrMetricManager.registryNames(String...)`), may contain regex capture groups (required).
-* *registry* - (required str) regex pattern matching local source registries (see `SolrMetricManager.registryNames(String...)`), may contain regex capture groups.
-* *group* - (required str) target registry name where metrics will be grouped. This can be a regex pattern that contains back-references to capture groups collected by registry pattern
-* *label* - (optional str) optional prefix to prepend to metric names, may contain back-references to capture groups collected by registry pattern
-* *filter* - (optional multiple str) regex expression(s) matching selected metrics to be reported.
+`group`::
+The target registry name where metrics will be grouped. This can be a regular expression pattern that contains back-references to capture groups collected by registry pattern (required).
+
+`label`::
+An optional prefix to prepend to metric names, may contain back-references to capture groups collected by registry pattern.
+
+`filter`::
+An optional regular expression(s) matching selected metrics to be reported.
The following report specifications are used by default (their result is a single additional metric registry in Overseer, called
`solr.cluster`):
-[source]
+[source,xml]
----
<lst name="report">
<str name="group">cluster</str>
@@ -537,12 +583,15 @@ Like other request handlers, the Metrics API can also take the `wt` parameter to
Request only "counter" type metrics in the "core" group, returned in JSON:
-`\http://localhost:8983/solr/admin/metrics?type=counter&group=core`
+[source,text]
+http://localhost:8983/solr/admin/metrics?type=counter&group=core
Request only "core" group metrics that start with "INDEX", returned in XML:
-`\http://localhost:8983/solr/admin/metrics?wt=xml&prefix=INDEX&group=core`
+[source,text]
+http://localhost:8983/solr/admin/metrics?wt=xml&prefix=INDEX&group=core
Request only "user.name" property of "system.properties" metric from registry "solr.jvm":
-`\http://localhost:8983/solr/admin/metrics?wt=xml?key=solr.jvm:system.properties:user.name`
+[source,text]
+http://localhost:8983/solr/admin/metrics?wt=xml?key=solr.jvm:system.properties:user.name
[07/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11411: Add
v2-api.adoc back into hierarchy
Posted by ab...@apache.org.
SOLR-11411: Add v2-api.adoc back into hierarchy
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/706f039f
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/706f039f
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/706f039f
Branch: refs/heads/jira/solr-11285-sim
Commit: 706f039fb2329e1c43d71199471641ac63d17ba4
Parents: ed611a0
Author: Cassandra Targett <ct...@apache.org>
Authored: Thu Oct 26 09:38:06 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Thu Oct 26 09:38:52 2017 -0500
----------------------------------------------------------------------
solr/solr-ref-guide/src/the-well-configured-solr-instance.adoc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/706f039f/solr/solr-ref-guide/src/the-well-configured-solr-instance.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/the-well-configured-solr-instance.adoc b/solr/solr-ref-guide/src/the-well-configured-solr-instance.adoc
index 29f829e..0d5ca12 100644
--- a/solr/solr-ref-guide/src/the-well-configured-solr-instance.adoc
+++ b/solr/solr-ref-guide/src/the-well-configured-solr-instance.adoc
@@ -1,7 +1,7 @@
= The Well-Configured Solr Instance
:page-shortname: the-well-configured-solr-instance
:page-permalink: the-well-configured-solr-instance.html
-:page-children: configuring-solrconfig-xml, solr-cores-and-solr-xml, configuration-apis, implicit-requesthandlers, solr-plugins, jvm-settings
+:page-children: configuring-solrconfig-xml, solr-cores-and-solr-xml, configuration-apis, implicit-requesthandlers, solr-plugins, jvm-settings, v2-api
// 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
@@ -35,6 +35,8 @@ This section covers the following topics:
<<jvm-settings.adoc#jvm-settings,JVM Settings>>: Gives some guidance on best practices for working with Java Virtual Machines.
+<<v2-api.adoc#v2-api,V2 API>>: Describes how to use the new V2 APIs, a redesigned API framework covering most Solr APIs.
+
[IMPORTANT]
====
The focus of this section is generally on configuring a single Solr instance, but for those interested in scaling a Solr implementation in a cluster environment, see also the section <<solrcloud.adoc#solrcloud,SolrCloud>>. There are also options to scale through sharding or replication, described in the section <<legacy-scaling-and-distribution.adoc#legacy-scaling-and-distribution,Legacy Scaling and Distribution>>.
[26/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11170: Remove
unused import
Posted by ab...@apache.org.
SOLR-11170: Remove unused import
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/64f60e5c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/64f60e5c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/64f60e5c
Branch: refs/heads/jira/solr-11285-sim
Commit: 64f60e5cec447ff534a51bd1a9da24c67188508d
Parents: 03084fa
Author: Tomas Fernandez Lobbe <tf...@apache.org>
Authored: Fri Oct 27 10:24:16 2017 -0700
Committer: Tomas Fernandez Lobbe <tf...@apache.org>
Committed: Fri Oct 27 10:24:16 2017 -0700
----------------------------------------------------------------------
.../test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/64f60e5c/solr/core/src/test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java b/solr/core/src/test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java
index aaa47b4..ec421f4 100644
--- a/solr/core/src/test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/AssignBackwardCompatibilityTest.java
@@ -25,7 +25,6 @@ import java.util.Set;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
import org.apache.solr.client.solrj.response.CollectionAdminResponse;
-import org.apache.solr.common.cloud.ClusterStateUtil;
import org.apache.solr.common.cloud.DocCollection;
import org.apache.solr.common.cloud.Replica;
import org.apache.solr.util.NumberUtils;
[48/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11520:
Implement autoscaling suggestions for cores count violations
Posted by ab...@apache.org.
SOLR-11520: Implement autoscaling suggestions for cores count violations
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/487f6762
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/487f6762
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/487f6762
Branch: refs/heads/jira/solr-11285-sim
Commit: 487f67620dbe9d5e88b549157430fa2da2e13ed2
Parents: 0f90120
Author: Noble Paul <no...@apache.org>
Authored: Tue Oct 31 19:41:17 2017 +1030
Committer: Noble Paul <no...@apache.org>
Committed: Tue Oct 31 19:41:17 2017 +1030
----------------------------------------------------------------------
solr/CHANGES.txt | 7 ++-
.../client/solrj/cloud/autoscaling/Clause.java | 5 +-
.../solrj/cloud/autoscaling/PolicyHelper.java | 5 +-
.../solrj/cloud/autoscaling/Suggestion.java | 4 +-
.../solrj/cloud/autoscaling/TestPolicy.java | 48 ++++++++++++++++----
5 files changed, 52 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/487f6762/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index c5df7fd..803cd49 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -53,13 +53,16 @@ New Features
* SOLR-11524: A new autoscaling/suggestions API end-point which gives autoscaling suggestions (noble)
-* SOLR-11519: Implement suggestions for replica count violations (noble)
+* SOLR-11519: Implement autoscaling suggestions for replica count violations (noble)
-* SOLR-11518: Implement Suggestions for freedisk violations (noble)
+* SOLR-11518: Implement autoscaling Suggestions for freedisk violations (noble)
* SOLR-10132: A new optional facet.matches parameter to return facet buckets only
for terms that match a regular expression. (Gus Heck, Christine Poerschke)
+* SOLR-11520: Implement autoscaling suggestions for cores count violations (noble)
+
+
Bug Fixes
----------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/487f6762/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Clause.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Clause.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Clause.java
index 20ff5e2..b62aa56 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Clause.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Clause.java
@@ -259,16 +259,15 @@ public class Clause implements MapWriter, Comparable<Clause> {
replica.delta(counts.getValue()),
counts.getKey());
Suggestion.getTagType(tag.name).addViolatingReplicas(ctx.reset(counts.getKey(), counts.getValue(), violation));
-// Suggestion.getByTag(tag.name).violationFun.accept(ctx.reset(counts.getKey(), counts.getValue(), violation));
}
}
}
}
} else {
for (Row r : allRows) {
- if (!tag.isPass(r)) {
+ if (!globalTag.isPass(r)) {
Suggestion.ConditionType.CORES.addViolatingReplicas(ctx.reset(null, null,
- new Violation(this, null, null, r.node, r.getVal(tag.name), tag.delta(r.getVal(tag.name)), null)));
+ new Violation(this, null, null, r.node, r.getVal(globalTag.name), globalTag.delta(r.getVal(globalTag.name)), null)));
}
}
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/487f6762/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/PolicyHelper.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/PolicyHelper.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/PolicyHelper.java
index 46195a7..60535de 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/PolicyHelper.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/PolicyHelper.java
@@ -146,7 +146,10 @@ public class PolicyHelper {
suggestionCtx.session = policy.createSession(cloudManager);
List<Violation> violations = suggestionCtx.session.getViolations();
for (Violation violation : violations) {
- Suggestion.getTagType(violation.getClause().tag.name).getSuggestions(suggestionCtx.setViolation(violation));
+ Suggestion.getTagType(violation.getClause().isPerCollectiontag() ?
+ violation.getClause().tag.name:
+ violation.getClause().globalTag.name)
+ .getSuggestions(suggestionCtx.setViolation(violation));
suggestionCtx.violation = null;
}
return suggestionCtx.getSuggestions();
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/487f6762/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Suggestion.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Suggestion.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Suggestion.java
index d14643f..ccece7a 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Suggestion.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/Suggestion.java
@@ -186,9 +186,7 @@ public class Suggestion {
if (ctx.violation.replicaCountDelta > 0) {//there are more replicas than necessary
for (int i = 0; i < Math.abs(ctx.violation.replicaCountDelta); i++) {
Suggester suggester = ctx.session.getSuggester(MOVEREPLICA)
- .hint(Suggester.Hint.SRC_NODE, ctx.violation.node)
- .hint(ctx.violation.shard.equals(ANY) ? Suggester.Hint.COLL : Suggester.Hint.COLL_SHARD,
- ctx.violation.shard.equals(ANY) ? ctx.violation.coll : new Pair<>(ctx.violation.coll, ctx.violation.shard));
+ .hint(Suggester.Hint.SRC_NODE, ctx.violation.node);
ctx.addSuggestion(suggester);
}
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/487f6762/solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java b/solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java
index 26de13d..503ba75 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java
@@ -1429,14 +1429,46 @@ public class TestPolicy extends SolrTestCaseJ4 {
assertEquals("r2", Utils.getObjectByPath(m, true, "operation/command/move-replica/replica"));
assertEquals("node1", Utils.getObjectByPath(m, true, "operation/command/move-replica/targetNode"));
-// System.out.println(Utils.toJSONString(l.get(0)));
-// Map m = l.get(0).toMap(new LinkedHashMap<>());
- /*assertEquals(1l,Utils.getObjectByPath(m,true,"violation/violation/delta"));
- assertEquals("POST",Utils.getObjectByPath(m,true,"operation/method"));
- assertEquals("/c/mycoll1",Utils.getObjectByPath(m,true,"operation/path"));
- assertNotNull(Utils.getObjectByPath(m,false,"operation/command/move-replica"));
- assertEquals("10.0.0.6:7574_solr",Utils.getObjectByPath(m,true,"operation/command/move-replica/targetNode"));
- assertEquals("core_node2",Utils.getObjectByPath(m,true,"operation/command/move-replica/replica"));*/
+
+ }
+
+
+ public void testCoresSuggestions() {
+ String dataproviderdata = "{" +
+ " 'liveNodes':[" +
+ " '10.0.0.6:7574_solr'," +
+ " '10.0.0.6:8983_solr']," +
+ " 'replicaInfo':{" +
+ " '10.0.0.6:7574_solr':{}," +
+ " '10.0.0.6:8983_solr':{'mycoll1':{" +
+ " 'shard1':[{'core_node1':{'type':'NRT'}}]," +
+ " 'shard2':[{'core_node2':{'type':'NRT'}}]," +
+ " 'shard3':[{'core_node3':{'type':'NRT'}}]," +
+ " 'shard4':[{'core_node4':{'type':'NRT'}}]}}}," +
+ " 'nodeValues':{" +
+ " '10.0.0.6:7574_solr':{" +
+ " 'node':'10.0.0.6:7574_solr'," +
+ " 'cores':0}," +
+ " '10.0.0.6:8983_solr':{" +
+ " 'node':'10.0.0.6:8983_solr'," +
+ " 'cores':4}}}";
+ String autoScalingjson = " { cluster-policy:[" +
+ " { cores :'<3', node :'#ANY'}]," +
+ " cluster-preferences :[{ minimize : cores }]}";
+ AutoScalingConfig cfg = new AutoScalingConfig((Map<String, Object>) Utils.fromJSONString(autoScalingjson));
+ List<Violation> violations = cfg.getPolicy().createSession(cloudManagerWithData(dataproviderdata)).getViolations();
+ assertFalse(violations.isEmpty());
+ assertEquals(2l, violations.get(0).replicaCountDelta.longValue());
+
+ List<Suggester.SuggestionInfo> l = PolicyHelper.getSuggestions(cfg,
+ cloudManagerWithData(dataproviderdata));
+ assertEquals(2, l.size());
+ for (Suggester.SuggestionInfo suggestionInfo : l) {
+ Map m = suggestionInfo.toMap(new LinkedHashMap<>());
+ assertEquals("10.0.0.6:7574_solr", Utils.getObjectByPath(m, true, "operation/command/move-replica/targetNode"));
+ assertEquals("POST", Utils.getObjectByPath(m, true, "operation/method"));
+ assertEquals("/c/mycoll1", Utils.getObjectByPath(m, true, "operation/path"));
+ }
}
[42/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11576:
CollectionsAPIDistributedZkTest.testCollectionsAPI() get failed when query
node has stale clusterstate
Posted by ab...@apache.org.
SOLR-11576: CollectionsAPIDistributedZkTest.testCollectionsAPI() get failed when query node has stale clusterstate
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f6cbce1c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f6cbce1c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f6cbce1c
Branch: refs/heads/jira/solr-11285-sim
Commit: f6cbce1c6ec45d02653070bd09b4f48800c010b9
Parents: e0bde57
Author: Cao Manh Dat <da...@apache.org>
Authored: Tue Oct 31 09:13:02 2017 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Tue Oct 31 09:13:02 2017 +0700
----------------------------------------------------------------------
.../solr/cloud/CollectionsAPIDistributedZkTest.java | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f6cbce1c/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
index b2f0d44..b385b4f 100644
--- a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java
@@ -457,7 +457,21 @@ public class CollectionsAPIDistributedZkTest extends SolrCloudTestCase {
.add("id", "7")
.add("id", "8")
.commit(cluster.getSolrClient(), collectionName);
- assertEquals(3, cluster.getSolrClient().query(collectionName, new SolrQuery("*:*")).getResults().getNumFound());
+ TimeOut timeOut = new TimeOut(10, TimeUnit.SECONDS);
+ while (!timeOut.hasTimedOut()) {
+ try {
+ long numFound = cluster.getSolrClient().query(collectionName, new SolrQuery("*:*")).getResults().getNumFound();
+ assertEquals(3, numFound);
+ break;
+ } catch (Exception e) {
+ // Query node can have stale clusterstate
+ log.info("Error when query " + collectionName, e);
+ Thread.sleep(500);
+ }
+ }
+ if (timeOut.hasTimedOut()) {
+ fail("Timeout on query " + collectionName);
+ }
checkNoTwoShardsUseTheSameIndexDir();
}
[21/50] [abbrv] lucene-solr:jira/solr-11285-sim: LUCENE-8018:
FieldInfos retains garbage if non-sparse.
Posted by ab...@apache.org.
LUCENE-8018: FieldInfos retains garbage if non-sparse.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/401dda7e
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/401dda7e
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/401dda7e
Branch: refs/heads/jira/solr-11285-sim
Commit: 401dda7e064b6f621cba405985143724d79620c4
Parents: 0d29f7a
Author: Adrien Grand <jp...@gmail.com>
Authored: Fri Oct 27 08:36:27 2017 +0200
Committer: Adrien Grand <jp...@gmail.com>
Committed: Fri Oct 27 08:36:27 2017 +0200
----------------------------------------------------------------------
lucene/CHANGES.txt | 5 +++++
lucene/core/src/java/org/apache/lucene/index/FieldInfos.java | 7 +++++--
2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/401dda7e/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 8d858e4..ea4b8be 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -31,6 +31,11 @@ Bug Fixes
refreshes or commits, and high indexing thread counts, do not
overflow an int (Mykhailo Demianenko via Mike McCandless)
+Optimizations
+
+* LUCENE-8018: Smaller FieldInfos memory footprint by not retaining unnecessary
+ references to TreeMap entries. (Julian Vassev via Adrien Grand)
+
======================= Lucene 7.1.0 =======================
Changes in Runtime Behavior
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/401dda7e/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java
----------------------------------------------------------------------
diff --git a/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java b/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java
index c73c9da..a7dc0b8 100644
--- a/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java
+++ b/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java
@@ -17,6 +17,7 @@
package org.apache.lucene.index;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
@@ -95,14 +96,15 @@ public class FieldInfos implements Iterable<FieldInfo> {
this.hasNorms = hasNorms;
this.hasDocValues = hasDocValues;
this.hasPointValues = hasPointValues;
- this.values = Collections.unmodifiableCollection(byNumber.values());
- Integer max = byNumber.isEmpty() ? null : Collections.max(byNumber.keySet());
+ Integer max = byNumber.isEmpty() ? null : byNumber.lastKey();
// Only usee TreeMap in the very sparse case (< 1/16th of the numbers are used),
// because TreeMap uses ~ 64 (32 bit JVM) or 120 (64 bit JVM w/o compressed oops)
// overall bytes per entry, but array uses 4 (32 bit JMV) or 8
// (64 bit JVM w/o compressed oops):
if (max != null && max < ArrayUtil.MAX_ARRAY_LENGTH && max < 16L*byNumber.size()) {
+ // Pull infos into an arraylist to avoid holding a reference to the TreeMap
+ values = Collections.unmodifiableCollection(new ArrayList<>(byNumber.values()));
byNumberMap = null;
byNumberTable = new FieldInfo[max+1];
for (Map.Entry<Integer,FieldInfo> entry : byNumber.entrySet()) {
@@ -110,6 +112,7 @@ public class FieldInfos implements Iterable<FieldInfo> {
}
} else {
byNumberMap = byNumber;
+ values = Collections.unmodifiableCollection(byNumber.values());
byNumberTable = null;
}
}
[46/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-10397: Fix test
failures
Posted by ab...@apache.org.
SOLR-10397: Fix test failures
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/ce61a59e
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/ce61a59e
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/ce61a59e
Branch: refs/heads/jira/solr-11285-sim
Commit: ce61a59ecda9740ec0bc21af07ba02e45d413cad
Parents: cb3ed76
Author: Cao Manh Dat <da...@apache.org>
Authored: Tue Oct 31 15:06:34 2017 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Tue Oct 31 15:06:34 2017 +0700
----------------------------------------------------------------------
.../solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ce61a59e/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java
index b013601..6d8cc96 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java
@@ -36,6 +36,7 @@ import org.apache.solr.common.params.CollectionParams;
import org.apache.solr.common.params.MapSolrParams;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.params.SolrParams;
+import org.apache.solr.core.CoreContainer;
import org.apache.solr.util.LogLevel;
import org.apache.solr.util.TimeOut;
import org.junit.BeforeClass;
@@ -92,7 +93,6 @@ public class AutoAddReplicasIntegrationTest extends SolrCloudTestCase {
waitForState("Waiting for collection " + COLLECTION1, COLLECTION1, clusterShape(2, 2));
checkSharedFsReplicasMovedCorrectly(replacedHdfsReplicas, zkStateReader, COLLECTION1);
lostJetty.start();
- assertTrue("Timeout waiting for all live and active", ClusterStateUtil.waitForAllActiveAndLiveReplicas(cluster.getSolrClient().getZkStateReader(), 90000));
// check cluster property is considered
disableAutoAddReplicasInCluster();
[29/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11541:
refguide: purge unneccessary page-shortname and page-permalink attributes
from all source docs
Posted by ab...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/using-the-solr-administration-user-interface.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-the-solr-administration-user-interface.adoc b/solr/solr-ref-guide/src/using-the-solr-administration-user-interface.adoc
index 4916100..4de0282 100644
--- a/solr/solr-ref-guide/src/using-the-solr-administration-user-interface.adoc
+++ b/solr/solr-ref-guide/src/using-the-solr-administration-user-interface.adoc
@@ -1,6 +1,4 @@
= Using the Solr Administration User Interface
-:page-shortname: using-the-solr-administration-user-interface
-:page-permalink: using-the-solr-administration-user-interface.html
:page-children: overview-of-the-solr-admin-ui, getting-assistance, logging, cloud-screens, collections-core-admin, java-properties, thread-dump, collection-specific-tools, core-specific-tools
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/using-zookeeper-to-manage-configuration-files.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-zookeeper-to-manage-configuration-files.adoc b/solr/solr-ref-guide/src/using-zookeeper-to-manage-configuration-files.adoc
index 31b49f2..8faf3a4 100644
--- a/solr/solr-ref-guide/src/using-zookeeper-to-manage-configuration-files.adoc
+++ b/solr/solr-ref-guide/src/using-zookeeper-to-manage-configuration-files.adoc
@@ -1,6 +1,4 @@
= Using ZooKeeper to Manage Configuration Files
-:page-shortname: using-zookeeper-to-manage-configuration-files
-:page-permalink: using-zookeeper-to-manage-configuration-files.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/v2-api.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/v2-api.adoc b/solr/solr-ref-guide/src/v2-api.adoc
index 6cc1e4b..c7ecfee 100644
--- a/solr/solr-ref-guide/src/v2-api.adoc
+++ b/solr/solr-ref-guide/src/v2-api.adoc
@@ -1,6 +1,4 @@
= v2 API
-:page-shortname: v2-api
-:page-permalink: v2-api.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/velocity-response-writer.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/velocity-response-writer.adoc b/solr/solr-ref-guide/src/velocity-response-writer.adoc
index fa94816..89bca05 100644
--- a/solr/solr-ref-guide/src/velocity-response-writer.adoc
+++ b/solr/solr-ref-guide/src/velocity-response-writer.adoc
@@ -1,6 +1,4 @@
= Velocity Response Writer
-:page-shortname: velocity-response-writer
-:page-permalink: velocity-response-writer.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/velocity-search-ui.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/velocity-search-ui.adoc b/solr/solr-ref-guide/src/velocity-search-ui.adoc
index cc2fb47..7777254 100644
--- a/solr/solr-ref-guide/src/velocity-search-ui.adoc
+++ b/solr/solr-ref-guide/src/velocity-search-ui.adoc
@@ -1,6 +1,4 @@
= Velocity Search UI
-:page-shortname: velocity-search-ui
-:page-permalink: velocity-search-ui.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/working-with-currencies-and-exchange-rates.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/working-with-currencies-and-exchange-rates.adoc b/solr/solr-ref-guide/src/working-with-currencies-and-exchange-rates.adoc
index 8461040..5b1e23a 100644
--- a/solr/solr-ref-guide/src/working-with-currencies-and-exchange-rates.adoc
+++ b/solr/solr-ref-guide/src/working-with-currencies-and-exchange-rates.adoc
@@ -1,6 +1,4 @@
= Working with Currencies and Exchange Rates
-:page-shortname: working-with-currencies-and-exchange-rates
-:page-permalink: working-with-currencies-and-exchange-rates.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/working-with-dates.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/working-with-dates.adoc b/solr/solr-ref-guide/src/working-with-dates.adoc
index f4e0933..ae3b737 100644
--- a/solr/solr-ref-guide/src/working-with-dates.adoc
+++ b/solr/solr-ref-guide/src/working-with-dates.adoc
@@ -1,6 +1,4 @@
= Working with Dates
-:page-shortname: working-with-dates
-:page-permalink: working-with-dates.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/working-with-enum-fields.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/working-with-enum-fields.adoc b/solr/solr-ref-guide/src/working-with-enum-fields.adoc
index 057d8f0..8df2552 100644
--- a/solr/solr-ref-guide/src/working-with-enum-fields.adoc
+++ b/solr/solr-ref-guide/src/working-with-enum-fields.adoc
@@ -1,6 +1,4 @@
= Working with Enum Fields
-:page-shortname: working-with-enum-fields
-:page-permalink: working-with-enum-fields.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/working-with-external-files-and-processes.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/working-with-external-files-and-processes.adoc b/solr/solr-ref-guide/src/working-with-external-files-and-processes.adoc
index fea056b..9b1771e 100644
--- a/solr/solr-ref-guide/src/working-with-external-files-and-processes.adoc
+++ b/solr/solr-ref-guide/src/working-with-external-files-and-processes.adoc
@@ -1,6 +1,4 @@
= Working with External Files and Processes
-:page-shortname: working-with-external-files-and-processes
-:page-permalink: working-with-external-files-and-processes.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/src/zookeeper-access-control.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/zookeeper-access-control.adoc b/solr/solr-ref-guide/src/zookeeper-access-control.adoc
index 7271802..8766154 100644
--- a/solr/solr-ref-guide/src/zookeeper-access-control.adoc
+++ b/solr/solr-ref-guide/src/zookeeper-access-control.adoc
@@ -1,6 +1,4 @@
= ZooKeeper Access Control
-:page-shortname: zookeeper-access-control
-:page-permalink: zookeeper-access-control.html
// 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
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d030280/solr/solr-ref-guide/tools/BuildNavAndPDFBody.java
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/tools/BuildNavAndPDFBody.java b/solr/solr-ref-guide/tools/BuildNavAndPDFBody.java
index d62f538..815c7a4 100644
--- a/solr/solr-ref-guide/tools/BuildNavAndPDFBody.java
+++ b/solr/solr-ref-guide/tools/BuildNavAndPDFBody.java
@@ -250,18 +250,10 @@ public class BuildNavAndPDFBody {
// TODO: do error checking if attribute metadata we care about is missing
Map<String,Object> attrs = header.getAttributes();
- // TODO: SOLR-11541: we should eliminate these attributes
- // ...but for now at least be sure they are consistent
- if (attrs.containsKey("page-shortname")) {
- String explicit = (String) attrs.get("page-shortname");
- if (! shortname.equals(explicit)) {
- throw new RuntimeException(file + " ("+shortname+") has a mismatched page-shortname: " + explicit);
- }
- }
- if (attrs.containsKey("page-permalink")) {
- String explicit = (String) attrs.get("page-permalink");
- if (! permalink.equals(explicit)) {
- throw new RuntimeException(file + "("+permalink+") has a mismatched permalink: " + explicit);
+ // See SOLR-11541: Fail if a user adds new docs with older missleading attributes we don't use/want
+ for (String attr : Arrays.asList("page-shortname", "page-permalink")) {
+ if (attrs.containsKey(attr)) {
+ throw new RuntimeException(file + ": remove the " + attr + " attribute, it's no longer needed, and may confuse readers/editors");
}
}
[11/50] [abbrv] lucene-solr:jira/solr-11285-sim: Ref Guide: fix
missing anchor reference by removing link to nowhere
Posted by ab...@apache.org.
Ref Guide: fix missing anchor reference by removing link to nowhere
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/95b75303
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/95b75303
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/95b75303
Branch: refs/heads/jira/solr-11285-sim
Commit: 95b75303c7855a9520de7421c6d941d307e1efcd
Parents: 79baebb
Author: Cassandra Targett <ct...@apache.org>
Authored: Thu Oct 26 14:05:01 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Thu Oct 26 14:05:01 2017 -0500
----------------------------------------------------------------------
.../src/solrcloud-autoscaling-auto-add-replicas.adoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/95b75303/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc
index 55b45a1..e0e66f5 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-auto-add-replicas.adoc
@@ -41,7 +41,7 @@ A Trigger named `.autoAddReplicas` is automatically created whenever any collect
Only one trigger is sufficient to serve all collections having this feature enabled. The `.autoAddReplicas` trigger watches for nodes that are lost from the cluster and uses the default `TriggerActions` to create new replicas to replace the ones which were hosted by the lost node. If the old node comes back online, it unloads the moved replicas and the node is free to host other replicas as and when required.
-Since the trigger provides the autoAddReplicas feature for all collections, the `suspend-trigger` and `resume-trigger` Autoscaling API commands can be used to disable and enable this feature for all collections in one API call. See <<solrcloud-autoscaling-auto-add-replicas.adoc#>>
+Since the trigger provides the autoAddReplicas feature for all collections, the `suspend-trigger` and `resume-trigger` Autoscaling API commands can be used to disable and enable this feature for all collections in one API call.
.Suspending autoAddReplicas for all collections
[source,json]
[06/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11320: Lock
autoscaling triggers when changes they requested are being made.
Posted by ab...@apache.org.
SOLR-11320: Lock autoscaling triggers when changes they requested are being made.
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/ed611a08
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/ed611a08
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/ed611a08
Branch: refs/heads/jira/solr-11285-sim
Commit: ed611a085134df9257bc6ac6ba4bef37ff3b514a
Parents: 99f5760
Author: Andrzej Bialecki <ab...@apache.org>
Authored: Thu Oct 26 15:42:48 2017 +0200
Committer: Andrzej Bialecki <ab...@apache.org>
Committed: Thu Oct 26 15:42:48 2017 +0200
----------------------------------------------------------------------
solr/CHANGES.txt | 3 +
.../apache/solr/cloud/ActiveReplicaWatcher.java | 48 +++++++----
.../org/apache/solr/cloud/AddReplicaCmd.java | 8 +-
.../org/apache/solr/cloud/CreateShardCmd.java | 6 +-
.../solr/cloud/LeaderRecoveryWatcher.java | 16 ++--
.../org/apache/solr/cloud/MoveReplicaCmd.java | 10 ++-
.../java/org/apache/solr/cloud/Overseer.java | 8 +-
.../cloud/OverseerCollectionMessageHandler.java | 13 ++-
.../org/apache/solr/cloud/ReplaceNodeCmd.java | 8 +-
.../cloud/autoscaling/ComputePlanAction.java | 13 ++-
.../cloud/autoscaling/ExecutePlanAction.java | 10 ++-
.../cloud/autoscaling/NodeAddedTrigger.java | 2 +-
.../autoscaling/OverseerTriggerThread.java | 9 ++-
.../cloud/autoscaling/ScheduledTriggers.java | 29 ++++++-
.../solr/cloud/autoscaling/TriggerAction.java | 2 +-
.../solr/cloud/autoscaling/TriggerEvent.java | 1 +
.../AutoAddReplicasIntegrationTest.java | 4 +
.../AutoAddReplicasPlanActionTest.java | 2 +-
.../autoscaling/SystemLogListenerTest.java | 1 +
.../autoscaling/TriggerIntegrationTest.java | 84 ++++++++++++++++++--
.../cloud/autoscaling/SolrCloudManager.java | 8 +-
.../autoscaling/TriggerEventProcessorStage.java | 4 +-
.../org/apache/solr/common/SolrCloseable.java | 30 +++++++
.../apache/solr/common/SolrCloseableLatch.java | 65 +++++++++++++++
.../common/cloud/CollectionStateWatcher.java | 5 +-
25 files changed, 313 insertions(+), 76 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 50d466c..1c7f894 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -78,6 +78,9 @@ Optimizations
* SOLR-11443: Remove the usage of workqueue for Overseer. (Cao Manh Dat, Scott Blum)
+* SOLR-11320: Lock autoscaling triggers when changes they requested are being made. This helps to
+ ensure that cluster is in a stable state before processing any new trigger events. (ab)
+
Other Changes
----------------------
* SOLR-11478: Solr should remove itself from live_nodes in zk immediately on shutdown. (Cao Manh Dat)
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/java/org/apache/solr/cloud/ActiveReplicaWatcher.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/ActiveReplicaWatcher.java b/solr/core/src/java/org/apache/solr/cloud/ActiveReplicaWatcher.java
index 3819aec..c6bd807 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ActiveReplicaWatcher.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ActiveReplicaWatcher.java
@@ -20,8 +20,8 @@ import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
-import java.util.concurrent.CountDownLatch;
+import org.apache.solr.common.SolrCloseableLatch;
import org.apache.solr.common.cloud.CollectionStateWatcher;
import org.apache.solr.common.cloud.DocCollection;
import org.apache.solr.common.cloud.Replica;
@@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory;
* Watch for replicas to become {@link org.apache.solr.common.cloud.Replica.State#ACTIVE}. Watcher is
* terminated (its {@link #onStateChanged(Set, DocCollection)} method returns false) when all listed
* replicas become active.
- * <p>Additionally, the provided {@link CountDownLatch} instance can be used to await
+ * <p>Additionally, the provided {@link SolrCloseableLatch} instance can be used to await
* for all listed replicas to become active.</p>
*/
public class ActiveReplicaWatcher implements CollectionStateWatcher {
@@ -44,17 +44,19 @@ public class ActiveReplicaWatcher implements CollectionStateWatcher {
private final List<String> solrCoreNames = new ArrayList<>();
private final List<Replica> activeReplicas = new ArrayList<>();
- private CountDownLatch countDownLatch;
+ private int lastZkVersion = -1;
+
+ private SolrCloseableLatch latch;
/**
* Construct the watcher. At least one replicaId or solrCoreName must be provided.
* @param collection collection name
* @param replicaIds list of replica id-s
* @param solrCoreNames list of SolrCore names
- * @param countDownLatch optional latch to await for all provided replicas to become active. This latch will be
+ * @param latch optional latch to await for all provided replicas to become active. This latch will be
* counted down by at most the number of provided replica id-s / SolrCore names.
*/
- public ActiveReplicaWatcher(String collection, List<String> replicaIds, List<String> solrCoreNames, CountDownLatch countDownLatch) {
+ public ActiveReplicaWatcher(String collection, List<String> replicaIds, List<String> solrCoreNames, SolrCloseableLatch latch) {
if (replicaIds == null && solrCoreNames == null) {
throw new IllegalArgumentException("Either replicaId or solrCoreName must be provided.");
}
@@ -68,7 +70,7 @@ public class ActiveReplicaWatcher implements CollectionStateWatcher {
throw new IllegalArgumentException("At least one replicaId or solrCoreName must be provided");
}
this.collection = collection;
- this.countDownLatch = countDownLatch;
+ this.latch = latch;
}
/**
@@ -101,48 +103,64 @@ public class ActiveReplicaWatcher implements CollectionStateWatcher {
@Override
public String toString() {
- return "ActiveReplicaWatcher{" +
+ return "ActiveReplicaWatcher@" + Long.toHexString(hashCode()) + "{" +
"collection='" + collection + '\'' +
", replicaIds=" + replicaIds +
", solrCoreNames=" + solrCoreNames +
+ ", latch=" + (latch != null ? latch.getCount() : "null") + "," +
", activeReplicas=" + activeReplicas +
'}';
}
+ // synchronized due to SOLR-11535
@Override
- public boolean onStateChanged(Set<String> liveNodes, DocCollection collectionState) {
- log.debug("-- onStateChanged: " + collectionState);
+ public synchronized boolean onStateChanged(Set<String> liveNodes, DocCollection collectionState) {
+ log.debug("-- onStateChanged@" + Long.toHexString(hashCode()) + ": replicaIds=" + replicaIds + ", solrCoreNames=" + solrCoreNames +
+ (latch != null ? "\nlatch count=" + latch.getCount() : "") +
+ "\ncollectionState=" + collectionState);
if (collectionState == null) { // collection has been deleted - don't wait
- if (countDownLatch != null) {
+ log.debug("-- collection deleted, decrementing latch by " + replicaIds.size() + solrCoreNames.size());
+ if (latch != null) {
for (int i = 0; i < replicaIds.size() + solrCoreNames.size(); i++) {
- countDownLatch.countDown();
+ latch.countDown();
}
}
replicaIds.clear();
solrCoreNames.clear();
return true;
}
+ if (replicaIds.isEmpty() && solrCoreNames.isEmpty()) {
+ log.debug("-- already done, exiting...");
+ return true;
+ }
+ if (collectionState.getZNodeVersion() == lastZkVersion) {
+ log.debug("-- spurious call with already seen zkVersion=" + lastZkVersion + ", ignoring...");
+ return false;
+ }
+ lastZkVersion = collectionState.getZNodeVersion();
+
for (Slice slice : collectionState.getSlices()) {
for (Replica replica : slice.getReplicas()) {
if (replicaIds.contains(replica.getName())) {
if (replica.isActive(liveNodes)) {
activeReplicas.add(replica);
replicaIds.remove(replica.getName());
- if (countDownLatch != null) {
- countDownLatch.countDown();
+ if (latch != null) {
+ latch.countDown();
}
}
} else if (solrCoreNames.contains(replica.getStr(ZkStateReader.CORE_NAME_PROP))) {
if (replica.isActive(liveNodes)) {
activeReplicas.add(replica);
solrCoreNames.remove(replica.getStr(ZkStateReader.CORE_NAME_PROP));
- if (countDownLatch != null) {
- countDownLatch.countDown();
+ if (latch != null) {
+ latch.countDown();
}
}
}
}
}
+ log.debug("-- " + Long.toHexString(hashCode()) + " now latch count=" + latch.getCount());
if (replicaIds.isEmpty() && solrCoreNames.isEmpty()) {
return true;
} else {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/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 f533c56..2efc036 100644
--- a/solr/core/src/java/org/apache/solr/cloud/AddReplicaCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/AddReplicaCmd.java
@@ -25,13 +25,13 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
-import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import org.apache.commons.lang.StringUtils;
import org.apache.solr.client.solrj.cloud.autoscaling.Policy;
import org.apache.solr.client.solrj.cloud.autoscaling.PolicyHelper;
+import org.apache.solr.common.SolrCloseableLatch;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.cloud.ClusterState;
import org.apache.solr.common.cloud.DocCollection;
@@ -229,12 +229,12 @@ public class AddReplicaCmd implements OverseerCollectionMessageHandler.Cmd {
if (!parallel || waitForFinalState) {
if (waitForFinalState) {
- CountDownLatch countDownLatch = new CountDownLatch(1);
- ActiveReplicaWatcher watcher = new ActiveReplicaWatcher(collection, null, Collections.singletonList(coreName), countDownLatch);
+ SolrCloseableLatch latch = new SolrCloseableLatch(1, ocmh);
+ ActiveReplicaWatcher watcher = new ActiveReplicaWatcher(collection, null, Collections.singletonList(coreName), latch);
try {
zkStateReader.registerCollectionStateWatcher(collection, watcher);
runnable.run();
- if (!countDownLatch.await(timeout, TimeUnit.SECONDS)) {
+ if (!latch.await(timeout, TimeUnit.SECONDS)) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Timeout waiting " + timeout + " seconds for replica to become active.");
}
} finally {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/java/org/apache/solr/cloud/CreateShardCmd.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/CreateShardCmd.java b/solr/core/src/java/org/apache/solr/cloud/CreateShardCmd.java
index 70f964f..2d1c0bd 100644
--- a/solr/core/src/java/org/apache/solr/cloud/CreateShardCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/CreateShardCmd.java
@@ -24,7 +24,6 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import com.google.common.collect.ImmutableMap;
@@ -32,6 +31,7 @@ import org.apache.solr.client.solrj.cloud.autoscaling.AutoScalingConfig;
import org.apache.solr.client.solrj.cloud.autoscaling.Policy;
import org.apache.solr.client.solrj.cloud.autoscaling.PolicyHelper;
import org.apache.solr.cloud.OverseerCollectionMessageHandler.Cmd;
+import org.apache.solr.common.SolrCloseableLatch;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.cloud.ClusterState;
import org.apache.solr.common.cloud.DocCollection;
@@ -90,7 +90,7 @@ public class CreateShardCmd implements Cmd {
ZkStateReader zkStateReader = ocmh.zkStateReader;
boolean usePolicyFramework = usePolicyFramework(collection,ocmh);
List<ReplicaPosition> positions = null;
- CountDownLatch countDownLatch;
+ SolrCloseableLatch countDownLatch;
try {
if (usePolicyFramework) {
if (collection.getPolicyName() != null) message.getProperties().put(Policy.POLICY, collection.getPolicyName());
@@ -123,7 +123,7 @@ public class CreateShardCmd implements Cmd {
ocmh.waitForNewShard(collectionName, sliceName);
String async = message.getStr(ASYNC);
- countDownLatch = new CountDownLatch(totalReplicas);
+ countDownLatch = new SolrCloseableLatch(totalReplicas, ocmh);
for (ReplicaPosition position : positions) {
String nodeName = position.node;
String coreName = Assign.buildCoreName(ocmh.overseer.getSolrCloudManager().getDistribStateManager(), collection, sliceName, position.type);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/java/org/apache/solr/cloud/LeaderRecoveryWatcher.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/LeaderRecoveryWatcher.java b/solr/core/src/java/org/apache/solr/cloud/LeaderRecoveryWatcher.java
index bf9a3fe..1eb4873 100644
--- a/solr/core/src/java/org/apache/solr/cloud/LeaderRecoveryWatcher.java
+++ b/solr/core/src/java/org/apache/solr/cloud/LeaderRecoveryWatcher.java
@@ -17,8 +17,8 @@
package org.apache.solr.cloud;
import java.util.Set;
-import java.util.concurrent.CountDownLatch;
+import org.apache.solr.common.SolrCloseableLatch;
import org.apache.solr.common.cloud.CollectionStateWatcher;
import org.apache.solr.common.cloud.DocCollection;
import org.apache.solr.common.cloud.Replica;
@@ -33,7 +33,7 @@ public class LeaderRecoveryWatcher implements CollectionStateWatcher {
String shardId;
String replicaId;
String targetCore;
- CountDownLatch countDownLatch;
+ SolrCloseableLatch latch;
/**
* Watch for recovery of a replica
@@ -42,25 +42,25 @@ public class LeaderRecoveryWatcher implements CollectionStateWatcher {
* @param shardId shard id
* @param replicaId source replica name (coreNodeName)
* @param targetCore specific target core name - if null then any active replica will do
- * @param countDownLatch countdown when recovered
+ * @param latch countdown when recovered
*/
- LeaderRecoveryWatcher(String collectionId, String shardId, String replicaId, String targetCore, CountDownLatch countDownLatch) {
+ LeaderRecoveryWatcher(String collectionId, String shardId, String replicaId, String targetCore, SolrCloseableLatch latch) {
this.collectionId = collectionId;
this.shardId = shardId;
this.replicaId = replicaId;
this.targetCore = targetCore;
- this.countDownLatch = countDownLatch;
+ this.latch = latch;
}
@Override
public boolean onStateChanged(Set<String> liveNodes, DocCollection collectionState) {
if (collectionState == null) { // collection has been deleted - don't wait
- countDownLatch.countDown();
+ latch.countDown();
return true;
}
Slice slice = collectionState.getSlice(shardId);
if (slice == null) { // shard has been removed - don't wait
- countDownLatch.countDown();
+ latch.countDown();
return true;
}
for (Replica replica : slice.getReplicas()) {
@@ -77,7 +77,7 @@ public class LeaderRecoveryWatcher implements CollectionStateWatcher {
continue;
}
if (replica.isActive(liveNodes)) { // recovered - stop waiting
- countDownLatch.countDown();
+ latch.countDown();
return true;
}
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/java/org/apache/solr/cloud/MoveReplicaCmd.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/MoveReplicaCmd.java b/solr/core/src/java/org/apache/solr/cloud/MoveReplicaCmd.java
index 18bf968..a2ed407 100644
--- a/solr/core/src/java/org/apache/solr/cloud/MoveReplicaCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/MoveReplicaCmd.java
@@ -22,9 +22,9 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
-import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
+import org.apache.solr.common.SolrCloseableLatch;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.cloud.ClusterState;
import org.apache.solr.common.cloud.DocCollection;
@@ -194,13 +194,15 @@ public class MoveReplicaCmd implements Cmd{
CoreAdminParams.NAME, newCoreName);
if(async!=null) addReplicasProps.getProperties().put(ASYNC, async);
NamedList addResult = new NamedList();
- CountDownLatch countDownLatch = new CountDownLatch(1);
+ SolrCloseableLatch countDownLatch = new SolrCloseableLatch(1, ocmh);
ActiveReplicaWatcher watcher = null;
+ ZkNodeProps props = ocmh.addReplica(clusterState, addReplicasProps, addResult, null);
+ log.info("props " + props);
if (replica.equals(slice.getLeader()) || waitForFinalState) {
- watcher = new ActiveReplicaWatcher(coll.getName(), Collections.singletonList(replica.getName()), null, countDownLatch);
+ watcher = new ActiveReplicaWatcher(coll.getName(), null, Collections.singletonList(newCoreName), countDownLatch);
+ log.info("-- registered watcher " + watcher);
ocmh.zkStateReader.registerCollectionStateWatcher(coll.getName(), watcher);
}
- ocmh.addReplica(clusterState, addReplicasProps, addResult, null);
if (addResult.get("failure") != null) {
String errorString = String.format(Locale.ROOT, "Failed to create replica for collection=%s shard=%s" +
" on node=%s", coll.getName(), slice.getName(), targetNode);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/java/org/apache/solr/cloud/Overseer.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/Overseer.java b/solr/core/src/java/org/apache/solr/cloud/Overseer.java
index b32158d..3b65d6f 100644
--- a/solr/core/src/java/org/apache/solr/cloud/Overseer.java
+++ b/solr/core/src/java/org/apache/solr/cloud/Overseer.java
@@ -38,6 +38,7 @@ import org.apache.solr.cloud.overseer.ReplicaMutator;
import org.apache.solr.cloud.overseer.SliceMutator;
import org.apache.solr.cloud.overseer.ZkStateWriter;
import org.apache.solr.cloud.overseer.ZkWriteCommand;
+import org.apache.solr.common.SolrCloseable;
import org.apache.solr.common.cloud.ClusterState;
import org.apache.solr.common.cloud.SolrZkClient;
import org.apache.solr.common.cloud.ZkNodeProps;
@@ -63,7 +64,7 @@ import static org.apache.solr.common.params.CommonParams.ID;
* Cluster leader. Responsible for processing state updates, node assignments, creating/deleting
* collections, shards, replicas and setting various properties.
*/
-public class Overseer implements Closeable {
+public class Overseer implements SolrCloseable {
public static final String QUEUE_OPERATION = "operation";
// System properties are used in tests to make them run fast
@@ -570,6 +571,11 @@ public class Overseer implements Closeable {
assert ObjectReleaseTracker.release(this);
}
+ @Override
+ public boolean isClosed() {
+ return closed;
+ }
+
private void doClose() {
if (updaterThread != null) {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionMessageHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionMessageHandler.java b/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionMessageHandler.java
index 08d6d10..8812bbb 100644
--- a/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionMessageHandler.java
+++ b/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionMessageHandler.java
@@ -16,7 +16,6 @@
*/
package org.apache.solr.cloud;
-import java.io.Closeable;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.Arrays;
@@ -44,6 +43,7 @@ import org.apache.solr.client.solrj.request.AbstractUpdateRequest;
import org.apache.solr.client.solrj.request.UpdateRequest;
import org.apache.solr.client.solrj.response.UpdateResponse;
import org.apache.solr.cloud.overseer.OverseerAction;
+import org.apache.solr.common.SolrCloseable;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.SolrException.ErrorCode;
import org.apache.solr.common.cloud.ClusterState;
@@ -99,7 +99,7 @@ import static org.apache.solr.common.util.Utils.makeMap;
* A {@link OverseerMessageHandler} that handles Collections API related
* overseer messages.
*/
-public class OverseerCollectionMessageHandler implements OverseerMessageHandler , Closeable {
+public class OverseerCollectionMessageHandler implements OverseerMessageHandler, SolrCloseable {
public static final String NUM_SLICES = "numShards";
@@ -169,6 +169,8 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler
final Map<CollectionAction, Cmd> commandMap;
+ private volatile boolean isClosed;
+
public OverseerCollectionMessageHandler(ZkStateReader zkStateReader, String myId,
final ShardHandlerFactory shardHandlerFactory,
String adminPath,
@@ -181,6 +183,7 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler
this.myId = myId;
this.stats = stats;
this.overseer = overseer;
+ this.isClosed = false;
commandMap = new ImmutableMap.Builder<CollectionAction, Cmd>()
.put(REPLACENODE, new ReplaceNodeCmd(this))
.put(DELETENODE, new DeleteNodeCmd(this))
@@ -978,6 +981,7 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler
@Override
public void close() throws IOException {
+ this.isClosed = true;
if (tpe != null) {
if (!tpe.isShutdown()) {
ExecutorUtil.shutdownAndAwaitTermination(tpe);
@@ -985,6 +989,11 @@ public class OverseerCollectionMessageHandler implements OverseerMessageHandler
}
}
+ @Override
+ public boolean isClosed() {
+ return isClosed;
+ }
+
interface Cmd {
void call(ClusterState state, ZkNodeProps message, NamedList results) throws Exception;
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/java/org/apache/solr/cloud/ReplaceNodeCmd.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/ReplaceNodeCmd.java b/solr/core/src/java/org/apache/solr/cloud/ReplaceNodeCmd.java
index 98d875f..e903091 100644
--- a/solr/core/src/java/org/apache/solr/cloud/ReplaceNodeCmd.java
+++ b/solr/core/src/java/org/apache/solr/cloud/ReplaceNodeCmd.java
@@ -25,10 +25,10 @@ import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
-import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
+import org.apache.solr.common.SolrCloseableLatch;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.cloud.ClusterState;
import org.apache.solr.common.cloud.CollectionStateWatcher;
@@ -94,9 +94,9 @@ public class ReplaceNodeCmd implements OverseerCollectionMessageHandler.Cmd {
List<ZkNodeProps> createdReplicas = new ArrayList<>();
AtomicBoolean anyOneFailed = new AtomicBoolean(false);
- CountDownLatch countDownLatch = new CountDownLatch(sourceReplicas.size());
+ SolrCloseableLatch countDownLatch = new SolrCloseableLatch(sourceReplicas.size(), ocmh);
- CountDownLatch replicasToRecover = new CountDownLatch(numLeaders);
+ SolrCloseableLatch replicasToRecover = new SolrCloseableLatch(numLeaders, ocmh);
for (ZkNodeProps sourceReplica : sourceReplicas) {
NamedList nl = new NamedList();
@@ -169,7 +169,7 @@ public class ReplaceNodeCmd implements OverseerCollectionMessageHandler.Cmd {
}
if (anyOneFailed.get()) {
log.info("Failed to create some replicas. Cleaning up all replicas on target node");
- CountDownLatch cleanupLatch = new CountDownLatch(createdReplicas.size());
+ SolrCloseableLatch cleanupLatch = new SolrCloseableLatch(createdReplicas.size(), ocmh);
for (ZkNodeProps createdReplica : createdReplicas) {
NamedList deleteResult = new NamedList();
try {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/java/org/apache/solr/cloud/autoscaling/ComputePlanAction.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ComputePlanAction.java b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ComputePlanAction.java
index 66093c2..34c0705 100644
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ComputePlanAction.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ComputePlanAction.java
@@ -17,7 +17,6 @@
package org.apache.solr.cloud.autoscaling;
-import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
import java.util.HashSet;
@@ -30,6 +29,7 @@ import org.apache.solr.client.solrj.cloud.autoscaling.AutoScalingConfig;
import org.apache.solr.client.solrj.cloud.autoscaling.NoneSuggester;
import org.apache.solr.client.solrj.cloud.autoscaling.Policy;
import org.apache.solr.client.solrj.cloud.autoscaling.ReplicaInfo;
+import org.apache.solr.common.SolrException;
import org.apache.solr.common.params.AutoScalingParams;
import org.apache.solr.client.solrj.cloud.autoscaling.SolrCloudManager;
import org.apache.solr.client.solrj.cloud.autoscaling.Suggester;
@@ -48,14 +48,13 @@ public class ComputePlanAction extends TriggerActionBase {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@Override
- public void process(TriggerEvent event, ActionContext context) {
+ public void process(TriggerEvent event, ActionContext context) throws Exception {
log.debug("-- processing event: {} with context properties: {}", event, context.getProperties());
SolrCloudManager cloudManager = context.getCloudManager();
try {
AutoScalingConfig autoScalingConf = cloudManager.getDistribStateManager().getAutoScalingConfig();
if (autoScalingConf.isEmpty()) {
- log.error("Action: " + getName() + " executed but no policy is configured");
- return;
+ throw new Exception("Action: " + getName() + " executed but no policy is configured");
}
Policy policy = autoScalingConf.getPolicy();
Policy.Session session = policy.createSession(cloudManager);
@@ -74,11 +73,9 @@ public class ComputePlanAction extends TriggerActionBase {
session = suggester.getSession();
suggester = getSuggester(session, event, cloudManager);
}
- } catch (IOException e) {
- log.error("IOException while processing event: " + event, e);
} catch (Exception e) {
- log.error("Unexpected exception while processing event: " + event, e);
- }
+ throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
+ "Unexpected exception while processing event: " + event, e); }
}
protected Suggester getSuggester(Policy.Session session, TriggerEvent event, SolrCloudManager cloudManager) {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/java/org/apache/solr/cloud/autoscaling/ExecutePlanAction.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ExecutePlanAction.java b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ExecutePlanAction.java
index 8b3b637..ebe0660 100644
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ExecutePlanAction.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ExecutePlanAction.java
@@ -28,6 +28,7 @@ import java.util.concurrent.TimeoutException;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.apache.solr.client.solrj.SolrRequest;
import org.apache.solr.client.solrj.SolrResponse;
+import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.cloud.autoscaling.AlreadyExistsException;
import org.apache.solr.client.solrj.cloud.autoscaling.DistribStateManager;
import org.apache.solr.client.solrj.cloud.autoscaling.SolrCloudManager;
@@ -53,7 +54,7 @@ public class ExecutePlanAction extends TriggerActionBase {
static final int DEFAULT_TASK_TIMEOUT_SECONDS = 120;
@Override
- public void process(TriggerEvent event, ActionContext context) {
+ public void process(TriggerEvent event, ActionContext context) throws Exception {
log.debug("-- processing event: {} with context properties: {}", event, context.getProperties());
SolrCloudManager dataProvider = context.getCloudManager();
List<SolrRequest> operations = (List<SolrRequest>) context.getProperty("operations");
@@ -69,6 +70,8 @@ public class ExecutePlanAction extends TriggerActionBase {
int counter = 0;
if (operation instanceof CollectionAdminRequest.AsyncCollectionAdminRequest) {
CollectionAdminRequest.AsyncCollectionAdminRequest req = (CollectionAdminRequest.AsyncCollectionAdminRequest) operation;
+ // waitForFinalState so that the end effects of operations are visible
+ req.setWaitForFinalState(true);
String asyncId = event.getSource() + '/' + event.getId() + '/' + counter;
String znode = saveAsyncId(dataProvider.getDistribStateManager(), event, asyncId);
log.debug("Saved requestId: {} in znode: {}", asyncId, znode);
@@ -116,7 +119,7 @@ public class ExecutePlanAction extends TriggerActionBase {
}
} catch (Exception e) {
throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
- "Unexpected IOException while processing event: " + event, e);
+ "Unexpected exception while processing event: " + event, e);
}
}
@@ -147,6 +150,9 @@ public class ExecutePlanAction extends TriggerActionBase {
if (rootCause instanceof TimeoutException && rootCause.getMessage().contains("Could not connect to ZooKeeper")) {
throw e;
}
+ if (rootCause instanceof SolrServerException) {
+ throw e;
+ }
log.error("Unexpected Exception while querying status of requestId=" + requestId, e);
}
if (i > 0 && i % 5 == 0) {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/java/org/apache/solr/cloud/autoscaling/NodeAddedTrigger.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/autoscaling/NodeAddedTrigger.java b/solr/core/src/java/org/apache/solr/cloud/autoscaling/NodeAddedTrigger.java
index dc42f11..2ef1b1d 100644
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/NodeAddedTrigger.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/NodeAddedTrigger.java
@@ -163,7 +163,7 @@ public class NodeAddedTrigger extends TriggerBase {
AutoScaling.TriggerEventProcessor processor = processorRef.get();
if (!nodeNames.isEmpty()) {
if (processor != null) {
- log.debug("NodeAddedTrigger {} firing registered processor for nodes: {} added at times {}", name, nodeNames, times);
+ log.debug("NodeAddedTrigger {} firing registered processor for nodes: {} added at times {}, now={}", name, nodeNames, times, timeSource.getTime());
if (processor.process(new NodeAddedEvent(getEventType(), getName(), times, nodeNames))) {
// remove from tracking set only if the fire was accepted
nodeNames.forEach(n -> {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/java/org/apache/solr/cloud/autoscaling/OverseerTriggerThread.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/autoscaling/OverseerTriggerThread.java b/solr/core/src/java/org/apache/solr/cloud/autoscaling/OverseerTriggerThread.java
index dca7e68..3171404 100644
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/OverseerTriggerThread.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/OverseerTriggerThread.java
@@ -17,7 +17,6 @@
package org.apache.solr.cloud.autoscaling;
-import java.io.Closeable;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.net.ConnectException;
@@ -36,6 +35,7 @@ import org.apache.solr.client.solrj.cloud.autoscaling.BadVersionException;
import org.apache.solr.client.solrj.cloud.autoscaling.DistribStateManager;
import org.apache.solr.client.solrj.cloud.autoscaling.SolrCloudManager;
import org.apache.solr.client.solrj.cloud.autoscaling.TriggerEventType;
+import org.apache.solr.common.SolrCloseable;
import org.apache.solr.common.cloud.ZkStateReader;
import org.apache.solr.common.util.IOUtils;
import org.apache.solr.common.util.Utils;
@@ -53,7 +53,7 @@ import static org.apache.solr.common.cloud.ZkStateReader.SOLR_AUTOSCALING_CONF_P
* Overseer thread responsible for reading triggers from zookeeper and
* adding/removing them from {@link ScheduledTriggers}
*/
-public class OverseerTriggerThread implements Runnable, Closeable {
+public class OverseerTriggerThread implements Runnable, SolrCloseable {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -103,6 +103,11 @@ public class OverseerTriggerThread implements Runnable, Closeable {
}
@Override
+ public boolean isClosed() {
+ return isClosed;
+ }
+
+ @Override
public void run() {
int lastZnodeVersion = znodeVersion;
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
index 78c2466..908a961 100644
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/ScheduledTriggers.java
@@ -37,6 +37,7 @@ import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.locks.ReentrantLock;
import java.util.stream.Collectors;
@@ -72,6 +73,7 @@ public class ScheduledTriggers implements Closeable {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
static final int DEFAULT_SCHEDULED_TRIGGER_DELAY_SECONDS = 1;
static final int DEFAULT_MIN_MS_BETWEEN_ACTIONS = 5000;
+ static final int DEFAULT_COOLDOWN_PERIOD_MS = 5000;
private final Map<String, ScheduledTrigger> scheduledTriggers = new ConcurrentHashMap<>();
@@ -91,6 +93,10 @@ public class ScheduledTriggers implements Closeable {
private final AtomicBoolean hasPendingActions = new AtomicBoolean(false);
+ private final AtomicLong cooldownStart = new AtomicLong();
+
+ private final AtomicLong cooldownPeriod = new AtomicLong(TimeUnit.MILLISECONDS.toNanos(DEFAULT_COOLDOWN_PERIOD_MS));
+
private final ActionThrottle actionThrottle;
private final SolrCloudManager dataProvider;
@@ -123,6 +129,9 @@ public class ScheduledTriggers implements Closeable {
this.loader = loader;
queueStats = new Stats();
listeners = new TriggerListeners();
+ // initialize cooldown timer
+ // todo: make the cooldownPeriod configurable
+ cooldownStart.set(System.nanoTime() - cooldownPeriod.get());
}
/**
@@ -197,6 +206,15 @@ public class ScheduledTriggers implements Closeable {
// we do not want to lose this event just because the trigger was closed, perhaps a replacement will need it
return false;
}
+ // reject events during cooldown period
+ if (cooldownStart.get() + cooldownPeriod.get() > System.nanoTime()) {
+ log.debug("-------- Cooldown period - rejecting event: " + event);
+ event.getProperties().put(TriggerEvent.COOLDOWN, true);
+ listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.IGNORED, "In cooldown period.");
+ return false;
+ } else {
+ log.debug("++++++++ Cooldown inactive - processing event: " + event);
+ }
if (hasPendingActions.compareAndSet(false, true)) {
final boolean enqueued;
if (replaying) {
@@ -222,17 +240,16 @@ public class ScheduledTriggers implements Closeable {
ActionContext actionContext = new ActionContext(dataProvider, newTrigger, new HashMap<>());
for (TriggerAction action : actions) {
- List<String> beforeActions = (List<String>)actionContext.getProperties().computeIfAbsent(TriggerEventProcessorStage.BEFORE_ACTION.toString(), k -> new ArrayList<String>());
+ List<String> beforeActions = (List<String>) actionContext.getProperties().computeIfAbsent(TriggerEventProcessorStage.BEFORE_ACTION.toString(), k -> new ArrayList<String>());
beforeActions.add(action.getName());
listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.BEFORE_ACTION, action.getName(), actionContext);
try {
action.process(event, actionContext);
} catch (Exception e) {
listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.FAILED, action.getName(), actionContext, e, null);
- log.error("Error executing action: " + action.getName() + " for trigger event: " + event, e);
- throw e;
+ throw new Exception("Error executing action: " + action.getName() + " for trigger event: " + event, e);
}
- List<String> afterActions = (List<String>)actionContext.getProperties().computeIfAbsent(TriggerEventProcessorStage.AFTER_ACTION.toString(), k -> new ArrayList<String>());
+ List<String> afterActions = (List<String>) actionContext.getProperties().computeIfAbsent(TriggerEventProcessorStage.AFTER_ACTION.toString(), k -> new ArrayList<String>());
afterActions.add(action.getName());
listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.AFTER_ACTION, action.getName(), actionContext);
}
@@ -241,7 +258,10 @@ public class ScheduledTriggers implements Closeable {
assert ev.getId().equals(event.getId());
}
listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.SUCCEEDED);
+ } catch (Exception e) {
+ log.warn("Exception executing actions", e);
} finally {
+ cooldownStart.set(System.nanoTime());
hasPendingActions.set(false);
}
});
@@ -259,6 +279,7 @@ public class ScheduledTriggers implements Closeable {
return true;
} else {
// there is an action in the queue and we don't want to enqueue another until it is complete
+ listeners.fireListeners(event.getSource(), event, TriggerEventProcessorStage.IGNORED, "Already processing another event.");
return false;
}
});
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/java/org/apache/solr/cloud/autoscaling/TriggerAction.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/autoscaling/TriggerAction.java b/solr/core/src/java/org/apache/solr/cloud/autoscaling/TriggerAction.java
index 76cd5f0..df2022e 100644
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/TriggerAction.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/TriggerAction.java
@@ -27,5 +27,5 @@ import org.apache.solr.util.plugin.MapInitializedPlugin;
public interface TriggerAction extends MapInitializedPlugin, Closeable {
String getName();
- void process(TriggerEvent event, ActionContext context);
+ void process(TriggerEvent event, ActionContext context) throws Exception;
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/java/org/apache/solr/cloud/autoscaling/TriggerEvent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/cloud/autoscaling/TriggerEvent.java b/solr/core/src/java/org/apache/solr/cloud/autoscaling/TriggerEvent.java
index 3d436af..38be54a 100644
--- a/solr/core/src/java/org/apache/solr/cloud/autoscaling/TriggerEvent.java
+++ b/solr/core/src/java/org/apache/solr/cloud/autoscaling/TriggerEvent.java
@@ -29,6 +29,7 @@ import org.apache.solr.util.IdUtils;
* Trigger event.
*/
public class TriggerEvent implements MapWriter {
+ public static final String COOLDOWN = "cooldown";
public static final String REPLAYING = "replaying";
public static final String NODE_NAMES = "nodeNames";
public static final String EVENT_TIMES = "eventTimes";
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java
index 7b1a0c3..b013601 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasIntegrationTest.java
@@ -78,6 +78,10 @@ public class AutoAddReplicasIntegrationTest extends SolrCloudTestCase {
.process(cluster.getSolrClient());
ZkStateReader zkStateReader = cluster.getSolrClient().getZkStateReader();
+ // todo remove this workaround after SOLR-9440 is fixed
+ zkStateReader.registerCore("testSimple1");
+ zkStateReader.registerCore("testSimple2");
+ zkStateReader.registerCore("testSimple3");
// start the tests
JettySolrRunner lostJetty = random().nextBoolean() ? cluster.getJettySolrRunner(0) : cluster.getJettySolrRunner(1);
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasPlanActionTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasPlanActionTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasPlanActionTest.java
index 6a7194d..b3147a4 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasPlanActionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoAddReplicasPlanActionTest.java
@@ -149,7 +149,7 @@ public class AutoAddReplicasPlanActionTest extends SolrCloudTestCase{
}
@SuppressForbidden(reason = "Needs currentTimeMillis to create unique id")
- private List<SolrRequest> getOperations(JettySolrRunner actionJetty, String lostNodeName) {
+ private List<SolrRequest> getOperations(JettySolrRunner actionJetty, String lostNodeName) throws Exception {
AutoAddReplicasPlanAction action = new AutoAddReplicasPlanAction();
TriggerEvent lostNode = new NodeLostTrigger.NodeLostEvent(TriggerEventType.NODELOST, ".auto_add_replicas", Collections.singletonList(System.currentTimeMillis()), Collections.singletonList(lostNodeName));
ActionContext context = new ActionContext(actionJetty.getCoreContainer().getZkController().getSolrCloudManager(), null, new HashMap<>());
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/test/org/apache/solr/cloud/autoscaling/SystemLogListenerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/SystemLogListenerTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/SystemLogListenerTest.java
index 9d09191..979dc58 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/SystemLogListenerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/SystemLogListenerTest.java
@@ -145,6 +145,7 @@ public class SystemLogListenerTest extends SolrCloudTestCase {
nonOverseerLeaderIndex = i;
}
}
+ log.info("Stopping node " + cluster.getJettySolrRunner(nonOverseerLeaderIndex).getNodeName());
cluster.stopJettySolrRunner(nonOverseerLeaderIndex);
cluster.waitForAllNodes(30);
assertTrue("Trigger was not fired ", triggerFiredLatch.await(30, TimeUnit.SECONDS));
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerIntegrationTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerIntegrationTest.java
index 0fc2830..ef49879 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerIntegrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/TriggerIntegrationTest.java
@@ -939,6 +939,7 @@ public class TriggerIntegrationTest extends SolrCloudTestCase {
final String actionName;
final TriggerEvent event;
final String message;
+ final long timestamp;
TestEvent(AutoScalingConfig.TriggerListenerConfig config, TriggerEventProcessorStage stage, String actionName, TriggerEvent event, String message) {
this.config = config;
@@ -946,12 +947,14 @@ public class TriggerIntegrationTest extends SolrCloudTestCase {
this.actionName = actionName;
this.event = event;
this.message = message;
+ this.timestamp = timeSource.getTime();
}
@Override
public String toString() {
return "TestEvent{" +
- "config=" + config +
+ "timestamp=" + timestamp +
+ ", config=" + config +
", stage=" + stage +
", actionName='" + actionName + '\'' +
", event=" + event +
@@ -974,11 +977,7 @@ public class TriggerIntegrationTest extends SolrCloudTestCase {
@Override
public synchronized void onEvent(TriggerEvent event, TriggerEventProcessorStage stage, String actionName,
ActionContext context, Throwable error, String message) {
- List<TestEvent> lst = listenerEvents.get(config.name);
- if (lst == null) {
- lst = new ArrayList<>();
- listenerEvents.put(config.name, lst);
- }
+ List<TestEvent> lst = listenerEvents.computeIfAbsent(config.name, s -> new ArrayList<>());
lst.add(new TestEvent(config, stage, actionName, event, message));
}
}
@@ -1137,4 +1136,77 @@ public class TriggerIntegrationTest extends SolrCloudTestCase {
assertEquals(TriggerEventProcessorStage.FAILED, testEvents.get(3).stage);
assertEquals("test1", testEvents.get(3).actionName);
}
+
+ @Test
+ public void testCooldown() throws Exception {
+ CloudSolrClient solrClient = cluster.getSolrClient();
+ failDummyAction = false;
+ waitForSeconds = 1;
+ String setTriggerCommand = "{" +
+ "'set-trigger' : {" +
+ "'name' : 'node_added_cooldown_trigger'," +
+ "'event' : 'nodeAdded'," +
+ "'waitFor' : '" + waitForSeconds + "s'," +
+ "'enabled' : true," +
+ "'actions' : [" +
+ "{'name':'test','class':'" + TestTriggerAction.class.getName() + "'}" +
+ "]" +
+ "}}";
+ SolrRequest req = createAutoScalingRequest(SolrRequest.METHOD.POST, setTriggerCommand);
+ NamedList<Object> response = solrClient.request(req);
+ assertEquals(response.get("result").toString(), "success");
+
+ String setListenerCommand1 = "{" +
+ "'set-listener' : " +
+ "{" +
+ "'name' : 'bar'," +
+ "'trigger' : 'node_added_cooldown_trigger'," +
+ "'stage' : ['FAILED','SUCCEEDED', 'IGNORED']," +
+ "'class' : '" + TestTriggerListener.class.getName() + "'" +
+ "}" +
+ "}";
+ req = createAutoScalingRequest(SolrRequest.METHOD.POST, setListenerCommand1);
+ response = solrClient.request(req);
+ assertEquals(response.get("result").toString(), "success");
+
+ listenerCreated = new CountDownLatch(1);
+ listenerEvents.clear();
+
+ JettySolrRunner newNode = cluster.startJettySolrRunner();
+ boolean await = triggerFiredLatch.await(20, TimeUnit.SECONDS);
+ assertTrue("The trigger did not fire at all", await);
+ assertTrue(triggerFired.get());
+ // wait for listener to capture the SUCCEEDED stage
+ Thread.sleep(1000);
+
+ List<TestEvent> capturedEvents = listenerEvents.get("bar");
+ // we may get a few IGNORED events if other tests caused events within cooldown period
+ assertTrue(capturedEvents.toString(), capturedEvents.size() > 0);
+ long prevTimestamp = capturedEvents.get(capturedEvents.size() - 1).timestamp;
+
+ // reset the trigger and captured events
+ listenerEvents.clear();
+ triggerFiredLatch = new CountDownLatch(1);
+ triggerFired.compareAndSet(true, false);
+
+ JettySolrRunner newNode2 = cluster.startJettySolrRunner();
+ await = triggerFiredLatch.await(20, TimeUnit.SECONDS);
+ assertTrue("The trigger did not fire at all", await);
+ // wait for listener to capture the SUCCEEDED stage
+ Thread.sleep(2000);
+
+ // there must be at least one IGNORED event due to cooldown, and one SUCCEEDED event
+ capturedEvents = listenerEvents.get("bar");
+ assertTrue(capturedEvents.toString(), capturedEvents.size() > 1);
+ for (int i = 0; i < capturedEvents.size() - 1; i++) {
+ TestEvent ev = capturedEvents.get(i);
+ assertEquals(ev.toString(), TriggerEventProcessorStage.IGNORED, ev.stage);
+ assertTrue(ev.toString(), ev.message.contains("cooldown"));
+ }
+ TestEvent ev = capturedEvents.get(capturedEvents.size() - 1);
+ assertEquals(ev.toString(), TriggerEventProcessorStage.SUCCEEDED, ev.stage);
+ // the difference between timestamps of the first SUCCEEDED and the last SUCCEEDED
+ // must be larger than cooldown period
+ assertTrue("timestamp delta is less than default cooldown period", ev.timestamp - prevTimestamp > TimeUnit.MILLISECONDS.toNanos(ScheduledTriggers.DEFAULT_COOLDOWN_PERIOD_MS));
+ }
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/SolrCloudManager.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/SolrCloudManager.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/SolrCloudManager.java
index 5b38e88..726c2c6 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/SolrCloudManager.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/SolrCloudManager.java
@@ -17,7 +17,6 @@
package org.apache.solr.client.solrj.cloud.autoscaling;
-import java.io.Closeable;
import java.io.IOException;
import java.util.Map;
@@ -25,13 +24,14 @@ import org.apache.solr.client.solrj.SolrRequest;
import org.apache.solr.client.solrj.SolrResponse;
import org.apache.solr.client.solrj.cloud.DistributedQueueFactory;
import org.apache.solr.client.solrj.impl.ClusterStateProvider;
+import org.apache.solr.common.SolrCloseable;
/**
* This interface abstracts the access to a SolrCloud cluster, including interactions with Zookeeper, Solr
* and generic HTTP calls.
* <p>This abstraction should be used when possible instead of directly referencing ZK, Solr and HTTP.</p>
*/
-public interface SolrCloudManager extends Closeable {
+public interface SolrCloudManager extends SolrCloseable {
ClusterStateProvider getClusterStateProvider();
@@ -53,8 +53,4 @@ public interface SolrCloudManager extends Closeable {
default void close() {
}
-
- default boolean isClosed() {
- return false;
- }
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/TriggerEventProcessorStage.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/TriggerEventProcessorStage.java b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/TriggerEventProcessorStage.java
index ae9c771..f8648e1 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/TriggerEventProcessorStage.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/cloud/autoscaling/TriggerEventProcessorStage.java
@@ -20,11 +20,11 @@ package org.apache.solr.client.solrj.cloud.autoscaling;
* Enum that represents the stages of trigger event processing.
*/
public enum TriggerEventProcessorStage {
- WAITING,
STARTED,
ABORTED,
SUCCEEDED,
FAILED,
BEFORE_ACTION,
- AFTER_ACTION
+ AFTER_ACTION,
+ IGNORED
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/solrj/src/java/org/apache/solr/common/SolrCloseable.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/SolrCloseable.java b/solr/solrj/src/java/org/apache/solr/common/SolrCloseable.java
new file mode 100644
index 0000000..130e5ab
--- /dev/null
+++ b/solr/solrj/src/java/org/apache/solr/common/SolrCloseable.java
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ */
+
+package org.apache.solr.common;
+
+import java.io.Closeable;
+
+/**
+ * A {@link Closeable} that also allows checking whether it's been closed.
+ */
+public interface SolrCloseable extends Closeable {
+
+ default boolean isClosed() {
+ return false;
+ }
+}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/solrj/src/java/org/apache/solr/common/SolrCloseableLatch.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/SolrCloseableLatch.java b/solr/solrj/src/java/org/apache/solr/common/SolrCloseableLatch.java
new file mode 100644
index 0000000..c2b1762
--- /dev/null
+++ b/solr/solrj/src/java/org/apache/solr/common/SolrCloseableLatch.java
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+
+package org.apache.solr.common;
+
+import java.util.Objects;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * This class mimicks the operation of {@link java.util.concurrent.CountDownLatch}, but it also
+ * periodically checks the state of the provided {@link SolrCloseable} and terminates the wait
+ * if it's closed by throwing an {@link InterruptedException}.
+ */
+public class SolrCloseableLatch {
+
+ private final SolrCloseable closeable;
+ private final CountDownLatch latch;
+
+ public SolrCloseableLatch(int count, SolrCloseable closeable) {
+ Objects.requireNonNull(closeable);
+ this.closeable = closeable;
+ this.latch = new CountDownLatch(count);
+ }
+
+ public void await() throws InterruptedException {
+ await(Long.MAX_VALUE, TimeUnit.SECONDS);
+ }
+
+ public boolean await(long timeout, TimeUnit unit) throws InterruptedException {
+ timeout = unit.toMillis(timeout);
+ while (timeout > 0) {
+ if (latch.await(100, TimeUnit.MILLISECONDS)) {
+ return true;
+ }
+ if (closeable.isClosed()) {
+ throw new InterruptedException(closeable + " has been closed.");
+ }
+ timeout -= 100;
+ }
+ return false;
+ }
+
+ public void countDown() {
+ latch.countDown();
+ }
+
+ public long getCount() {
+ return latch.getCount();
+ }
+}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ed611a08/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStateWatcher.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStateWatcher.java b/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStateWatcher.java
index cd42ad6..d75823c 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStateWatcher.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/CollectionStateWatcher.java
@@ -26,10 +26,11 @@ import java.util.Set;
public interface CollectionStateWatcher {
/**
- * Called when the collection we are registered against has a change of state
+ * Called when the collection we are registered against has a change of state.
*
* Note that, due to the way Zookeeper watchers are implemented, a single call may be
- * the result of several state changes
+ * the result of several state changes. Also, multiple calls to this method can be made
+ * with the same state, ie. without any new updates.
*
* @param liveNodes the set of live nodes
* @param collectionState the new collection state (may be null if the collection has been
[27/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11484: fixing
NPE
Posted by ab...@apache.org.
SOLR-11484: fixing NPE
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/f1a6b68d
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/f1a6b68d
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/f1a6b68d
Branch: refs/heads/jira/solr-11285-sim
Commit: f1a6b68d75e58f464b2ed4ee3702a6c1b14511a0
Parents: 64f60e5
Author: Noble Paul <no...@apache.org>
Authored: Sat Oct 28 11:57:42 2017 +1030
Committer: Noble Paul <no...@apache.org>
Committed: Sat Oct 28 12:04:10 2017 +1030
----------------------------------------------------------------------
.../apache/solr/client/solrj/impl/CloudSolrClient.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f1a6b68d/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
index 772c741..d746fe6 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrClient.java
@@ -922,10 +922,12 @@ public class CloudSolrClient extends SolrClient {
// so that the next attempt would fetch the fresh state
// just re-read state for all of them, if it has not been retried
// in retryExpiryTime time
- for (DocCollection ext : requestedCollections) {
- ExpiringCachedDocCollection cacheEntry = collectionStateCache.get(ext.getName());
- if (cacheEntry == null) continue;
- cacheEntry.maybeStale = true;
+ if (requestedCollections != null) {
+ for (DocCollection ext : requestedCollections) {
+ ExpiringCachedDocCollection cacheEntry = collectionStateCache.get(ext.getName());
+ if (cacheEntry == null) continue;
+ cacheEntry.maybeStale = true;
+ }
}
if (retryCount < MAX_STALE_RETRIES) {//if it is a communication error , we must try again
//may be, we have a stale version of the collection state
[25/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11557:
SolrZkClient.checkInterrupted interrupts current thread
Posted by ab...@apache.org.
SOLR-11557: SolrZkClient.checkInterrupted interrupts current thread
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/03084fa7
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/03084fa7
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/03084fa7
Branch: refs/heads/jira/solr-11285-sim
Commit: 03084fa754a71660a92139bb1d9089770ef7c139
Parents: 252994d
Author: Tomas Fernandez Lobbe <tf...@apache.org>
Authored: Fri Oct 27 09:57:22 2017 -0700
Committer: Tomas Fernandez Lobbe <tf...@apache.org>
Committed: Fri Oct 27 09:57:22 2017 -0700
----------------------------------------------------------------------
solr/CHANGES.txt | 2 ++
.../java/org/apache/solr/common/cloud/SolrZkClient.java | 2 +-
.../org/apache/solr/common/cloud/SolrZkClientTest.java | 11 +++++++++++
3 files changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/03084fa7/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 20bf837..a5e48ac 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -79,6 +79,8 @@ Bug Fixes
* SOLR-11532: Solr hits NPE when fl only contains DV fields and any of them is a spatial field. (Cao Manh Dat, David Smiley)
+* SOLR-11557: Fix SolrZkClient.checkInterrupted (Tomás Fernández Löbbe)
+
Optimizations
----------------------
* SOLR-11285: Refactor autoscaling framework to avoid direct references to Zookeeper and Solr
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/03084fa7/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
index 539c290..d502bf6 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
@@ -697,7 +697,7 @@ public class SolrZkClient implements Closeable {
*/
public static Throwable checkInterrupted(Throwable e) {
if (e instanceof InterruptedException)
- Thread.interrupted();
+ Thread.currentThread().interrupt();
return e;
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/03084fa7/solr/solrj/src/test/org/apache/solr/common/cloud/SolrZkClientTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/common/cloud/SolrZkClientTest.java b/solr/solrj/src/test/org/apache/solr/common/cloud/SolrZkClientTest.java
index ab99cc0..126d35b 100644
--- a/solr/solrj/src/test/org/apache/solr/common/cloud/SolrZkClientTest.java
+++ b/solr/solrj/src/test/org/apache/solr/common/cloud/SolrZkClientTest.java
@@ -139,4 +139,15 @@ public class SolrZkClientTest extends SolrTestCaseJ4 {
return false;
}
}
+
+ @Test
+ public void testCheckInterrupted() {
+ assertFalse(Thread.currentThread().isInterrupted());
+ SolrZkClient.checkInterrupted(new RuntimeException());
+ assertFalse(Thread.currentThread().isInterrupted());
+ SolrZkClient.checkInterrupted(new InterruptedException());
+ assertTrue(Thread.currentThread().isInterrupted());
+ }
+
+
}
[22/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11532: Solr
hits NPE when fl only contains DV fields and any of them is a spatial field
Posted by ab...@apache.org.
SOLR-11532: Solr hits NPE when fl only contains DV fields and any of them is a spatial field
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/7a191281
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7a191281
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7a191281
Branch: refs/heads/jira/solr-11285-sim
Commit: 7a19128109d9b40b28a09a59efa718d63f7a31e9
Parents: 401dda7
Author: Cao Manh Dat <da...@apache.org>
Authored: Fri Oct 27 14:34:18 2017 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Fri Oct 27 14:34:18 2017 +0700
----------------------------------------------------------------------
.../solr/response/RetrieveFieldsOptimizer.java | 6 +-
.../apache/solr/search/SolrDocumentFetcher.java | 279 +++++++++----------
.../solr/collection1/conf/schema-spatial.xml | 3 +
.../apache/solr/search/TestSolr4Spatial2.java | 19 ++
4 files changed, 155 insertions(+), 152 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7a191281/solr/core/src/java/org/apache/solr/response/RetrieveFieldsOptimizer.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/response/RetrieveFieldsOptimizer.java b/solr/core/src/java/org/apache/solr/response/RetrieveFieldsOptimizer.java
index c818650..f143b94 100644
--- a/solr/core/src/java/org/apache/solr/response/RetrieveFieldsOptimizer.java
+++ b/solr/core/src/java/org/apache/solr/response/RetrieveFieldsOptimizer.java
@@ -43,12 +43,12 @@ public class RetrieveFieldsOptimizer {
* otherwise we prefer the stored value when we have a choice.
*/
void optimize(SolrDocumentFetcher docFetcher) {
- optimize(docFetcher.getAllSingleDV());
+ optimize(docFetcher.getDvsCanSubstituteStored());
}
- void optimize(Set<String> singleDVs) {
+ void optimize(Set<String> dvsCanSubstituteStored) {
if (storedFields == null) return;
- if (!singleDVs.containsAll(storedFields)) return;
+ if (!dvsCanSubstituteStored.containsAll(storedFields)) return;
dvFields.addAll(storedFields);
storedFields.clear();
}
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7a191281/solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java b/solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java
index f5a59a4..7c71b64 100644
--- a/solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java
+++ b/solr/core/src/java/org/apache/solr/search/SolrDocumentFetcher.java
@@ -59,10 +59,6 @@ import org.apache.solr.schema.BoolField;
import org.apache.solr.schema.AbstractEnumField;
import org.apache.solr.schema.NumberType;
import org.apache.solr.schema.SchemaField;
-import org.apache.solr.schema.TrieDateField;
-import org.apache.solr.schema.TrieDoubleField;
-import org.apache.solr.schema.TrieFloatField;
-import org.apache.solr.schema.TrieIntField;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -82,7 +78,7 @@ public class SolrDocumentFetcher {
private final Set<String> allStored;
- private final Set<String> allSingleDV;
+ private final Set<String> dvsCanSubstituteStored;
/** Contains the names/patterns of all docValues=true,stored=false fields in the schema. */
private final Set<String> allNonStoredDVs;
@@ -112,7 +108,7 @@ public class SolrDocumentFetcher {
final Set<String> allNonStoredDVs = new HashSet<>();
final Set<String> nonStoredDVsWithoutCopyTargets = new HashSet<>();
final Set<String> storedLargeFields = new HashSet<>();
- final Set<String> allSingleDVs = new HashSet<>();
+ final Set<String> dvsCanSubstituteStored = new HashSet<>();
final Set<String> allStoreds = new HashSet<>();
for (FieldInfo fieldInfo : searcher.getFieldInfos()) { // can find materialized dynamic fields, unlike using the Solr IndexSchema.
@@ -120,8 +116,8 @@ public class SolrDocumentFetcher {
if (schemaField == null) {
continue;
}
- if (schemaField.hasDocValues() && !schemaField.multiValued()) {
- allSingleDVs.add(fieldInfo.name);
+ if (canSubstituteDvForStored(fieldInfo, schemaField)) {
+ dvsCanSubstituteStored.add(fieldInfo.name);
}
if (schemaField.stored()) {
allStoreds.add(fieldInfo.name);
@@ -144,10 +140,22 @@ public class SolrDocumentFetcher {
this.allNonStoredDVs = Collections.unmodifiableSet(allNonStoredDVs);
this.nonStoredDVsWithoutCopyTargets = Collections.unmodifiableSet(nonStoredDVsWithoutCopyTargets);
this.largeFields = Collections.unmodifiableSet(storedLargeFields);
- this.allSingleDV = Collections.unmodifiableSet(allSingleDVs);
+ this.dvsCanSubstituteStored = Collections.unmodifiableSet(dvsCanSubstituteStored);
this.allStored = Collections.unmodifiableSet(allStoreds);
}
+ private boolean canSubstituteDvForStored(FieldInfo fieldInfo, SchemaField schemaField) {
+ if (!schemaField.hasDocValues() || !schemaField.stored()) return false;
+ if (schemaField.multiValued()) return false;
+ DocValuesType docValuesType = fieldInfo.getDocValuesType();
+ NumberType numberType = schemaField.getType().getNumberType();
+ // can not decode a numeric without knowing its numberType
+ if (numberType == null && (docValuesType == DocValuesType.SORTED_NUMERIC || docValuesType == DocValuesType.NUMERIC)) {
+ return false;
+ }
+ return true;
+ }
+
public boolean isLazyFieldLoadingEnabled() {
return enableLazyFieldLoading;
}
@@ -416,7 +424,8 @@ public class SolrDocumentFetcher {
* @param docid
* The lucene docid of the document to be populated
* @param fields
- * The list of docValues fields to be decorated
+ * The fields with docValues to populate the document with.
+ * DocValues fields which do not exist or not decodable will be ignored.
*/
public void decorateDocValueFields(@SuppressWarnings("rawtypes") SolrDocumentBase doc, int docid, Set<String> fields)
throws IOException {
@@ -425,153 +434,125 @@ public class SolrDocumentFetcher {
final int localId = docid - leafContexts.get(subIndex).docBase;
final LeafReader leafReader = leafContexts.get(subIndex).reader();
for (String fieldName : fields) {
- final SchemaField schemaField = searcher.getSchema().getFieldOrNull(fieldName);
- if (schemaField == null || !schemaField.hasDocValues()) {
- log.warn("Couldn't decorate docValues for field: [{}], schemaField: [{}]", fieldName, schemaField);
- continue;
- }
- FieldInfo fi = searcher.getFieldInfos().fieldInfo(fieldName);
- if (fi == null) {
- continue; // Searcher doesn't have info about this field, hence ignore it.
+ Object fieldValue = decodeDVField(localId, leafReader, fieldName);
+ if (fieldValue != null) {
+ doc.setField(fieldName, fieldValue);
}
- doc.remove(fieldName);
- final DocValuesType dvType = fi.getDocValuesType();
- switch (dvType) {
- case NUMERIC:
- final NumericDocValues ndv = leafReader.getNumericDocValues(fieldName);
- if (ndv == null) {
- continue;
- }
- Long val;
- if (ndv.advanceExact(localId)) {
- val = ndv.longValue();
- } else {
- continue;
- }
- Object newVal = val;
- if (schemaField.getType().isPointField()) {
- // TODO: Maybe merge PointField with TrieFields here
- NumberType type = schemaField.getType().getNumberType();
- switch (type) {
- case INTEGER:
- newVal = val.intValue();
- break;
- case LONG:
- newVal = val.longValue();
- break;
- case FLOAT:
- newVal = Float.intBitsToFloat(val.intValue());
- break;
- case DOUBLE:
- newVal = Double.longBitsToDouble(val);
- break;
- case DATE:
- newVal = new Date(val);
- break;
- default:
- throw new AssertionError("Unexpected PointType: " + type);
- }
- } else {
- if (schemaField.getType() instanceof TrieIntField) {
- newVal = val.intValue();
- } else if (schemaField.getType() instanceof TrieFloatField) {
- newVal = Float.intBitsToFloat(val.intValue());
- } else if (schemaField.getType() instanceof TrieDoubleField) {
- newVal = Double.longBitsToDouble(val);
- } else if (schemaField.getType() instanceof TrieDateField) {
- newVal = new Date(val);
- } else if (schemaField.getType() instanceof AbstractEnumField) {
- newVal = ((AbstractEnumField)schemaField.getType()).getEnumMapping().intValueToStringValue(val.intValue());
- }
- }
- doc.addField(fieldName, newVal);
- break;
- case BINARY:
- BinaryDocValues bdv = leafReader.getBinaryDocValues(fieldName);
- if (bdv == null) {
- continue;
- }
- BytesRef value;
- if (bdv.advanceExact(localId)) {
- value = BytesRef.deepCopyOf(bdv.binaryValue());
+ }
+ }
+
+ /**
+ * Decode value from DV field for a document
+ * @return null if DV field is not exist or can not decodable
+ */
+ private Object decodeDVField(int localId, LeafReader leafReader, String fieldName) throws IOException {
+ final SchemaField schemaField = searcher.getSchema().getFieldOrNull(fieldName);
+ FieldInfo fi = searcher.getFieldInfos().fieldInfo(fieldName);
+ if (schemaField == null || !schemaField.hasDocValues() || fi == null) {
+ return null; // Searcher doesn't have info about this field, hence ignore it.
+ }
+
+ final DocValuesType dvType = fi.getDocValuesType();
+ switch (dvType) {
+ case NUMERIC:
+ final NumericDocValues ndv = leafReader.getNumericDocValues(fieldName);
+ if (ndv == null) {
+ return null;
+ }
+ if (!ndv.advanceExact(localId)) {
+ return null;
+ }
+ Long val = ndv.longValue();
+ return decodeNumberFromDV(schemaField, val, false);
+ case BINARY:
+ BinaryDocValues bdv = leafReader.getBinaryDocValues(fieldName);
+ if (bdv != null && bdv.advanceExact(localId)) {
+ return BytesRef.deepCopyOf(bdv.binaryValue());
+ }
+ return null;
+ case SORTED:
+ SortedDocValues sdv = leafReader.getSortedDocValues(fieldName);
+ if (sdv != null && sdv.advanceExact(localId)) {
+ final BytesRef bRef = sdv.binaryValue();
+ // Special handling for Boolean fields since they're stored as 'T' and 'F'.
+ if (schemaField.getType() instanceof BoolField) {
+ return schemaField.getType().toObject(schemaField, bRef);
} else {
- continue;
- }
- doc.addField(fieldName, value);
- break;
- case SORTED:
- SortedDocValues sdv = leafReader.getSortedDocValues(fieldName);
- if (sdv == null) {
- continue;
- }
- if (sdv.advanceExact(localId)) {
- final BytesRef bRef = sdv.binaryValue();
- // Special handling for Boolean fields since they're stored as 'T' and 'F'.
- if (schemaField.getType() instanceof BoolField) {
- doc.addField(fieldName, schemaField.getType().toObject(schemaField, bRef));
- } else {
- doc.addField(fieldName, bRef.utf8ToString());
- }
+ return bRef.utf8ToString();
}
- break;
- case SORTED_NUMERIC:
- final SortedNumericDocValues numericDv = leafReader.getSortedNumericDocValues(fieldName);
- final NumberType type = schemaField.getType().getNumberType();
- if (numericDv != null) {
- if (numericDv.advance(localId) == localId) {
- final List<Object> outValues = new ArrayList<Object>(numericDv.docValueCount());
- for (int i = 0; i < numericDv.docValueCount(); i++) {
- long number = numericDv.nextValue();
- switch (type) {
- case INTEGER:
- final int raw = (int)number;
- if (schemaField.getType() instanceof AbstractEnumField) {
- outValues.add(((AbstractEnumField)schemaField.getType()).getEnumMapping().intValueToStringValue(raw));
- } else {
- outValues.add(raw);
- }
- break;
- case LONG:
- outValues.add(number);
- break;
- case FLOAT:
- outValues.add(NumericUtils.sortableIntToFloat((int)number));
- break;
- case DOUBLE:
- outValues.add(NumericUtils.sortableLongToDouble(number));
- break;
- case DATE:
- outValues.add(new Date(number));
- break;
- default:
- throw new AssertionError("Unexpected PointType: " + type);
- }
- }
- assert outValues.size() > 0;
- doc.addField(fieldName, outValues);
- }
+ }
+ return null;
+ case SORTED_NUMERIC:
+ final SortedNumericDocValues numericDv = leafReader.getSortedNumericDocValues(fieldName);
+ if (numericDv != null && numericDv.advance(localId) == localId) {
+ final List<Object> outValues = new ArrayList<>(numericDv.docValueCount());
+ for (int i = 0; i < numericDv.docValueCount(); i++) {
+ long number = numericDv.nextValue();
+ Object value = decodeNumberFromDV(schemaField, number, true);
+ // return immediately if the number is not decodable, hence won't return an empty list.
+ if (value == null) return null;
+ else outValues.add(value);
}
- case SORTED_SET:
- final SortedSetDocValues values = leafReader.getSortedSetDocValues(fieldName);
- if (values != null && values.getValueCount() > 0) {
- if (values.advance(localId) == localId) {
- final List<Object> outValues = new LinkedList<>();
- for (long ord = values.nextOrd(); ord != SortedSetDocValues.NO_MORE_ORDS; ord = values.nextOrd()) {
- value = values.lookupOrd(ord);
- outValues.add(schemaField.getType().toObject(schemaField, value));
- }
- assert outValues.size() > 0;
- doc.addField(fieldName, outValues);
- }
+ assert outValues.size() > 0;
+ return outValues;
+ }
+ return null;
+ case SORTED_SET:
+ final SortedSetDocValues values = leafReader.getSortedSetDocValues(fieldName);
+ if (values != null && values.getValueCount() > 0 && values.advance(localId) == localId) {
+ final List<Object> outValues = new LinkedList<>();
+ for (long ord = values.nextOrd(); ord != SortedSetDocValues.NO_MORE_ORDS; ord = values.nextOrd()) {
+ BytesRef value = values.lookupOrd(ord);
+ outValues.add(schemaField.getType().toObject(schemaField, value));
}
- case NONE:
- break;
- }
+ assert outValues.size() > 0;
+ return outValues;
+ }
+ return null;
+ default:
+ return null;
+ }
+ }
+
+ private Object decodeNumberFromDV(SchemaField schemaField, long value, boolean sortableNumeric) {
+ if (schemaField.getType().getNumberType() == null) {
+ log.warn("Couldn't decode docValues for field: [{}], schemaField: [{}], numberType is unknown",
+ schemaField.getName(), schemaField);
+ return null;
+ }
+
+ switch (schemaField.getType().getNumberType()) {
+ case INTEGER:
+ final int raw = (int)value;
+ if (schemaField.getType() instanceof AbstractEnumField) {
+ return ((AbstractEnumField)schemaField.getType()).getEnumMapping().intValueToStringValue(raw);
+ } else {
+ return raw;
+ }
+ case LONG:
+ return value;
+ case FLOAT:
+ if (sortableNumeric) {
+ return NumericUtils.sortableIntToFloat((int)value);
+ } else {
+ return Float.intBitsToFloat((int)value);
+ }
+ case DOUBLE:
+ if (sortableNumeric) {
+ return NumericUtils.sortableLongToDouble(value);
+ } else {
+ return Double.longBitsToDouble(value);
+ }
+ case DATE:
+ return new Date(value);
+ default:
+ // catched all possible values, this line will never be reached
+ throw new AssertionError();
}
}
- public Set<String> getAllSingleDV() {
- return allSingleDV;
+ public Set<String> getDvsCanSubstituteStored() {
+ return dvsCanSubstituteStored;
}
public Set<String> getAllStored() {
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7a191281/solr/core/src/test-files/solr/collection1/conf/schema-spatial.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/schema-spatial.xml b/solr/core/src/test-files/solr/collection1/conf/schema-spatial.xml
index 19b2d9c..d973fb0 100644
--- a/solr/core/src/test-files/solr/collection1/conf/schema-spatial.xml
+++ b/solr/core/src/test-files/solr/collection1/conf/schema-spatial.xml
@@ -85,6 +85,9 @@
<field name="llp" type="llp" indexed="true" docValues="true" />
<field name="llp_idx" type="llp" indexed="true" docValues="false" />
<field name="llp_dv" type="llp" indexed="false" docValues="true" />
+ <field name="llp_1_dv_st" type="llp" indexed="false" docValues="true" stored="true" multiValued="false"/>
+ <field name="llp_1_dv" type="llp" indexed="false" docValues="true" stored="false" multiValued="false" useDocValuesAsStored="false"/>
+ <field name="llp_1_dv_dvasst" type="llp" indexed="false" docValues="true" stored="false" multiValued="false" useDocValuesAsStored="true"/>
<dynamicField name="bboxD_*" type="bbox" indexed="true"/>
<dynamicField name="str_*" type="string" indexed="true" stored="true"/>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7a191281/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java
index 5cdb170..dc21173 100644
--- a/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java
+++ b/solr/core/src/test/org/apache/solr/search/TestSolr4Spatial2.java
@@ -117,6 +117,25 @@ public class TestSolr4Spatial2 extends SolrTestCaseJ4 {
"q", "{!cache=false field f=" + fieldName + "}Intersects(" + polygonWKT + ")",
"sort", "id asc"), "/response/numFound==2");
}
+
+ @Test
+ public void testLatLonRetrieval() throws Exception {
+ assertU(adoc("id", "0",
+ "llp_1_dv_st", "-75,41",
+ "llp_1_dv", "-80,20",
+ "llp_1_dv_dvasst", "10,-30"));
+ assertU(commit());
+ assertJQ(req("q","*:*", "fl","*"),
+ "response/docs/[0]/llp_1_dv_st=='-75,41'",
+ // Right now we do not support decoding point value from dv field
+ "!response/docs/[0]/llp_1_dv=='-80,20'",
+ "!response/docs/[0]/llp_1_dv_dvasst=='10,-30'");
+ assertJQ(req("q","*:*", "fl","llp_1_dv_st, llp_1_dv, llp_1_dv_dvasst"),
+ "response/docs/[0]/llp_1_dv_st=='-75,41'",
+ // Even when these fields are specified, we won't return them
+ "!response/docs/[0]/llp_1_dv=='-80,20'",
+ "!response/docs/[0]/llp_1_dv_dvasst=='10,-30'");
+ }
private void testRptWithGeometryField(String fieldName) throws Exception {
assertU(adoc("id", "0", fieldName, "ENVELOPE(-10, 20, 15, 10)"));
[24/50] [abbrv] lucene-solr:jira/solr-11285-sim: Ref Guide:
parameterize versions in using-solrj.adoc and move autoscaling api docs in
hierarchy
Posted by ab...@apache.org.
Ref Guide: parameterize versions in using-solrj.adoc and move autoscaling api docs in hierarchy
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/252994de
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/252994de
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/252994de
Branch: refs/heads/jira/solr-11285-sim
Commit: 252994de3c200038c17b230f1d0598ca3df23f6f
Parents: 8a05e6e
Author: Cassandra Targett <ct...@apache.org>
Authored: Fri Oct 27 10:39:07 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Fri Oct 27 10:39:07 2017 -0500
----------------------------------------------------------------------
.../src/solrcloud-autoscaling.adoc | 4 +--
solr/solr-ref-guide/src/using-solrj.adoc | 26 ++++++++++----------
2 files changed, 15 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/252994de/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc
index 0bebed84..b9a66fd 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling.adoc
@@ -1,7 +1,7 @@
= SolrCloud Autoscaling
:page-shortname: solrcloud-autoscaling
:page-permalink: solrcloud-autoscaling.html
-:page-children: solrcloud-autoscaling-overview, solrcloud-autoscaling-api, solrcloud-autoscaling-policy-preferences, solrcloud-autoscaling-triggers, solrcloud-autoscaling-trigger-actions, solrcloud-autoscaling-listeners, solrcloud-autoscaling-auto-add-replicas, solrcloud-autoscaling-fault-tolerance
+:page-children: solrcloud-autoscaling-overview, solrcloud-autoscaling-policy-preferences, solrcloud-autoscaling-triggers, solrcloud-autoscaling-trigger-actions, solrcloud-autoscaling-listeners, solrcloud-autoscaling-auto-add-replicas, solrcloud-autoscaling-fault-tolerance, solrcloud-autoscaling-api
// 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
@@ -27,10 +27,10 @@ Autoscaling includes an API to manage cluster-wide and collection-specific polic
The following sections describe the autoscaling features of SolrCloud:
* <<solrcloud-autoscaling-overview.adoc#solrcloud-autoscaling-overview,Overview of Autoscaling in SolrCloud>>
-* <<solrcloud-autoscaling-api.adoc#solrcloud-autoscaling-api,Autoscaling API>>
* <<solrcloud-autoscaling-policy-preferences.adoc#solrcloud-autoscaling-policy-preferences,Autoscaling Policy and Preferences>>
* <<solrcloud-autoscaling-triggers.adoc#solrcloud-autoscaling-triggers,Autoscaling Triggers>>
* <<solrcloud-autoscaling-trigger-actions.adoc#solrcloud-autoscaling-trigger-actions,Autoscaling Trigger Actions>>
* <<solrcloud-autoscaling-listeners.adoc#solrcloud-autoscaling-listeners,Autoscaling Listeners>>
* <<solrcloud-autoscaling-auto-add-replicas.adoc#solrcloud-autoscaling-auto-add-replicas,Autoscaling - Automatically Adding Replicas>>
* <<solrcloud-autoscaling-fault-tolerance.adoc#solrcloud-autoscaling-fault-tolerance,Autoscaling Fault Tolerance>>
+* <<solrcloud-autoscaling-api.adoc#solrcloud-autoscaling-api,Autoscaling API>>
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/252994de/solr/solr-ref-guide/src/using-solrj.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-solrj.adoc b/solr/solr-ref-guide/src/using-solrj.adoc
index f3abaab..4a633ac 100644
--- a/solr/solr-ref-guide/src/using-solrj.adoc
+++ b/solr/solr-ref-guide/src/using-solrj.adoc
@@ -30,45 +30,45 @@ Most mainstream build systems greatly simplify dependency management, making it
For projects built with Ant (using http://ant.apache.org/ivy/[Ivy]), place the following in your `ivy.xml`:
-[source,xml]
+[source,xml,subs="verbatim,attributes"]
----
-<dependency org="org.apache.solr" name="solr-solrj" rev="x.y.z"/>
+<dependency org="org.apache.solr" name="solr-solrj" rev="{solr-docs-version}.0"/>
----
For projects built with Maven, place the following in your `pom.xml`:
-[source,xml]
+[source,xml,subs="verbatim,attributes"]
----
<dependency>
<groupId>org.apache.solr</groupId>
<artifactId>solr-solrj</artifactId>
- <version>x.y.z</version>
+ <version>{solr-docs-version}.0</version>
</dependency>
----
For projects built with Gradle, place the following in your `build.gradle`:
-[source,groovy]
+[source,groovy,subs="attributes"]
----
-compile group: 'org.apache.solr', name: 'solr-solrj', version: 'x.y.z'
+compile group: 'org.apache.solr', name: 'solr-solrj', version: '{solr-docs-version}.0'
----
=== Adding SolrJ to the Classpath Manually
If you are not using one of the above build system, it's still easy to add SolrJ to your build.
-At build time, all that is required is the SolrJ jar itself: `solr-solrj-x.y.z.jar`. To compile code manually that uses SolrJ, use a `javac` command similar to:
+At build time, all that is required is the SolrJ jar itself: `solr-solrj-{solr-docs-version}.0.jar`. To compile code manually that uses SolrJ, use a `javac` command similar to:
-[source,bash]
+[source,bash,subs="attributes"]
----
-javac -cp .:$SOLR_HOME/dist/solr-solrj-x.y.z.jar ...
+javac -cp .:$SOLR_HOME/dist/solr-solrj-{solr-docs-version}.0.jar ...
----
At runtime, you need a few of SolrJ's dependencies, in addition to SolrJ itself. For convenience, these dependencies are made available in the `dist/solrj-lib` directory. Run your project with a classpath like:
-[source,bash]
+[source,bash,subs="attributes"]
----
-java -cp .:$SOLR_HOME/dist/solrj-lib/*:$SOLR_HOME/dist/solr-solrj-x.y.z.jar ...
+java -cp .:$SOLR_HOME/dist/solrj-lib/*:$SOLR_HOME/dist/solr-solrj-{solr-docs-version}.0.jar ...
----
If you are worried about the SolrJ libraries expanding the size of your client application, you can use a code obfuscator like http://proguard.sourceforge.net/[ProGuard] to remove APIs that you are not using.
@@ -97,8 +97,8 @@ Most SolrJ configuration happens at the `SolrClient` level. The most common/imp
==== Base URLs
Most `SolrClient` implementations (with the notable exception of `CloudSolrClient`) require users to specify one or more Solr base URLs, which the client then uses to send HTTP requests to Solr. The path users include on the base URL they provide has an effect on the behavior of the created client from that point on.
-. A URL with a path pointing to a specific core or collection (e.g. `http://hostname:8983/solr/core1`). When a core or collection is specified in the base URL, subsequent requests made with that client are not required to re-specify the affected collection. However, the client is limited to sending requests to that core/collection, and can not send requests to any others.
-. A URL pointing to the root Solr path (e.g. `http://hostname:8983/solr`). When no core or collection is specified in the base URL, requests can be made to any core/collection, but the affected core/collection must be specified on all requests.
+. A URL with a path pointing to a specific core or collection (e.g., `http://hostname:8983/solr/core1`). When a core or collection is specified in the base URL, subsequent requests made with that client are not required to re-specify the affected collection. However, the client is limited to sending requests to that core/collection, and can not send requests to any others.
+. A URL pointing to the root Solr path (e.g., `http://hostname:8983/solr`). When no core or collection is specified in the base URL, requests can be made to any core/collection, but the affected core/collection must be specified on all requests.
Generally speaking, if your `SolrClient` will only be used on a single core/collection, including that entity in the path is the most convenient. Where more flexibility is required, the collection/core should be excluded.
[15/50] [abbrv] lucene-solr:jira/solr-11285-sim: SOLR-11032: Update
SolrJ tutorial with new example test for real tested code samples
Posted by ab...@apache.org.
SOLR-11032: Update SolrJ tutorial with new example test for real tested code samples
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/7ece47ca
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/7ece47ca
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/7ece47ca
Branch: refs/heads/jira/solr-11285-sim
Commit: 7ece47caf1afc5c6b2589280ec4a6e4a21530210
Parents: f748fc2
Author: Cassandra Targett <ct...@apache.org>
Authored: Thu Oct 26 15:25:05 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Thu Oct 26 15:25:05 2017 -0500
----------------------------------------------------------------------
solr/solr-ref-guide/build.xml | 5 +
.../src/meta-docs/asciidoc-syntax.adoc | 8 +
solr/solr-ref-guide/src/using-solrj.adoc | 179 +++++++-------
.../UsingSolrJRefGuideExamplesTest.java | 235 +++++++++++++++++++
4 files changed, 347 insertions(+), 80 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7ece47ca/solr/solr-ref-guide/build.xml
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/build.xml b/solr/solr-ref-guide/build.xml
index 6a610b1..1ce3778 100644
--- a/solr/solr-ref-guide/build.xml
+++ b/solr/solr-ref-guide/build.xml
@@ -130,6 +130,11 @@
<target name="build-init" description="Prepares the build's 'content' dir, copying over src files and transforming *.template files in the process">
<delete dir="${build.content.dir}" />
<mkdir dir="${build.content.dir}" />
+
+ <echo>Copying all examples to build directory...</echo>
+ <copy todir="${build.content.dir}">
+ <fileset dir="../solrj/src/test/org/apache/solr/client/ref_guide_examples" />
+ </copy>
<echo>Copying all non template files from src ...</echo>
<copy todir="${build.content.dir}">
<fileset dir="src">
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7ece47ca/solr/solr-ref-guide/src/meta-docs/asciidoc-syntax.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/meta-docs/asciidoc-syntax.adoc b/solr/solr-ref-guide/src/meta-docs/asciidoc-syntax.adoc
index dd9180e..0161225 100644
--- a/solr/solr-ref-guide/src/meta-docs/asciidoc-syntax.adoc
+++ b/solr/solr-ref-guide/src/meta-docs/asciidoc-syntax.adoc
@@ -72,6 +72,14 @@ Pygments has a long selection of lexers available. You can see the full list at
Ideally, we will have an appropriate lexer to use for all source blocks, but that's not possible. When in doubt, choose `text`, or leave it blank.
+==== Importing Code Snippets from Other Files
+
+The build system has the ability to "include" code snippets located in other files.
+
+Snippets are bounded by "tag" comments placed at the start and end of the section you would like to import. Opening tags look like: `// tag::snippetName[]`. Closing tags follow the format: `// end::snippetName[]`. Snippets can be dropped into an adoc file using an `include` directive, following a format: `include::PathToFileWithSnippet[tag=snippetName]`. Note that when relative paths are provided in this directive, that paths are relative to location of the asciidoc file the include appears in.
+
+For more information on the `include` directive, see the documentation http://asciidoctor.org/docs/user-manual/#include-partial[here].
+
=== Block Titles
Titles can be added to most blocks (images, source blocks, tables, etc.) by simply prefacing the title with a period (`.`). For example, to add a title to the source block example above:
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7ece47ca/solr/solr-ref-guide/src/using-solrj.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/using-solrj.adoc b/solr/solr-ref-guide/src/using-solrj.adoc
index efdb7cd..5eea5b7 100644
--- a/solr/solr-ref-guide/src/using-solrj.adoc
+++ b/solr/solr-ref-guide/src/using-solrj.adoc
@@ -18,148 +18,167 @@
// specific language governing permissions and limitations
// under the License.
-{solr-javadocs}/solr-solrj/[SolrJ] is an API that makes it easy for Java applications to talk to Solr. SolrJ hides a lot of the details of connecting to Solr and allows your application to interact with Solr with simple high-level methods.
+{solr-javadocs}/solr-solrj/[SolrJ] is an API that makes it easy for applications written in Java (or any language based on the JVM) to talk to Solr. SolrJ hides a lot of the details of connecting to Solr and allows your application to interact with Solr with simple high-level methods. SolrJ supports most Solr APIs, and is highly configurable.
-The center of SolrJ is the `org.apache.solr.client.solrj` package, which contains just five main classes. Begin by creating a {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/SolrClient.html[`SolrClient`], which represents the Solr instance you want to use. Then send `SolrRequests` or `SolrQuerys` and get back SolrResponses.
+== Building and Running SolrJ Applications
+
+The SolrJ API ships with Solr, so you do not have to download or install anything else. But you will need to configure your build to include SolrJ and its dependencies.
+
+=== Common Build Systems
-`SolrClient` is abstract, so to connect to a remote Solr instance, you'll actually create an instance of either {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/impl/HttpSolrClient.html[`HttpSolrClient`], or {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/impl/CloudSolrClient.html[`CloudSolrClient`]. Both communicate with Solr via HTTP, the difference is that `HttpSolrClient` is configured using an explicit Solr URL, while `CloudSolrClient` is configured using the zkHost String for a <<solrcloud.adoc#solrcloud,SolrCloud>> cluster.
+Most mainstream build systems greatly simplify dependency management, making it easy to add SolrJ to your project.
+For projects built with Ant (using http://ant.apache.org/ivy/[Ivy]), place the following in your `ivy.xml`:
-.Single node Solr client
-[source,java]
+[source,xml]
----
-String urlString = "http://localhost:8983/solr/techproducts";
-SolrClient solr = new HttpSolrClient.Builder(urlString).build();
+<dependency org="org.apache.solr" name="solr-solrj" rev="x.y.z"/>
----
-.SolrCloud client
-[source,java]
-----
-// Using a ZK Host String
-String zkHostString = "zkServerA:2181,zkServerB:2181,zkServerC:2181/solr";
-SolrClient solr = new CloudSolrClient.Builder().withZkHost(zkHostString).build();
+For projects built with Maven, place the following in your `pom.xml`:
-// Using already running Solr nodes
-SolrClient solr = new CloudSolrClient.Builder().withSolrUrl("http://localhost:8983/solr").build();
+[source,xml]
+----
+<dependency>
+ <groupId>org.apache.solr</groupId>
+ <artifactId>solr-solrj</artifactId>
+ <version>x.y.z</version>
+</dependency>
----
-Once you have a `SolrClient`, you can use it by calling methods like `query()`, `add()`, and `commit()`.
+For projects built with Gradle, place the following in your `build.gradle`:
-== Building and Running SolrJ Applications
+[source,groovy]
+----
+compile group: 'org.apache.solr', name: 'solr-solrj', version: 'x.y.z'
+----
-The SolrJ API is included with Solr, so you do not have to download or install anything else. However, in order to build and run applications that use SolrJ, you have to add some libraries to the classpath.
+=== Adding SolrJ to the Classpath Manually
-At build time, the examples presented with this section require `solr-solrj-x.y.z.jar` to be in the classpath.
+If you are not using one of the above build system, it's still easy to add SolrJ to your build.
-At run time, the examples in this section require the libraries found in the 'dist/solrj-lib' directory.
+At build time, all that is required is the SolrJ jar itself: `solr-solrj-x.y.z.jar`. To compile code manually that uses SolrJ, use a `javac` command similar to:
-The Ant script bundled with this sections' examples includes the libraries as appropriate when building and running.
+[source,bash]
+----
+javac -cp .:$SOLR_HOME/dist/solr-solrj-x.y.z.jar ...
+----
-You can sidestep a lot of the messing around with the JAR files by using Maven instead of Ant. All you will need to do to include SolrJ in your application is to put the following dependency in the project's `pom.xml`:
+At runtime, you need a few of SolrJ's dependencies, in addition to SolrJ itself. For convenience, these dependencies are made available in the `dist/solrj-lib` directory. Run your project with a classpath like:
-[source,xml]
+[source,bash]
----
-<dependency>
- <groupId>org.apache.solr</groupId>
- <artifactId>solr-solrj</artifactId>
- <version>x.y.z</version>
-</dependency>
+java -cp .:$SOLR_HOME/dist/solrj-lib/*:$SOLR_HOME/dist/solr-solrj-x.y.z.jar ...
----
If you are worried about the SolrJ libraries expanding the size of your client application, you can use a code obfuscator like http://proguard.sourceforge.net/[ProGuard] to remove APIs that you are not using.
-== Specifying Solr Base URLs
+== SolrJ Overview
-Most `SolrClient` implementations (with the notable exception of `CloudSolrClient`) require users to specify one or more Solr base URLs, which the client then uses to send HTTP requests to Solr. The path users include on the base URL they provide has an effect on the behavior of the created client from that point on.
+For all its flexibility, SolrJ is built around a few simple interfaces.
+<<<<<<< ours
. A URL with a path pointing to a specific core or collection (e.g., `http://hostname:8983/solr/core1`). When a core or collection is specified in the base URL, subsequent requests made with that client are not required to re-specify the affected collection. However, the client is limited to sending requests to that core/collection, and can not send requests to any others.
. A URL with a generic path pointing to the root Solr path (e.g., `http://hostname:8983/solr`). When no core or collection is specified in the base URL, requests can be made to any core/collection, but the affected core/collection must be specified on all requests.
+=======
+All requests to Solr are sent by a {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/SolrClient.html[`SolrClient`]. SolrClient's are the main workhorses at the core of SolrJ. They handle the work of connecting to and communicating with Solr, and are where most of the user configuration happens.
+>>>>>>> theirs
-== Setting XMLResponseParser
+Requests are sent in the form of {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/SolrRequest.html[`SolrRequests`], and are returned as {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/SolrResponse.html[`SolrResponses`].
-SolrJ uses a binary format, rather than XML, as its default response format. If you are trying to mix Solr and SolrJ versions where one is version 1.x and the other is 3.x or later, then you MUST use the XML response parser. The binary format changed in 3.x, and the two javabin versions are entirely incompatible. The following code will make this change:
+=== Types of SolrClients
-[source,java]
-----
-solr.setParser(new XMLResponseParser());
-----
+`SolrClient` has a few concrete implementations, each geared towards a different usage-pattern or resiliency model:
-== Performing Queries
+- {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/impl/HttpSolrClient.html[`HttpSolrClient`] - geared towards query-centric workloads, though also a good general-purpose client. Communicates directly with a single Solr node.
+- {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/impl/LBHttpSolrClient.html[`LBHttpSolrClient`] - balances request load across a list of Solr nodes. Adjusts the list of "in-service" nodes based on node health.
+- {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/impl/CloudSolrClient.html[`CloudSolrClient`] - geared towards communicating with SolrCloud deployments. Uses already-recorded ZooKeeper state to discover and route requests to healthy Solr nodes.
+- {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.html[`ConcurrentUpdateSolrClient`] - geared towards indexing-centric workloads. Buffers documents internally before sending larger batches to Solr.
-Use `query()` to have Solr search for results. You have to pass a `SolrQuery` object that describes the query, and you will get back a QueryResponse (from the `org.apache.solr.client.solrj.response` package).
+=== Common Configuration Options
-`SolrQuery` has methods that make it easy to add parameters to choose a request handler and send parameters to it. Here is a very simple example that uses the default request handler and sets the query string:
+Most SolrJ configuration happens at the `SolrClient` level. The most common/important of these are discussed below. For comprehensive information on how to tweak your `SolrClient`, see the Javadocs for the involved client, and its corresponding builder object.
-[source,java]
-----
-SolrQuery query = new SolrQuery();
-query.setQuery(mQueryString);
-----
+==== Base URLs
+Most `SolrClient` implementations (with the notable exception of `CloudSolrClient`) require users to specify one or more Solr base URLs, which the client then uses to send HTTP requests to Solr. The path users include on the base URL they provide has an effect on the behavior of the created client from that point on.
+
+. A URL with a path pointing to a specific core or collection (e.g. `http://hostname:8983/solr/core1`). When a core or collection is specified in the base URL, subsequent requests made with that client are not required to re-specify the affected collection. However, the client is limited to sending requests to that core/collection, and can not send requests to any others.
+. A URL pointing to the root Solr path (e.g. `http://hostname:8983/solr`). When no core or collection is specified in the base URL, requests can be made to any core/collection, but the affected core/collection must be specified on all requests.
+
+Generally speaking, if your `SolrClient` will only be used on a single core/collection, including that entity in the path is the most convenient. Where more flexibility is required, the collection/core should be excluded.
-To choose a different request handler, there is a specific method available in SolrJ version 4.0 and later:
+==== Timeouts
+All `SolrClient` implementations allow users to specify the connection and read timeouts for communicating with Solr. These are provided at client creation time, as in the example below:
-[source,java]
+[source,java,indent=0]
----
-query.setRequestHandler("/spellCheckCompRH");
+include::UsingSolrJRefGuideExamplesTest.java[tag=solrj-solrclient-timeouts]
----
-You can also set arbitrary parameters on the query object. The first two code lines below are equivalent to each other, and the third shows how to use an arbitrary parameter `q` to set the query string:
+When these values are not explicitly provided, SolrJ falls back to using the defaults for the OS/environment is running on.
-[source,java]
+== Querying in SolrJ
+`SolrClient` has a number of `query()` methods for fetching results from Solr. Each of these methods takes in a `SolrParams`,an object encapsulating arbitrary query-parameters. And each method outputs a `QueryResponse`, a wrapper which can be used to access the result documents and other related metadata.
+
+The following snippet uses a SolrClient to query Solr's "techproducts" example collection, and iterate over the results.
+
+[source,java,indent=0]
----
-query.set("fl", "category,title,price");
-query.setFields("category", "title", "price");
-query.set("q", "category:books");
+include::UsingSolrJRefGuideExamplesTest.java[tag=solrj-query-with-raw-solrparams]
----
-Once you have your `SolrQuery` set up, submit it with `query()`:
+`SolrParams` has a `SolrQuery` subclass, which provides some convenience methods that greatly simplifies query creation. The following snippet shows how the query from the previous example can be built using some of the convenience methods in `SolrQuery`:
-[source,java]
+[source,java,indent=0]
----
-QueryResponse response = solr.query(query);
+include::UsingSolrJRefGuideExamplesTest.java[tag=solrj-query-with-solrquery]
----
-The client makes a network connection and sends the query. Solr processes the query, and the response is sent and parsed into a `QueryResponse`.
+== Indexing in SolrJ
+
+Indexing is also simple using SolrJ. Users build the documents they want to index as instances of `SolrInputDocument`, and provide them as arguments to one of the `add()` methods on `SolrClient`.
-The `QueryResponse` is a collection of documents that satisfy the query parameters. You can retrieve the documents directly with `getResults()` and you can call other methods to find out information about highlighting or facets.
+The following example shows how to use SolrJ to add a document to Solr's "techproducts" example collection:
-[source,java]
+[source,java,indent=0]
----
-SolrDocumentList list = response.getResults();
+include::UsingSolrJRefGuideExamplesTest.java[tag=solrj-index-with-raw-solrinputdoc]
----
-== Indexing Documents
+CAUTION: The indexing examples above are intended to show syntax. For brevity, they break several Solr indexing best-practices. Under normal circumstances, documents should be indexed in larger batches, instead of one at a time. It is also suggested that Solr administrators commit documents using Solr's autocommit settings, and not using explicit `commit()` invocations.
-Other operations are just as simple. To index (add) a document, all you need to do is create a `SolrInputDocument` and pass it along to the `SolrClient` 's `add()` method. This example assumes that the SolrClient object called 'solr' is already created based on the examples shown earlier.
+== Java Object Binding
+While the `UpdateResponse` and `QueryResponse` interfaces that SolrJ provides are useful, it is often more convenient to work with domain-specific objects that can more easily be understood by your application. Thankfully, SolrJ supports this by implicitly converting documents to and from any class that has been specially marked with {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj//beans/Field.html[`Field`] annotations.
-[source,java]
-----
-SolrInputDocument document = new SolrInputDocument();
-document.addField("id", "552199");
-document.addField("name", "Gouda cheese wheel");
-document.addField("price", "49.99");
-UpdateResponse response = solr.add(document);
+Each instance variable in a Java object can be mapped to a corresponding Solr field, using the `Field` annotation. The Solr field shares the name of the annotated variable by default, however, this can be overridden by providing the annotation with an explicit field name.
-// Remember to commit your changes!
+The example snippet below shows an annotated `TechProduct` class that can be used to represent results from Solr's "techproducts" example collection.
-solr.commit();
+[source,java,indent=0]
+----
+include::UsingSolrJRefGuideExamplesTest.java[tag=solrj-techproduct-value-type]
----
-=== Uploading Content in XML or Binary Formats
-
-SolrJ lets you upload content in binary format instead of the default XML format. Use the following code to upload using binary format, which is the same format SolrJ uses to fetch results. If you are trying to mix Solr and SolrJ versions where one is version 1.x and the other is 3.x or later, then you MUST stick with the XML request writer. The binary format changed in 3.x, and the two javabin versions are entirely incompatible.
+Application code with access to the annotated `TechProduct` class above can index `TechProduct` objects directly without any conversion, as in the example snippet below:
-[source,java]
+[source,java,indent=0]
----
-solr.setRequestWriter(new BinaryRequestWriter());
+include::UsingSolrJRefGuideExamplesTest.java[tag=solrj-index-bean-value-type]
----
-=== Using the ConcurrentUpdateSolrClient
+Similarly, search results can be converted directly into bean objects using the `getBeans()` method on `QueryResponse`:
-When implementing java applications that will be bulk loading a lot of documents at once, {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/impl/ConcurrentUpdateSolrClient.html[`ConcurrentUpdateSolrClient`] is an alternative to consider instead of using `HttpSolrClient`. The `ConcurrentUpdateSolrClient` buffers all added documents and writes them into open HTTP connections. This class is thread safe. Although any SolrClient request can be made with this implementation, it is only recommended to use the `ConcurrentUpdateSolrClient` for `/update` requests.
+[source,java,indent=0]
+----
+include::UsingSolrJRefGuideExamplesTest.java[tag=solrj-query-bean-value-type]
+----
-== EmbeddedSolrServer
+== Other APIs
+SolrJ allows more than just querying and indexing. It supports all of Solr's APIs. Accessing Solr's other APIs is as easy as finding the appropriate request object, providing any necessary parameters, and passing it to the `request()` method of your `SolrClient`. `request()` will return a `NamedList`: a generic object which mirrors the hierarchical structure of the JSON or XML returned by their request.
-The {solr-javadocs}/solr-core/org/apache/solr/client/solrj/embedded/EmbeddedSolrServer.html[`EmbeddedSolrServer`] class provides an implementation of the `SolrClient` client API talking directly to an micro-instance of Solr running directly in your Java application. This embedded approach is not recommended in most cases and fairly limited in the set of features it supports – in particular it can not be used with <<solrcloud.adoc#solrcloud,SolrCloud>> or <<index-replication.adoc#index-replication,Index Replication>>. `EmbeddedSolrServer` exists primarily to help facilitate testing.
+The example below shows how SolrJ users can call the CLUSTERSTATUS API of SolrCloud deployments, and manipulate the returned `NamedList`:
-For information on how to use `EmbeddedSolrServer` please review the SolrJ JUnit tests in the `org.apache.solr.client.solrj.embedded` package of the Solr source release.
+[source,java,indent=0]
+----
+include::UsingSolrJRefGuideExamplesTest.java[tag=solrj-other-apis]
+----
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7ece47ca/solr/solrj/src/test/org/apache/solr/client/ref_guide_examples/UsingSolrJRefGuideExamplesTest.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/ref_guide_examples/UsingSolrJRefGuideExamplesTest.java b/solr/solrj/src/test/org/apache/solr/client/ref_guide_examples/UsingSolrJRefGuideExamplesTest.java
new file mode 100644
index 0000000..a988540
--- /dev/null
+++ b/solr/solrj/src/test/org/apache/solr/client/ref_guide_examples/UsingSolrJRefGuideExamplesTest.java
@@ -0,0 +1,235 @@
+/*
+ * 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.
+ *
+ */
+package org.apache.solr.client.ref_guide_examples;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.apache.solr.client.solrj.SolrClient;
+import org.apache.solr.client.solrj.SolrQuery;
+import org.apache.solr.client.solrj.SolrRequest;
+import org.apache.solr.client.solrj.beans.Field;
+import org.apache.solr.client.solrj.impl.HttpSolrClient;
+import org.apache.solr.client.solrj.request.CollectionAdminRequest;
+import org.apache.solr.client.solrj.response.CollectionAdminResponse;
+import org.apache.solr.client.solrj.response.QueryResponse;
+import org.apache.solr.client.solrj.response.UpdateResponse;
+import org.apache.solr.cloud.SolrCloudTestCase;
+import org.apache.solr.common.SolrDocument;
+import org.apache.solr.common.SolrDocumentList;
+import org.apache.solr.common.SolrInputDocument;
+import org.apache.solr.common.params.MapSolrParams;
+import org.apache.solr.common.util.NamedList;
+import org.apache.solr.util.ExternalPaths;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Example SolrJ usage.
+ *
+ * Snippets surrounded by "tag" and "end" comments are extracted and used in the Solr Reference Guide.
+ */
+public class UsingSolrJRefGuideExamplesTest extends SolrCloudTestCase {
+
+ private static final int NUM_INDEXED_DOCUMENTS = 3;
+ private static final int NUM_LIVE_NODES = 1;
+
+ @BeforeClass
+ public static void setUpCluster() throws Exception {
+ configureCluster(NUM_LIVE_NODES)
+ .addConfig("conf", new File(ExternalPaths.TECHPRODUCTS_CONFIGSET).toPath())
+ .configure();
+
+ CollectionAdminResponse response = CollectionAdminRequest.createCollection("techproducts", "conf", 1, 1)
+ .process(cluster.getSolrClient());
+ }
+
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ final SolrClient client = getSolrClient();
+
+ final List<TechProduct> products = new ArrayList<TechProduct>();
+ products.add(new TechProduct("1","Fitbit Alta"));
+ products.add(new TechProduct("2", "Sony Walkman"));
+ products.add(new TechProduct("3", "Garmin GPS"));
+
+ client.addBeans("techproducts", products);
+ client.commit("techproducts");
+ }
+
+ @After
+ @Override
+ public void tearDown() throws Exception {
+ super.tearDown();
+
+ final SolrClient client = getSolrClient();
+ client.deleteByQuery("techproducts", "*:*");
+ client.commit("techproducts");
+ }
+
+ @Test
+ public void queryWithRawSolrParamsExample() throws Exception {
+ // tag::solrj-query-with-raw-solrparams[]
+ final SolrClient client = getSolrClient();
+
+ final Map<String, String> queryParamMap = new HashMap<String, String>();
+ queryParamMap.put("q", "*:*");
+ queryParamMap.put("fl", "id, name");
+ MapSolrParams queryParams = new MapSolrParams(queryParamMap);
+
+ final QueryResponse response = client.query("techproducts", queryParams);
+ final SolrDocumentList documents = response.getResults();
+
+ assertEquals(NUM_INDEXED_DOCUMENTS, documents.getNumFound());
+ for(SolrDocument document : documents) {
+ assertTrue(document.getFieldNames().contains("id"));
+ assertTrue(document.getFieldNames().contains("name"));
+ }
+ // end::solrj-query-with-raw-solrparams[]
+ }
+
+ @Test
+ public void queryWithSolrQueryExample() throws Exception {
+ final int numResultsToReturn = 1;
+ final SolrClient client = getSolrClient();
+
+ // tag::solrj-query-with-solrquery[]
+ final SolrQuery query = new SolrQuery("*:*");
+ query.addField("id");
+ query.addField("name");
+ query.setRows(numResultsToReturn);
+ // end::solrj-query-with-solrquery[]
+
+ final QueryResponse response = client.query("techproducts", query);
+ final SolrDocumentList documents = response.getResults();
+
+ assertEquals(NUM_INDEXED_DOCUMENTS, documents.getNumFound());
+ assertEquals(numResultsToReturn, documents.size());
+ for(SolrDocument document : documents) {
+ assertTrue(document.getFieldNames().contains("id"));
+ assertTrue(document.getFieldNames().contains("name"));
+ }
+ }
+
+ @Test
+ public void indexWithSolrInputDocumentExample() throws Exception {
+ // tag::solrj-index-with-raw-solrinputdoc[]
+ final SolrClient client = getSolrClient();
+
+ final SolrInputDocument doc = new SolrInputDocument();
+ doc.addField("id", UUID.randomUUID().toString());
+ doc.addField("name", "Amazon Kindle Paperwhite");
+
+ final UpdateResponse updateResponse = client.add("techproducts", doc);
+ // Indexed documents must be committed
+ client.commit("techproducts");
+ // end::solrj-index-with-raw-solrinputdoc[]
+
+ assertNumDocuments(NUM_INDEXED_DOCUMENTS + 1);
+ }
+
+ @Test
+ public void indexBeanValueTypeExample() throws Exception {
+ // tag::solrj-index-bean-value-type[]
+ final SolrClient client = getSolrClient();
+
+ final TechProduct kindle = new TechProduct("kindle-id-4", "Amazon Kindle Paperwhite");
+ final UpdateResponse response = client.addBean("techproducts", kindle);
+
+ client.commit("techproducts");
+ // end::solrj-index-bean-value-type[]
+
+ assertNumDocuments(NUM_INDEXED_DOCUMENTS + 1);
+ }
+
+ @Test
+ public void queryBeanValueTypeExample() throws Exception {
+ // tag::solrj-query-bean-value-type[]
+ final SolrClient client = getSolrClient();
+
+ final SolrQuery query = new SolrQuery("*:*");
+ query.addField("id");
+ query.addField("name");
+
+ final QueryResponse response = client.query("techproducts", query);
+ final List<TechProduct> products = response.getBeans(TechProduct.class);
+ // end::solrj-query-bean-value-type[]
+
+ assertEquals(NUM_INDEXED_DOCUMENTS, products.size());
+ for (TechProduct product : products) {
+ assertFalse(product.id.isEmpty());
+ assertFalse(product.name.isEmpty());
+ }
+ }
+
+ @Test
+ public void otherSolrApisExample() throws Exception {
+ // tag::solrj-other-apis[]
+ final SolrClient client = getSolrClient();
+
+ final SolrRequest request = new CollectionAdminRequest.ClusterStatus();
+
+ final NamedList<Object> response = client.request(request);
+ final NamedList<Object> cluster = (NamedList<Object>) response.get("cluster");
+ final List<String> liveNodes = (List<String>) cluster.get("live_nodes");
+
+ assertEquals(NUM_LIVE_NODES, liveNodes.size());
+ // end::solrj-other-apis[]
+ }
+
+ private SolrClient getSolrClient() {
+ return cluster.getSolrClient();
+ }
+
+ private SolrClient getTechProductSolrClient() {
+ // tag::solrj-solrclient-timeouts[]
+ final String solrUrl = "http://localhost:8983/solr";
+ return new HttpSolrClient.Builder(solrUrl)
+ .withConnectionTimeout(10000)
+ .withSocketTimeout(60000)
+ .build();
+ // end::solrj-solrclient-timeouts[]
+ }
+
+ private void assertNumDocuments(int expectedNumResults) throws Exception {
+ final QueryResponse queryResponse = getSolrClient().query("techproducts", new SolrQuery("*:*"));
+ assertEquals(expectedNumResults, queryResponse.getResults().getNumFound());
+ }
+
+ // tag::solrj-techproduct-value-type[]
+ public static class TechProduct {
+ @Field public String id;
+ @Field public String name;
+
+ public TechProduct(String id, String name) {
+ this.id = id; this.name = name;
+ }
+
+ public TechProduct() {}
+ }
+ // end::solrj-techproduct-value-type[]
+
+}