You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by tf...@apache.org on 2017/05/23 00:03:23 UTC

[01/27] lucene-solr:jira/solr-10233: SOLR-10042, LUCENE-7838: Fix precommit

Repository: lucene-solr
Updated Branches:
  refs/heads/jira/solr-10233 8828c3937 -> 359201a61


SOLR-10042, LUCENE-7838: Fix precommit


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

Branch: refs/heads/jira/solr-10233
Commit: d30d012c7c2f9de46a32d7e9eda3b17c51a7fa04
Parents: 606b3bf
Author: Tomas Fernandez Lobbe <tf...@apache.org>
Authored: Thu May 18 17:11:40 2017 -0700
Committer: Tomas Fernandez Lobbe <tf...@apache.org>
Committed: Thu May 18 17:11:40 2017 -0700

----------------------------------------------------------------------
 lucene/classification/build.xml                                    | 2 +-
 .../src/java/org/apache/solr/response/VelocityResponseWriter.java  | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d30d012c/lucene/classification/build.xml
----------------------------------------------------------------------
diff --git a/lucene/classification/build.xml b/lucene/classification/build.xml
index b3f1bfd..af7d2b1 100644
--- a/lucene/classification/build.xml
+++ b/lucene/classification/build.xml
@@ -47,7 +47,7 @@
     <invoke-module-javadoc>
       <links>
         <link href="../queries"/>
-        <link href="../analyzers/common"/>
+        <link href="../analyzers-common"/>
         <link href="../grouping"/>
         <link href="../sandbox"/>
       </links>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d30d012c/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
----------------------------------------------------------------------
diff --git a/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java b/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
index c17412f..133bc63 100644
--- a/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
+++ b/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java
@@ -42,7 +42,6 @@ import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.util.plugin.SolrCoreAware;
 import org.apache.velocity.Template;
 import org.apache.velocity.VelocityContext;
-import org.apache.velocity.app.Velocity;
 import org.apache.velocity.app.VelocityEngine;
 import org.apache.velocity.runtime.RuntimeConstants;
 import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;


[22/27] lucene-solr:jira/solr-10233: SOLR-10725: ASL header in all *.adoc files

Posted by tf...@apache.org.
SOLR-10725: ASL header in all *.adoc files


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

Branch: refs/heads/jira/solr-10233
Commit: 94011393cb0e40ac18f5c115b0e67a0fdcb737e6
Parents: ef245c1
Author: Chris Hostetter <ho...@apache.org>
Authored: Mon May 22 12:50:21 2017 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Mon May 22 12:50:21 2017 -0700

----------------------------------------------------------------------
 solr/solr-ref-guide/README.adoc                     | 16 ++++++++++++++++
 solr/solr-ref-guide/meta-docs/asciidoc-syntax.adoc  | 16 ++++++++++++++++
 solr/solr-ref-guide/meta-docs/editing-tools.adoc    | 16 ++++++++++++++++
 solr/solr-ref-guide/meta-docs/jekyll.adoc           | 16 ++++++++++++++++
 solr/solr-ref-guide/meta-docs/pdf.adoc              | 16 ++++++++++++++++
 solr/solr-ref-guide/meta-docs/publish.adoc          | 16 ++++++++++++++++
 solr/solr-ref-guide/src/a-quick-overview.adoc       | 16 ++++++++++++++++
 solr/solr-ref-guide/src/a-step-closer.adoc          | 16 ++++++++++++++++
 solr/solr-ref-guide/src/about-filters.adoc          | 16 ++++++++++++++++
 solr/solr-ref-guide/src/about-this-guide.adoc       | 16 ++++++++++++++++
 solr/solr-ref-guide/src/about-tokenizers.adoc       | 16 ++++++++++++++++
 .../adding-custom-plugins-in-solrcloud-mode.adoc    | 16 ++++++++++++++++
 solr/solr-ref-guide/src/analysis-screen.adoc        | 16 ++++++++++++++++
 solr/solr-ref-guide/src/analyzers.adoc              | 16 ++++++++++++++++
 .../authentication-and-authorization-plugins.adoc   | 16 ++++++++++++++++
 .../src/basic-authentication-plugin.adoc            | 16 ++++++++++++++++
 solr/solr-ref-guide/src/blob-store-api.adoc         | 16 ++++++++++++++++
 solr/solr-ref-guide/src/blockjoin-faceting.adoc     | 16 ++++++++++++++++
 solr/solr-ref-guide/src/charfilterfactories.adoc    | 16 ++++++++++++++++
 .../src/choosing-an-output-format.adoc              | 16 ++++++++++++++++
 solr/solr-ref-guide/src/client-api-lineup.adoc      | 16 ++++++++++++++++
 solr/solr-ref-guide/src/client-apis.adoc            | 16 ++++++++++++++++
 solr/solr-ref-guide/src/cloud-screens.adoc          | 16 ++++++++++++++++
 solr/solr-ref-guide/src/codec-factory.adoc          | 16 ++++++++++++++++
 .../src/collapse-and-expand-results.adoc            | 16 ++++++++++++++++
 .../src/collection-specific-tools.adoc              | 16 ++++++++++++++++
 solr/solr-ref-guide/src/collections-api.adoc        | 16 ++++++++++++++++
 solr/solr-ref-guide/src/collections-core-admin.adoc | 16 ++++++++++++++++
 .../src/combining-distribution-and-replication.adoc | 16 ++++++++++++++++
 solr/solr-ref-guide/src/command-line-utilities.adoc | 16 ++++++++++++++++
 .../solr-ref-guide/src/common-query-parameters.adoc | 16 ++++++++++++++++
 solr/solr-ref-guide/src/config-api.adoc             | 16 ++++++++++++++++
 solr/solr-ref-guide/src/config-sets.adoc            | 16 ++++++++++++++++
 solr/solr-ref-guide/src/configsets-api.adoc         | 16 ++++++++++++++++
 solr/solr-ref-guide/src/configuration-apis.adoc     | 16 ++++++++++++++++
 solr/solr-ref-guide/src/configuring-logging.adoc    | 16 ++++++++++++++++
 .../src/configuring-solrconfig-xml.adoc             | 16 ++++++++++++++++
 solr/solr-ref-guide/src/content-streams.adoc        | 16 ++++++++++++++++
 solr/solr-ref-guide/src/copying-fields.adoc         | 16 ++++++++++++++++
 solr/solr-ref-guide/src/core-specific-tools.adoc    | 16 ++++++++++++++++
 solr/solr-ref-guide/src/coreadmin-api.adoc          | 16 ++++++++++++++++
 .../src/cross-data-center-replication-cdcr.adoc     | 16 ++++++++++++++++
 .../datadir-and-directoryfactory-in-solrconfig.adoc | 16 ++++++++++++++++
 solr/solr-ref-guide/src/dataimport-screen.adoc      | 16 ++++++++++++++++
 solr/solr-ref-guide/src/de-duplication.adoc         | 16 ++++++++++++++++
 .../src/defining-core-properties.adoc               | 16 ++++++++++++++++
 solr/solr-ref-guide/src/defining-fields.adoc        | 16 ++++++++++++++++
 .../src/detecting-languages-during-indexing.adoc    | 16 ++++++++++++++++
 solr/solr-ref-guide/src/distributed-requests.adoc   | 16 ++++++++++++++++
 .../src/distributed-search-with-index-sharding.adoc | 16 ++++++++++++++++
 .../src/documents-fields-and-schema-design.adoc     | 16 ++++++++++++++++
 solr/solr-ref-guide/src/documents-screen.adoc       | 16 ++++++++++++++++
 solr/solr-ref-guide/src/docvalues.adoc              | 16 ++++++++++++++++
 solr/solr-ref-guide/src/dynamic-fields.adoc         | 16 ++++++++++++++++
 solr/solr-ref-guide/src/enabling-ssl.adoc           | 16 ++++++++++++++++
 solr/solr-ref-guide/src/errata.adoc                 | 16 ++++++++++++++++
 solr/solr-ref-guide/src/exporting-result-sets.adoc  | 16 ++++++++++++++++
 solr/solr-ref-guide/src/faceting.adoc               | 16 ++++++++++++++++
 .../src/field-properties-by-use-case.adoc           | 16 ++++++++++++++++
 .../src/field-type-definitions-and-properties.adoc  | 16 ++++++++++++++++
 .../src/field-types-included-with-solr.adoc         | 16 ++++++++++++++++
 solr/solr-ref-guide/src/files-screen.adoc           | 16 ++++++++++++++++
 solr/solr-ref-guide/src/filter-descriptions.adoc    | 16 ++++++++++++++++
 solr/solr-ref-guide/src/format-of-solr-xml.adoc     | 16 ++++++++++++++++
 solr/solr-ref-guide/src/function-queries.adoc       | 16 ++++++++++++++++
 solr/solr-ref-guide/src/further-assistance.adoc     | 16 ++++++++++++++++
 solr/solr-ref-guide/src/getting-assistance.adoc     | 16 ++++++++++++++++
 .../src/getting-started-with-solrcloud.adoc         | 16 ++++++++++++++++
 solr/solr-ref-guide/src/getting-started.adoc        | 16 ++++++++++++++++
 solr/solr-ref-guide/src/graph-traversal.adoc        | 16 ++++++++++++++++
 .../src/hadoop-authentication-plugin.adoc           | 16 ++++++++++++++++
 solr/solr-ref-guide/src/highlighting.adoc           | 16 ++++++++++++++++
 solr/solr-ref-guide/src/how-solrcloud-works.adoc    | 16 ++++++++++++++++
 .../src/implicit-requesthandlers.adoc               | 16 ++++++++++++++++
 solr/solr-ref-guide/src/index-replication.adoc      | 16 ++++++++++++++++
 solr/solr-ref-guide/src/index.adoc                  | 16 ++++++++++++++++
 .../src/indexconfig-in-solrconfig.adoc              | 16 ++++++++++++++++
 .../src/indexing-and-basic-data-operations.adoc     | 16 ++++++++++++++++
 solr/solr-ref-guide/src/indexupgrader-tool.adoc     | 16 ++++++++++++++++
 .../src/initparams-in-solrconfig.adoc               | 16 ++++++++++++++++
 solr/solr-ref-guide/src/installing-solr.adoc        | 16 ++++++++++++++++
 .../src/introduction-to-client-apis.adoc            | 16 ++++++++++++++++
 .../introduction-to-scaling-and-distribution.adoc   | 16 ++++++++++++++++
 .../src/introduction-to-solr-indexing.adoc          | 16 ++++++++++++++++
 solr/solr-ref-guide/src/java-properties.adoc        | 16 ++++++++++++++++
 solr/solr-ref-guide/src/jvm-settings.adoc           | 16 ++++++++++++++++
 .../src/kerberos-authentication-plugin.adoc         | 16 ++++++++++++++++
 solr/solr-ref-guide/src/language-analysis.adoc      | 16 ++++++++++++++++
 solr/solr-ref-guide/src/learning-to-rank.adoc       | 16 ++++++++++++++++
 .../src/legacy-scaling-and-distribution.adoc        | 16 ++++++++++++++++
 .../src/lib-directives-in-solrconfig.adoc           | 16 ++++++++++++++++
 .../src/local-parameters-in-queries.adoc            | 16 ++++++++++++++++
 solr/solr-ref-guide/src/logging.adoc                | 16 ++++++++++++++++
 .../src/major-changes-from-solr-5-to-solr-6.adoc    | 16 ++++++++++++++++
 .../src/making-and-restoring-backups.adoc           | 16 ++++++++++++++++
 solr/solr-ref-guide/src/managed-resources.adoc      | 16 ++++++++++++++++
 solr/solr-ref-guide/src/managing-solr.adoc          | 16 ++++++++++++++++
 solr/solr-ref-guide/src/mbean-request-handler.adoc  | 16 ++++++++++++++++
 solr/solr-ref-guide/src/merging-indexes.adoc        | 16 ++++++++++++++++
 solr/solr-ref-guide/src/metrics-reporting.adoc      | 16 ++++++++++++++++
 solr/solr-ref-guide/src/morelikethis.adoc           | 16 ++++++++++++++++
 .../src/near-real-time-searching.adoc               | 16 ++++++++++++++++
 solr/solr-ref-guide/src/other-parsers.adoc          | 16 ++++++++++++++++
 solr/solr-ref-guide/src/other-schema-elements.adoc  | 16 ++++++++++++++++
 ...rview-of-documents-fields-and-schema-design.adoc | 16 ++++++++++++++++
 .../src/overview-of-searching-in-solr.adoc          | 16 ++++++++++++++++
 .../src/overview-of-the-solr-admin-ui.adoc          | 16 ++++++++++++++++
 solr/solr-ref-guide/src/pagination-of-results.adoc  | 16 ++++++++++++++++
 solr/solr-ref-guide/src/parallel-sql-interface.adoc | 16 ++++++++++++++++
 solr/solr-ref-guide/src/parameter-reference.adoc    | 16 ++++++++++++++++
 solr/solr-ref-guide/src/pdf/SolrRefGuide-all.adoc   | 16 ++++++++++++++++
 .../src/performance-statistics-reference.adoc       | 16 ++++++++++++++++
 solr/solr-ref-guide/src/phonetic-matching.adoc      | 16 ++++++++++++++++
 solr/solr-ref-guide/src/ping.adoc                   | 16 ++++++++++++++++
 solr/solr-ref-guide/src/plugins-stats-screen.adoc   | 16 ++++++++++++++++
 solr/solr-ref-guide/src/post-tool.adoc              | 16 ++++++++++++++++
 .../src/putting-the-pieces-together.adoc            | 16 ++++++++++++++++
 solr/solr-ref-guide/src/query-re-ranking.adoc       | 16 ++++++++++++++++
 solr/solr-ref-guide/src/query-screen.adoc           | 16 ++++++++++++++++
 .../src/query-settings-in-solrconfig.adoc           | 16 ++++++++++++++++
 .../src/query-syntax-and-parsing.adoc               | 16 ++++++++++++++++
 .../src/read-and-write-side-fault-tolerance.adoc    | 16 ++++++++++++++++
 solr/solr-ref-guide/src/realtime-get.adoc           | 16 ++++++++++++++++
 solr/solr-ref-guide/src/relevance.adoc              | 16 ++++++++++++++++
 solr/solr-ref-guide/src/replication-screen.adoc     | 16 ++++++++++++++++
 solr/solr-ref-guide/src/request-parameters-api.adoc | 16 ++++++++++++++++
 .../src/requestdispatcher-in-solrconfig.adoc        | 16 ++++++++++++++++
 ...handlers-and-searchcomponents-in-solrconfig.adoc | 16 ++++++++++++++++
 solr/solr-ref-guide/src/response-writers.adoc       | 16 ++++++++++++++++
 solr/solr-ref-guide/src/result-clustering.adoc      | 16 ++++++++++++++++
 solr/solr-ref-guide/src/result-grouping.adoc        | 16 ++++++++++++++++
 .../src/rule-based-authorization-plugin.adoc        | 16 ++++++++++++++++
 .../src/rule-based-replica-placement.adoc           | 16 ++++++++++++++++
 solr/solr-ref-guide/src/running-solr-on-hdfs.adoc   | 16 ++++++++++++++++
 solr/solr-ref-guide/src/running-solr.adoc           | 16 ++++++++++++++++
 solr/solr-ref-guide/src/running-your-analyzer.adoc  | 16 ++++++++++++++++
 solr/solr-ref-guide/src/schema-api.adoc             | 16 ++++++++++++++++
 solr/solr-ref-guide/src/schema-browser-screen.adoc  | 16 ++++++++++++++++
 .../schema-factory-definition-in-solrconfig.adoc    | 16 ++++++++++++++++
 solr/solr-ref-guide/src/schemaless-mode.adoc        | 16 ++++++++++++++++
 solr/solr-ref-guide/src/searching.adoc              | 16 ++++++++++++++++
 solr/solr-ref-guide/src/securing-solr.adoc          | 16 ++++++++++++++++
 solr/solr-ref-guide/src/segments-info.adoc          | 16 ++++++++++++++++
 .../setting-up-an-external-zookeeper-ensemble.adoc  | 16 ++++++++++++++++
 .../src/shards-and-indexing-data-in-solrcloud.adoc  | 16 ++++++++++++++++
 .../src/solr-control-script-reference.adoc          | 16 ++++++++++++++++
 .../solr-ref-guide/src/solr-cores-and-solr-xml.adoc | 16 ++++++++++++++++
 solr/solr-ref-guide/src/solr-field-types.adoc       | 16 ++++++++++++++++
 solr/solr-ref-guide/src/solr-glossary.adoc          | 16 ++++++++++++++++
 .../src/solr-jdbc-apache-zeppelin.adoc              | 16 ++++++++++++++++
 solr/solr-ref-guide/src/solr-jdbc-dbvisualizer.adoc | 16 ++++++++++++++++
 .../solr-ref-guide/src/solr-jdbc-python-jython.adoc | 16 ++++++++++++++++
 solr/solr-ref-guide/src/solr-jdbc-r.adoc            | 16 ++++++++++++++++
 solr/solr-ref-guide/src/solr-jdbc-squirrel-sql.adoc | 16 ++++++++++++++++
 solr/solr-ref-guide/src/solr-plugins.adoc           | 16 ++++++++++++++++
 .../src/solrcloud-configuration-and-parameters.adoc | 16 ++++++++++++++++
 .../solrcloud-with-legacy-configuration-files.adoc  | 16 ++++++++++++++++
 solr/solr-ref-guide/src/solrcloud.adoc              | 16 ++++++++++++++++
 solr/solr-ref-guide/src/spatial-search.adoc         | 16 ++++++++++++++++
 solr/solr-ref-guide/src/spell-checking.adoc         | 16 ++++++++++++++++
 solr/solr-ref-guide/src/stream-decorators.adoc      | 16 ++++++++++++++++
 solr/solr-ref-guide/src/stream-evaluators.adoc      | 16 ++++++++++++++++
 solr/solr-ref-guide/src/stream-screen.adoc          | 16 ++++++++++++++++
 solr/solr-ref-guide/src/stream-sources.adoc         | 16 ++++++++++++++++
 solr/solr-ref-guide/src/streaming-expressions.adoc  | 16 ++++++++++++++++
 solr/solr-ref-guide/src/suggester.adoc              | 16 ++++++++++++++++
 .../src/taking-solr-to-production.adoc              | 16 ++++++++++++++++
 .../solr-ref-guide/src/the-dismax-query-parser.adoc | 16 ++++++++++++++++
 .../src/the-extended-dismax-query-parser.adoc       | 16 ++++++++++++++++
 .../src/the-query-elevation-component.adoc          | 16 ++++++++++++++++
 .../src/the-standard-query-parser.adoc              | 16 ++++++++++++++++
 solr/solr-ref-guide/src/the-stats-component.adoc    | 16 ++++++++++++++++
 .../src/the-term-vector-component.adoc              | 16 ++++++++++++++++
 solr/solr-ref-guide/src/the-terms-component.adoc    | 16 ++++++++++++++++
 .../src/the-well-configured-solr-instance.adoc      | 16 ++++++++++++++++
 solr/solr-ref-guide/src/thread-dump.adoc            | 16 ++++++++++++++++
 solr/solr-ref-guide/src/tokenizers.adoc             | 16 ++++++++++++++++
 .../src/transforming-and-indexing-custom-json.adoc  | 16 ++++++++++++++++
 .../src/transforming-result-documents.adoc          | 16 ++++++++++++++++
 solr/solr-ref-guide/src/uima-integration.adoc       | 16 ++++++++++++++++
 ...erstanding-analyzers-tokenizers-and-filters.adoc | 16 ++++++++++++++++
 .../src/update-request-processors.adoc              | 16 ++++++++++++++++
 .../src/updatehandlers-in-solrconfig.adoc           | 16 ++++++++++++++++
 .../src/updating-parts-of-documents.adoc            | 16 ++++++++++++++++
 .../src/upgrading-a-solr-cluster.adoc               | 16 ++++++++++++++++
 solr/solr-ref-guide/src/upgrading-solr.adoc         | 16 ++++++++++++++++
 .../src/uploading-data-with-index-handlers.adoc     | 16 ++++++++++++++++
 ...ading-data-with-solr-cell-using-apache-tika.adoc | 16 ++++++++++++++++
 ...ata-store-data-with-the-data-import-handler.adoc | 16 ++++++++++++++++
 solr/solr-ref-guide/src/using-javascript.adoc       | 16 ++++++++++++++++
 solr/solr-ref-guide/src/using-jmx-with-solr.adoc    | 16 ++++++++++++++++
 solr/solr-ref-guide/src/using-python.adoc           | 16 ++++++++++++++++
 solr/solr-ref-guide/src/using-solr-from-ruby.adoc   | 16 ++++++++++++++++
 solr/solr-ref-guide/src/using-solrj.adoc            | 16 ++++++++++++++++
 ...sing-the-solr-administration-user-interface.adoc | 16 ++++++++++++++++
 ...ing-zookeeper-to-manage-configuration-files.adoc | 16 ++++++++++++++++
 solr/solr-ref-guide/src/v2-api.adoc                 | 16 ++++++++++++++++
 .../src/velocity-response-writer.adoc               | 16 ++++++++++++++++
 solr/solr-ref-guide/src/velocity-search-ui.adoc     | 16 ++++++++++++++++
 .../working-with-currencies-and-exchange-rates.adoc | 16 ++++++++++++++++
 solr/solr-ref-guide/src/working-with-dates.adoc     | 16 ++++++++++++++++
 .../src/working-with-enum-fields.adoc               | 16 ++++++++++++++++
 .../working-with-external-files-and-processes.adoc  | 16 ++++++++++++++++
 .../src/zookeeper-access-control.adoc               | 16 ++++++++++++++++
 204 files changed, 3264 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/README.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/README.adoc b/solr/solr-ref-guide/README.adoc
index 80b99f6..a66d79d 100644
--- a/solr/solr-ref-guide/README.adoc
+++ b/solr/solr-ref-guide/README.adoc
@@ -1,4 +1,20 @@
 = Solr Ref Guide
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This is the source for the Solr Reference Guide.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/meta-docs/asciidoc-syntax.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/meta-docs/asciidoc-syntax.adoc b/solr/solr-ref-guide/meta-docs/asciidoc-syntax.adoc
index 3f0eb74..f8ff2c4 100644
--- a/solr/solr-ref-guide/meta-docs/asciidoc-syntax.adoc
+++ b/solr/solr-ref-guide/meta-docs/asciidoc-syntax.adoc
@@ -1,5 +1,21 @@
 = Asciidoc syntax
 :toc:
+// 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.
 
 The definitive manual on Asciidoc syntax is in the http://asciidoctor.org/docs/user-manual/[Asciidoctor User Manual]. To help people get started, however, here is a simpler cheat sheet.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/meta-docs/editing-tools.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/meta-docs/editing-tools.adoc b/solr/solr-ref-guide/meta-docs/editing-tools.adoc
index 46a82ec..cd8d7a2 100644
--- a/solr/solr-ref-guide/meta-docs/editing-tools.adoc
+++ b/solr/solr-ref-guide/meta-docs/editing-tools.adoc
@@ -1,4 +1,20 @@
 = Tools for Working with Asciidoc Format
+// 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.
 
 == Asciidoc vs Asciidoctor
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/meta-docs/jekyll.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/meta-docs/jekyll.adoc b/solr/solr-ref-guide/meta-docs/jekyll.adoc
index d00b487..2b965a5 100644
--- a/solr/solr-ref-guide/meta-docs/jekyll.adoc
+++ b/solr/solr-ref-guide/meta-docs/jekyll.adoc
@@ -1,5 +1,21 @@
 = Working with Jekyll
 :toc:
+// 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.
 
 The Solr Ref Guide uses Jekyll to build the HTML version of the site.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/meta-docs/pdf.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/meta-docs/pdf.adoc b/solr/solr-ref-guide/meta-docs/pdf.adoc
index 1520d5c..9fefaab 100644
--- a/solr/solr-ref-guide/meta-docs/pdf.adoc
+++ b/solr/solr-ref-guide/meta-docs/pdf.adoc
@@ -1,4 +1,20 @@
 = Generating PDF
+// 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.
 
 The main published artifact of the Solr Reference Guide is a PDF document.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/meta-docs/publish.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/meta-docs/publish.adoc b/solr/solr-ref-guide/meta-docs/publish.adoc
index a2a6d41..642143a 100644
--- a/solr/solr-ref-guide/meta-docs/publish.adoc
+++ b/solr/solr-ref-guide/meta-docs/publish.adoc
@@ -1,5 +1,21 @@
 = Publication Process
 :toc:
+// 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.
 
 == About the Formats
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 b87d091..bcacb07 100644
--- a/solr/solr-ref-guide/src/a-quick-overview.adoc
+++ b/solr/solr-ref-guide/src/a-quick-overview.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Having had some fun with Solr, you will now learn about all the cool things it can do.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/src/a-step-closer.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/a-step-closer.adoc b/solr/solr-ref-guide/src/a-step-closer.adoc
index f74d214..c75c6b9 100644
--- a/solr/solr-ref-guide/src/a-step-closer.adoc
+++ b/solr/solr-ref-guide/src/a-step-closer.adoc
@@ -1,6 +1,22 @@
 = A Step Closer
 :page-shortname: a-step-closer
 :page-permalink: a-step-closer.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
+// 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.
 
 You already have some idea of Solr's schema. This section describes Solr's home directory and other configuration options.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 84e3b95..212f5e5 100644
--- a/solr/solr-ref-guide/src/about-filters.adoc
+++ b/solr/solr-ref-guide/src/about-filters.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Like <<tokenizers.adoc#tokenizers,tokenizers>>, <<filter-descriptions.adoc#filter-descriptions,filters>> consume input and produce a stream of tokens. Filters also derive from `org.apache.lucene.analysis.TokenStream`. Unlike tokenizers, a filter's input is another TokenStream. The job of a filter is usually easier than that of a tokenizer since in most cases a filter looks at each token in the stream sequentially and decides whether to pass it along, replace it or discard it.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 a9d1564..2168c1c 100644
--- a/solr/solr-ref-guide/src/about-this-guide.adoc
+++ b/solr/solr-ref-guide/src/about-this-guide.adoc
@@ -1,6 +1,22 @@
 = About This Guide
 :page-shortname: about-this-guide
 :page-permalink: about-this-guide.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
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This guide describes all of the important features and functions of Apache Solr.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 4dec7cf..5bee36c 100644
--- a/solr/solr-ref-guide/src/about-tokenizers.adoc
+++ b/solr/solr-ref-guide/src/about-tokenizers.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The job of a <<tokenizers.adoc#tokenizers,tokenizer>> is to break up a stream of text into tokens, where each token is (usually) a sub-sequence of the characters in the text. An analyzer is aware of the field it is configured for, but a tokenizer is not. Tokenizers read from a character stream (a Reader) and produce a sequence of Token objects (a TokenStream).
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 4c6a04d..54647f9 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,22 @@
 = 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
+// 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.
 
 In SolrCloud mode, custom plugins need to be shared across all nodes of the cluster.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 2910206..9a8b946 100644
--- a/solr/solr-ref-guide/src/analysis-screen.adoc
+++ b/solr/solr-ref-guide/src/analysis-screen.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Analysis screen lets you inspect how data will be handled according to the field, field type and dynamic field configurations found in your Schema. You can analyze how content would be handled during indexing or during query processing and view the results separately or at the same time. Ideally, you would want content to be handled consistently, and this screen allows you to validate the settings in the field type or field analysis chains.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 6753737..c274f8e 100644
--- a/solr/solr-ref-guide/src/analyzers.adoc
+++ b/solr/solr-ref-guide/src/analyzers.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 An analyzer examines the text of fields and generates a token stream.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 2db6fee..7f1586f 100644
--- a/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adoc
+++ b/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 Solr has security frameworks for supporting authentication and authorization of users. This allows for verifying a user's identity and for restricting access to resources in a Solr cluster.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 592da1b..1143d58 100644
--- a/solr/solr-ref-guide/src/basic-authentication-plugin.adoc
+++ b/solr/solr-ref-guide/src/basic-authentication-plugin.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Solr can support Basic authentication for users with the use of the BasicAuthPlugin.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 8e23ed9..63297b9 100644
--- a/solr/solr-ref-guide/src/blob-store-api.adoc
+++ b/solr/solr-ref-guide/src/blob-store-api.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Blob Store REST API provides REST methods to store, retrieve or list files in a Lucene index.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 05194de..bf33aca 100644
--- a/solr/solr-ref-guide/src/blockjoin-faceting.adoc
+++ b/solr/solr-ref-guide/src/blockjoin-faceting.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 BlockJoin facets allow you to aggregate children facet counts by their parents.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 20ff949..d25648c 100644
--- a/solr/solr-ref-guide/src/charfilterfactories.adoc
+++ b/solr/solr-ref-guide/src/charfilterfactories.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 CharFilter is a component that pre-processes input characters.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 133bed8..77fca3d 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,22 @@
 = 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
+// 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.
 
 Many programming environments are able to send HTTP requests and retrieve responses. Parsing the responses is a slightly more thorny problem. Fortunately, Solr makes it easy to choose an output format that will be easy to handle on the client side.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 06014e0..0a5ac2e 100644
--- a/solr/solr-ref-guide/src/client-api-lineup.adoc
+++ b/solr/solr-ref-guide/src/client-api-lineup.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Solr Wiki contains a list of client APIs at http://wiki.apache.org/solr/IntegratingSolr.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 9272520..7c5aed6 100644
--- a/solr/solr-ref-guide/src/client-apis.adoc
+++ b/solr/solr-ref-guide/src/client-apis.adoc
@@ -2,6 +2,22 @@
 :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
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section discusses the available client APIs for Solr. It covers the following topics:
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 927faed..b0c228e 100644
--- a/solr/solr-ref-guide/src/cloud-screens.adoc
+++ b/solr/solr-ref-guide/src/cloud-screens.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 When running in <<solrcloud.adoc#solrcloud,SolrCloud>> mode, a "Cloud" option will appear in the Admin UI between <<logging.adoc#logging,Logging>> and <<collections-core-admin.adoc#collections-core-admin,Collections/Core Admin>>.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 2e80788..bb5f0e0 100644
--- a/solr/solr-ref-guide/src/codec-factory.adoc
+++ b/solr/solr-ref-guide/src/codec-factory.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 A `codecFactory` can be specified in `solrconfig.xml` to determine which Lucene {lucene-javadocs}/core/org/apache/lucene/codecs/Codec.html[`Codec`] is used when writing the index to disk.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 481d61c..5640b9b 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,22 @@
 = 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
+// 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.
 
 The Collapsing query parser and the Expand component combine to form an approach to grouping documents for field collapsing in search results.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 b94572a..487afba 100644
--- a/solr/solr-ref-guide/src/collection-specific-tools.adoc
+++ b/solr/solr-ref-guide/src/collection-specific-tools.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 In the left-hand navigation bar, you will see a pull-down menu titled "Collection Selector" that can be used to access collection specific administration screens.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 63c7107..bd32819 100644
--- a/solr/solr-ref-guide/src/collections-api.adoc
+++ b/solr/solr-ref-guide/src/collections-api.adoc
@@ -1,6 +1,22 @@
 = Collections API
 :page-shortname: collections-api
 :page-permalink: collections-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
+// 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.
 
 The Collections API is used to enable you to create, remove, or reload collections, but in the context of SolrCloud you can also use it to create collections with a specific number of shards and replicas.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 fc75354..fad7560 100644
--- a/solr/solr-ref-guide/src/collections-core-admin.adoc
+++ b/solr/solr-ref-guide/src/collections-core-admin.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Collections screen provides some basic functionality for managing your Collections, powered by the <<collections-api.adoc#collections-api,Collections API>>.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 cff045d..ff00474 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,22 @@
 = 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
+// 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.
 
 When your index is too large for a single machine and you have a query volume that single shards cannot keep up with, it's time to replicate each shard in your distributed search setup.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 94d3a49..f59c729 100644
--- a/solr/solr-ref-guide/src/command-line-utilities.adoc
+++ b/solr/solr-ref-guide/src/command-line-utilities.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 A ZooKeeper Command Line Interface (CLI) script is available to allow you to interact directly with Solr configuration files stored in ZooKeeper.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 248d540..5b6c701 100644
--- a/solr/solr-ref-guide/src/common-query-parameters.adoc
+++ b/solr/solr-ref-guide/src/common-query-parameters.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Several query parsers share supported query parameters.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 146d55c..13d523b 100644
--- a/solr/solr-ref-guide/src/config-api.adoc
+++ b/solr/solr-ref-guide/src/config-api.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Config API enables manipulating various aspects of your `solrconfig.xml` using REST-like API calls.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 3c67e7e..851327f 100644
--- a/solr/solr-ref-guide/src/config-sets.adoc
+++ b/solr/solr-ref-guide/src/config-sets.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 On a multicore Solr instance, you may find that you want to share configuration between a number of different cores. You can achieve this using named configsets, which are essentially shared configuration directories stored under a configurable configset base directory.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 505fcbe..1bf76f7 100644
--- a/solr/solr-ref-guide/src/configsets-api.adoc
+++ b/solr/solr-ref-guide/src/configsets-api.adoc
@@ -1,6 +1,22 @@
 = ConfigSets API
 :page-shortname: configsets-api
 :page-permalink: configsets-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
+// 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.
 
 The ConfigSets API enables you to create, delete, and otherwise manage ConfigSets.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 dcbcbe1..3d58e71 100644
--- a/solr/solr-ref-guide/src/configuration-apis.adoc
+++ b/solr/solr-ref-guide/src/configuration-apis.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 Solr includes several APIs that can be used to modify settings in `solrconfig.xml`.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 47fe649..7e22f38 100644
--- a/solr/solr-ref-guide/src/configuring-logging.adoc
+++ b/solr/solr-ref-guide/src/configuring-logging.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Solr logs are a key way to know what's happening in the system. There are several ways to adjust the default logging configuration.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 4c2b88c..61f78b4 100644
--- a/solr/solr-ref-guide/src/configuring-solrconfig-xml.adoc
+++ b/solr/solr-ref-guide/src/configuring-solrconfig-xml.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 The `solrconfig.xml` file is the configuration file with the most parameters affecting Solr itself.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 f26467a..438fa77 100644
--- a/solr/solr-ref-guide/src/content-streams.adoc
+++ b/solr/solr-ref-guide/src/content-streams.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Content streams are bulk data passed with a request to Solr.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 af02df0..dd34740 100644
--- a/solr/solr-ref-guide/src/copying-fields.adoc
+++ b/solr/solr-ref-guide/src/copying-fields.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 You might want to interpret some document fields in more than one way. Solr has a mechanism for making copies of fields so that you can apply several distinct field types to a single piece of incoming information.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 54144c5..81bc098 100644
--- a/solr/solr-ref-guide/src/core-specific-tools.adoc
+++ b/solr/solr-ref-guide/src/core-specific-tools.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 The Core-Specific tools are a group of UI screens that allow you to see core-level information.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 4cd7147..3624c52 100644
--- a/solr/solr-ref-guide/src/coreadmin-api.adoc
+++ b/solr/solr-ref-guide/src/coreadmin-api.adoc
@@ -1,6 +1,22 @@
 = CoreAdmin API
 :page-shortname: coreadmin-api
 :page-permalink: coreadmin-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
+// 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.
 
 The Core Admin API is primarily used under the covers by the <<collections-api.adoc#collections-api,Collections API>> when running a <<solrcloud.adoc#solrcloud,SolrCloud>> cluster.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 3509884..3bd482b 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,22 @@
 = 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
+// 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.
 
 Cross Data Center Replication (CDCR) allows you to create multiple SolrCloud data centers and keep them in sync in case they are needed at a future time.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 e2a847f..496830d 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,22 @@
 = 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
+// 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.
 
 Where and how Solr stores its indexes are configurable options.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 a90923e..363a2bd 100644
--- a/solr/solr-ref-guide/src/dataimport-screen.adoc
+++ b/solr/solr-ref-guide/src/dataimport-screen.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Dataimport screen shows the configuration of the DataImportHandler (DIH) and allows you start, and monitor the status of, import commands as defined by the options selected on the screen and defined in the configuration file.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 60d3b587..2a3b902 100644
--- a/solr/solr-ref-guide/src/de-duplication.adoc
+++ b/solr/solr-ref-guide/src/de-duplication.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 If duplicate, or near-duplicate documents are a concern in your index, de-duplication may be worth implementing.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 0515838..93a3d3e 100644
--- a/solr/solr-ref-guide/src/defining-core-properties.adoc
+++ b/solr/solr-ref-guide/src/defining-core-properties.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Core discovery means that creating a core is as simple as a `core.properties` file located on disk.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 15dba12..4ef3a5d 100644
--- a/solr/solr-ref-guide/src/defining-fields.adoc
+++ b/solr/solr-ref-guide/src/defining-fields.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Fields are defined in the fields element of `schema.xml`. Once you have the field types set up, defining the fields themselves is simple.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 44cd456..1bcddec 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,22 @@
 = 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
+// 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.
 
 Solr can identify languages and map text to language-specific fields during indexing using the `langid` UpdateRequestProcessor.
 


[18/27] lucene-solr:jira/solr-10233: Ref Guide: typo "more then"...instead of "more than"

Posted by tf...@apache.org.
Ref Guide: typo "more then"...instead of "more than"


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

Branch: refs/heads/jira/solr-10233
Commit: ef245c1f08750fd71341cbfe845d2214eb4b873c
Parents: c71ce16
Author: Cassandra Targett <ct...@apache.org>
Authored: Mon May 22 12:37:16 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Mon May 22 12:37:52 2017 -0500

----------------------------------------------------------------------
 solr/solr-ref-guide/src/uploading-data-with-index-handlers.adoc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/ef245c1f/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 79ab2d1..9b6b594 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
@@ -69,7 +69,7 @@ The add command supports some optional attributes which may be specified.
 
 If the document schema defines a unique key, then by default an `/update` operation to add a document will overwrite (ie: replace) any document in the index with the same unique key. If no unique key has been defined, indexing performance is somewhat faster, as no check has to be made for an existing documents to replace.
 
-If you have a unique key field, but you feel confident that you can safely bypass the uniqueness check (eg: you build your indexes in batch, and your indexing code guarantees it never adds the same document more then once) you can specify the `overwrite="false"` option when adding your documents.
+If you have a unique key field, but you feel confident that you can safely bypass the uniqueness check (eg: you build your indexes in batch, and your indexing code guarantees it never adds the same document more than once) you can specify the `overwrite="false"` option when adding your documents.
 
 [[UploadingDatawithIndexHandlers-XMLUpdateCommands]]
 === XML Update Commands


[16/27] lucene-solr:jira/solr-10233: SOLR-10698: Fix precommit

Posted by tf...@apache.org.
SOLR-10698: Fix precommit


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

Branch: refs/heads/jira/solr-10233
Commit: c71ce16bb90c5fc58acbc8f9ee2e74249f11f3ac
Parents: 02b1c8a
Author: Joel Bernstein <jb...@apache.org>
Authored: Mon May 22 11:05:37 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Mon May 22 11:05:37 2017 -0400

----------------------------------------------------------------------
 .../src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java | 1 -
 .../java/org/apache/solr/client/solrj/io/stream/TupleStream.java    | 1 -
 2 files changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c71ce16b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java
index 2bb2e1c..31d1913 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java
@@ -27,7 +27,6 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrRequest;
 import org.apache.solr.client.solrj.SolrServerException;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/c71ce16b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TupleStream.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TupleStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TupleStream.java
index 0542bd6..4b62d11 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TupleStream.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TupleStream.java
@@ -37,7 +37,6 @@ import org.apache.solr.client.solrj.io.stream.expr.Explanation;
 import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
 import org.apache.solr.common.IteratorWriter;
 import org.apache.solr.common.MapWriter;
-import org.apache.solr.common.SolrException;
 import org.apache.solr.common.cloud.Aliases;
 import org.apache.solr.common.cloud.ClusterState;
 import org.apache.solr.common.cloud.DocCollection;


[04/27] lucene-solr:jira/solr-10233: LUCENE-7833: Fix score computation with ToParentBlockJoinQuery and ScoreMode.MAX.

Posted by tf...@apache.org.
LUCENE-7833: Fix score computation with ToParentBlockJoinQuery and ScoreMode.MAX.


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

Branch: refs/heads/jira/solr-10233
Commit: 3bb4662e63484eb032e6c1e1a175999869ddff88
Parents: eb475db
Author: Adrien Grand <jp...@gmail.com>
Authored: Fri May 19 08:28:37 2017 +0200
Committer: Adrien Grand <jp...@gmail.com>
Committed: Fri May 19 08:28:37 2017 +0200

----------------------------------------------------------------------
 lucene/CHANGES.txt                              |  3 +
 .../search/join/ToParentBlockJoinQuery.java     |  2 +-
 .../lucene/search/join/TestBlockJoin.java       | 62 +++++++++++++++++++-
 3 files changed, 64 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3bb4662e/lucene/CHANGES.txt
----------------------------------------------------------------------
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index f309334..43b13b1 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -147,6 +147,9 @@ Bug Fixes
 
 * LUCENE-7831: CodecUtil should not seek to negative offsets. (Adrien Grand)
 
+* LUCENE-7833: ToParentBlockJoinQuery computed the min score instead of the max
+  score with ScoreMode.MAX. (Adrien Grand)
+
 Improvements
 
 * LUCENE-7782: OfflineSorter now passes the total number of items it

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3bb4662e/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java
----------------------------------------------------------------------
diff --git a/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java b/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java
index 0f1f727..1b6f386 100644
--- a/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java
+++ b/lucene/join/src/java/org/apache/lucene/search/join/ToParentBlockJoinQuery.java
@@ -312,7 +312,7 @@ public class ToParentBlockJoinQuery extends Query {
               score = Math.min(score, childScore);
               break;
             case Max:
-              score = Math.min(score, childScore);
+              score = Math.max(score, childScore);
               break;
             case None:
               break;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3bb4662e/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
----------------------------------------------------------------------
diff --git a/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java b/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
index da3c20e..c87fdbb 100644
--- a/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
+++ b/lucene/join/src/test/org/apache/lucene/search/join/TestBlockJoin.java
@@ -52,6 +52,9 @@ import org.apache.lucene.index.ReaderUtil;
 import org.apache.lucene.index.Term;
 import org.apache.lucene.search.*;
 import org.apache.lucene.search.BooleanClause.Occur;
+import org.apache.lucene.search.similarities.BasicStats;
+import org.apache.lucene.search.similarities.Similarity;
+import org.apache.lucene.search.similarities.SimilarityBase;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.BitSet;
 import org.apache.lucene.util.Bits;
@@ -230,11 +233,11 @@ public class TestBlockJoin extends LuceneTestCase {
     matchingChildren = s.search(childrenQuery, 1);
     assertEquals(1, matchingChildren.totalHits);
     assertEquals("java", s.doc(matchingChildren.scoreDocs[0].doc).get("skill"));
-    
+
     r.close();
     dir.close();
   }
-  
+
   public void testSimple() throws Exception {
 
     final Directory dir = newDirectory();
@@ -1472,5 +1475,60 @@ public class TestBlockJoin extends LuceneTestCase {
     dir.close();
   }
 
+  public void testScoreMode() throws IOException {
+    Similarity sim = new SimilarityBase() {
+
+      @Override
+      public String toString() {
+        return "TestSim";
+      }
+
+      @Override
+      protected float score(BasicStats stats, float freq, float docLen) {
+        return freq;
+      }
+    };
+    Directory dir = newDirectory();
+    RandomIndexWriter w = new RandomIndexWriter(random(), dir, newIndexWriterConfig().setSimilarity(sim));
+    w.addDocuments(Arrays.asList(
+        Collections.singleton(newTextField("foo", "bar bar", Store.NO)),
+        Collections.singleton(newTextField("foo", "bar", Store.NO)),
+        Collections.emptyList(),
+        Collections.singleton(newStringField("type", new BytesRef("parent"), Store.NO))));
+    DirectoryReader reader = w.getReader();
+    w.close();
+    IndexSearcher searcher = newSearcher(reader);
+    searcher.setSimilarity(sim);
+    BitSetProducer parents = new QueryBitSetProducer(new TermQuery(new Term("type", "parent")));
+    for (ScoreMode scoreMode : ScoreMode.values()) {
+      Query query = new ToParentBlockJoinQuery(new TermQuery(new Term("foo", "bar")), parents, scoreMode);
+      TopDocs topDocs = searcher.search(query, 10);
+      assertEquals(1, topDocs.totalHits);
+      assertEquals(3, topDocs.scoreDocs[0].doc);
+      float expectedScore;
+      switch (scoreMode) {
+        case Avg:
+          expectedScore = 1.5f;
+          break;
+        case Max:
+          expectedScore = 2f;
+          break;
+        case Min:
+          expectedScore = 1f;
+          break;
+        case None:
+          expectedScore = 0f;
+          break;
+        case Total:
+          expectedScore = 3f;
+          break;
+        default:
+          throw new AssertionError();
+      }
+      assertEquals(expectedScore, topDocs.scoreDocs[0].score, 0f);
+    }
+    reader.close();
+    dir.close();
+  }
 
 }


[19/27] lucene-solr:jira/solr-10233: SOLR-10725: ASL header in all *.adoc files

Posted by tf...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/src/stream-evaluators.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-evaluators.adoc b/solr/solr-ref-guide/src/stream-evaluators.adoc
index 0337d70..3927b8f 100644
--- a/solr/solr-ref-guide/src/stream-evaluators.adoc
+++ b/solr/solr-ref-guide/src/stream-evaluators.adoc
@@ -3,6 +3,22 @@
 :page-permalink: stream-evaluators.html
 :page-tocclass: right
 :page-toclevels: 1
+// 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.
 
 == analyze
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 a351b0a..30f6cbe 100644
--- a/solr/solr-ref-guide/src/stream-screen.adoc
+++ b/solr/solr-ref-guide/src/stream-screen.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Stream screen allows you to enter a <<streaming-expressions.adoc#streaming-expressions,streaming expression>> and see the results. It is very similar to the <<query-screen.adoc#query-screen,Query Screen>>, except the input box is at the top and all options must be declared in the expression.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/src/stream-sources.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-sources.adoc b/solr/solr-ref-guide/src/stream-sources.adoc
index 33e050a..7d3a2e2 100644
--- a/solr/solr-ref-guide/src/stream-sources.adoc
+++ b/solr/solr-ref-guide/src/stream-sources.adoc
@@ -3,6 +3,22 @@
 :page-permalink: stream-sources.html
 :page-tocclass: right
 :page-toclevels: 1
+// 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.
 
 
 == search

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 b61e8e4..5ea3dd9 100644
--- a/solr/solr-ref-guide/src/streaming-expressions.adoc
+++ b/solr/solr-ref-guide/src/streaming-expressions.adoc
@@ -2,6 +2,22 @@
 :page-shortname: streaming-expressions
 :page-permalink: streaming-expressions.html
 :page-children: stream-sources, stream-decorators, stream-evaluators, graph-traversal
+// 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.
 
 Streaming Expressions provide a simple yet powerful stream processing language for Solr Cloud.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 8971860..61bf53d 100644
--- a/solr/solr-ref-guide/src/suggester.adoc
+++ b/solr/solr-ref-guide/src/suggester.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The SuggestComponent in Solr provides users with automatic suggestions for query terms.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 833a5a7..37921d0 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,22 @@
 = 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
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section provides guidance on how to setup Solr to run in production on *nix platforms, such as Ubuntu. Specifically, we’ll walk through the process of setting up to run a single Solr instance on a Linux host and then provide tips on how to support multiple Solr nodes running on the same host.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 4396bb1..64682bf 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,22 @@
 = 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
+// 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.
 
 The DisMax query parser is designed to process simple phrases (without complex syntax) entered by users and to search for individual terms across several fields using different weighting (boosts) based on the significance of each field. Additional options enable users to influence the score based on rules specific to each use case (independent of user input).
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 3a9481b..6f7cf89 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,22 @@
 = The Extended DisMax 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
+// 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.
 
 The Extended DisMax (eDisMax) query parser is an improved version of the <<the-dismax-query-parser.adoc#the-dismax-query-parser,DisMax query parser>>.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 b56b718..f70ed88 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,22 @@
 = 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
+// 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.
 
 The https://wiki.apache.org/solr/QueryElevationComponent[Query Elevation Component] lets you configure the top results for a given query regardless of the normal Lucene scoring.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 99bd234..f4455d2 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,22 @@
 = 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
+// 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.
 
 Solr's default Query Parser is also known as the "```lucene```" parser.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 c5ac9ef..0e4fa4d 100644
--- a/solr/solr-ref-guide/src/the-stats-component.adoc
+++ b/solr/solr-ref-guide/src/the-stats-component.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Stats component returns simple statistics for numeric, string, and date fields within the document set.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 a8189c8..fb92dc9 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,22 @@
 = 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
+// 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.
 
 The TermVectorComponent is a search component designed to return additional information about documents matching your search.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 f93bd66..346278b 100644
--- a/solr/solr-ref-guide/src/the-terms-component.adoc
+++ b/solr/solr-ref-guide/src/the-terms-component.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Terms Component provides access to the indexed terms in a field and the number of documents that match each term. This can be useful for building an auto-suggest feature or any other feature that operates at the term level instead of the search or document level. Retrieving terms in index order is very fast since the implementation directly uses Lucene's TermEnum to iterate over the term dictionary.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 d89019a..a6883ec 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
@@ -2,6 +2,22 @@
 :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
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section tells you how to fine-tune your Solr instance for optimum performance.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 e42d336..454a62c 100644
--- a/solr/solr-ref-guide/src/thread-dump.adoc
+++ b/solr/solr-ref-guide/src/thread-dump.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Thread Dump screen lets you inspect the currently active threads on your server.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 0c0cf31..5c7a819 100644
--- a/solr/solr-ref-guide/src/tokenizers.adoc
+++ b/solr/solr-ref-guide/src/tokenizers.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Tokenizers are responsible for breaking field data into lexical units, or _tokens_.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 8db3123..5b858e3 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,22 @@
 = 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
+// 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.
 
 If you have JSON documents that you would like to index without transforming them into Solr's structure, you can add them to Solr by including some parameters with the update request. These parameters provide information on how to split a single JSON file into multiple Solr documents and how to map fields to Solr's schema. One or more valid JSON documents can be sent to the `/update/json/docs` path with the configuration params.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 33bb88e..95d373e 100644
--- a/solr/solr-ref-guide/src/transforming-result-documents.adoc
+++ b/solr/solr-ref-guide/src/transforming-result-documents.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Document Transformers can be used to modify the information returned about each documents in the results of a query.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 8374ae5..c7f9725 100644
--- a/solr/solr-ref-guide/src/uima-integration.adoc
+++ b/solr/solr-ref-guide/src/uima-integration.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 You can integrate the Apache Unstructured Information Management Architecture (https://uima.apache.org/[UIMA]) with Solr. UIMA lets you define custom pipelines of Analysis Engines that incrementally add metadata to your documents as annotations.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 e3e8aea..7dfce49 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
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 The following sections describe how Solr breaks down and works with textual data. There are three main concepts to understand: analyzers, tokenizers, and filters.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 d61e3d7..22d14ed 100644
--- a/solr/solr-ref-guide/src/update-request-processors.adoc
+++ b/solr/solr-ref-guide/src/update-request-processors.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Every update request received by Solr is run through a chain of plugins known as Update Request Processors, or _URPs_.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 fb3f2cf..d8a00bc 100644
--- a/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The settings in this section are configured in the `<updateHandler>` element in `solrconfig.xml` and may affect the performance of index updates. These settings affect how updates are done internally. `<updateHandler>` configurations do not affect the higher level configuration of <<requesthandlers-and-searchcomponents-in-solrconfig.adoc#requesthandlers-and-searchcomponents-in-solrconfig,RequestHandlers>> that process client update requests.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 ef0441b..ecd9b4c 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,22 @@
 = 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
+// 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.
 
 Once you have indexed the content you need in your Solr index, you will want to start thinking about your strategy for dealing with changes to those documents. Solr supports three approaches to updating documents that have only partially changed.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 374b462..00b825a 100644
--- a/solr/solr-ref-guide/src/upgrading-a-solr-cluster.adoc
+++ b/solr/solr-ref-guide/src/upgrading-a-solr-cluster.adoc
@@ -2,6 +2,22 @@
 :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
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This page covers how to upgrade an existing Solr cluster that was installed using the <<taking-solr-to-production.adoc#taking-solr-to-production,service installation scripts>>.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/src/upgrading-solr.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/upgrading-solr.adoc b/solr/solr-ref-guide/src/upgrading-solr.adoc
index e5803d8..74142a9 100644
--- a/solr/solr-ref-guide/src/upgrading-solr.adoc
+++ b/solr/solr-ref-guide/src/upgrading-solr.adoc
@@ -1,6 +1,22 @@
 = Upgrading Solr
 :page-shortname: upgrading-solr
 :page-permalink: upgrading-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
+// 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.
 
 If you are already using Solr 6.5, Solr 6.6 should not present any major problems. However, you should review the {solr-javadocs}/changes/Changes.html[`CHANGES.txt`] file found in your Solr package for changes and updates that may effect your existing implementation. Detailed steps for upgrading a Solr cluster can be found in the appendix: <<upgrading-a-solr-cluster.adoc#upgrading-a-solr-cluster,Upgrading a Solr Cluster>>.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 9b6b594..30a2c3a 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
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 Index Handlers are Request Handlers designed to add, delete and update documents to the index. In addition to having plugins for importing rich documents <<uploading-data-with-solr-cell-using-apache-tika.adoc#uploading-data-with-solr-cell-using-apache-tika,using Tika>> or from structured data sources using the <<uploading-structured-data-store-data-with-the-data-import-handler.adoc#uploading-structured-data-store-data-with-the-data-import-handler,Data Import Handler>>, Solr natively supports indexing structured documents in XML, CSV and JSON.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 0247e98..e1c8414 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,22 @@
 = 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
+// 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.
 
 Solr uses code from the http://lucene.apache.org/tika/[Apache Tika] project to provide a framework for incorporating many different file-format parsers such as http://incubator.apache.org/pdfbox/[Apache PDFBox] and http://poi.apache.org/index.html[Apache POI] into Solr itself. Working with this framework, Solr's `ExtractingRequestHandler` can use Tika to support uploading binary files, including files in popular formats such as Word and PDF, for data extraction and indexing.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 0fd66ab..af33ad9 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
@@ -2,6 +2,22 @@
 :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
 :toclevels: 1
+// 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.
 
 Many search applications store the content to be indexed in a structured data store, such as a relational database. The Data Import Handler (DIH) provides a mechanism for importing content from a data store and indexing it. In addition to relational databases, DIH can index content from HTTP based data sources such as RSS and ATOM feeds, e-mail repositories, and structured XML where an XPath processor is used to generate fields.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 025aaa3..25aabf8 100644
--- a/solr/solr-ref-guide/src/using-javascript.adoc
+++ b/solr/solr-ref-guide/src/using-javascript.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Using Solr from JavaScript clients is so straightforward that it deserves a special mention. In fact, it is so straightforward that there is no client API. You don't need to install any packages or configure anything.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 e69df27..241b30b 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,22 @@
 = 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
+// 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.
 
 http://www.oracle.com/technetwork/java/javase/tech/javamanagement-140525.html[Java Management Extensions (JMX)] is a technology that makes it possible for complex systems to be controlled by tools without the systems and tools having any previous knowledge of each other. In essence, it is a standard interface by which complex systems can be viewed and manipulated.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 00c9305..1e8045f 100644
--- a/solr/solr-ref-guide/src/using-python.adoc
+++ b/solr/solr-ref-guide/src/using-python.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Solr includes an output format specifically for <<response-writers.adoc#ResponseWriters-PythonResponseWriter,Python>>, but <<response-writers.adoc#ResponseWriters-JSONResponseWriter,JSON output>> is a little more robust.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 21d290c..ef5454c 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,22 @@
 = 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
+// 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.
 
 Solr has an optional Ruby response format that extends the <<response-writers.adoc#ResponseWriters-JSONResponseWriter,JSON output>> to allow the response to be safely eval'd by Ruby's interpreter
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 39cd440..7850776 100644
--- a/solr/solr-ref-guide/src/using-solrj.adoc
+++ b/solr/solr-ref-guide/src/using-solrj.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 {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.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 9cfb196..4916100 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
@@ -2,6 +2,22 @@
 :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
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section discusses the Solr Administration User Interface ("Admin UI").
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 57d7f46..3a6c49d 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,22 @@
 = 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
+// 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.
 
 With SolrCloud your configuration files are kept in ZooKeeper.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 12ac623..51357ab 100644
--- a/solr/solr-ref-guide/src/v2-api.adoc
+++ b/solr/solr-ref-guide/src/v2-api.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 // TODO: most of the sample introspection calls below include cwiki.apache.org URLs that should be replaced...
 // TODO: ...but they come directly from the API.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 3f3b32c..fcfe560 100644
--- a/solr/solr-ref-guide/src/velocity-response-writer.adoc
+++ b/solr/solr-ref-guide/src/velocity-response-writer.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The VelocityResponseWriter is an optional plugin available in the `contrib/velocity` directory. It powers the /browse user interfaces when using configurations such as "basic_configs", "techproducts", and "example/files".
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 f41a204..0cb4697 100644
--- a/solr/solr-ref-guide/src/velocity-search-ui.adoc
+++ b/solr/solr-ref-guide/src/velocity-search-ui.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Solr includes a sample search UI based on the <<response-writers.adoc#ResponseWriters-VelocityResponseWriter,VelocityResponseWriter>> (also known as Solritas) that demonstrates several useful features, such as searching, faceting, highlighting, autocomplete, and geospatial searching.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 b5d8e0c..c651263 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,22 @@
 = 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
+// 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.
 
 The `currency` FieldType provides support for monetary values to Solr/Lucene with query-time currency conversion and exchange rates. The following features are supported:
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 22959b7..5426c94 100644
--- a/solr/solr-ref-guide/src/working-with-dates.adoc
+++ b/solr/solr-ref-guide/src/working-with-dates.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 [[WorkingwithDates-DateFormatting]]
 == Date Formatting

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 0c7963b..c4d49b3 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,22 @@
 = 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
+// 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.
 
 The EnumField type allows defining a field whose values are a closed set, and the sort order is pre-determined but is not alphabetic nor numeric. Examples of this are severity lists, or risk definitions.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 cc4665c..3e92f50 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,22 @@
 = 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
+// 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.
 
 [[WorkingwithExternalFilesandProcesses-TheExternalFileFieldType]]
 == The `ExternalFileField` Type

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 c0fa805..0bf3b1b 100644
--- a/solr/solr-ref-guide/src/zookeeper-access-control.adoc
+++ b/solr/solr-ref-guide/src/zookeeper-access-control.adoc
@@ -1,6 +1,22 @@
 = 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
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section describes using ZooKeeper access control lists (ACLs) with Solr. For information about ZooKeeper ACLs, see the ZooKeeper documentation at http://zookeeper.apache.org/doc/r3.4.6/zookeeperProgrammers.html#sc_ZooKeeperAccessControl.
 


[10/27] lucene-solr:jira/solr-10233: Ref Guide: add a bit more info to TOC options in meta-docs

Posted by tf...@apache.org.
Ref Guide: add a bit more info to TOC options in meta-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/b179249c
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/b179249c
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/b179249c

Branch: refs/heads/jira/solr-10233
Commit: b179249ce0c5b56442ba54f941660f5d4129d46c
Parents: fa76171
Author: Cassandra Targett <ca...@lucidworks.com>
Authored: Fri May 19 14:34:00 2017 -0500
Committer: Cassandra Targett <ca...@lucidworks.com>
Committed: Fri May 19 14:34:00 2017 -0500

----------------------------------------------------------------------
 solr/solr-ref-guide/meta-docs/jekyll.adoc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/b179249c/solr/solr-ref-guide/meta-docs/jekyll.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/meta-docs/jekyll.adoc b/solr/solr-ref-guide/meta-docs/jekyll.adoc
index 8d3f2fc..d00b487 100644
--- a/solr/solr-ref-guide/meta-docs/jekyll.adoc
+++ b/solr/solr-ref-guide/meta-docs/jekyll.adoc
@@ -40,11 +40,11 @@ The Solr Ref Guide uses the front matter to define some custom attributes on a p
 
 There are also some optional custom attributes that can be defined in pages to affect the Table of Contents presentation in jekyll:
 
-* `page-toclevels` - changes how "deep" the TOC will be in terms of nested section/sub-section titles (default = 2
-* `page-tocclass` - changes the CSS class applied to the TOC, default = "normal", resulting in the class name `toc-normal`
+* `page-toclevels` - changes how "deep" the TOC will be in terms of nested section/sub-section titles (default = 2)
+* `page-tocclass` - changes the CSS class applied to the TOC, default = "normal", resulting in the class name `toc-normal`. The other option is "right", to put the TOC on the right side of the page.
 * `page-toc` - if this is false, then no TOCs will be generated for the page at all.
 
-NOTE: The special macro `{section-toc}` can be used anywhere in a page to create an "In this Section" TOC covering only the sub-headings in the same secion.  `:page-toc: false` will also prevent this macro from working, so if you want no "top level" TOC, but you do want section TOCs, use `:page-toclevels: 0`
+NOTE: The special macro `{section-toc}` can be used anywhere in a page to create an "In this Section" TOC covering only the sub-headings in the same section.  `:page-toc: false` will also prevent this macro from working, so if you want no "top level" TOC, but you do want section TOCs, use `:page-toclevels: 0`
 
 === Layouts
 


[17/27] lucene-solr:jira/solr-10233: Merge branch 'master' into jira/solr-10233

Posted by tf...@apache.org.
Merge branch 'master' into jira/solr-10233


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

Branch: refs/heads/jira/solr-10233
Commit: 70bd593a422a066743b2f8443c0cdfb527c3e4e3
Parents: 8828c39 c71ce16
Author: Tomas Fernandez Lobbe <tf...@apache.org>
Authored: Mon May 22 10:12:53 2017 -0700
Committer: Tomas Fernandez Lobbe <tf...@apache.org>
Committed: Mon May 22 10:12:53 2017 -0700

----------------------------------------------------------------------
 lucene/CHANGES.txt                              |    3 +
 lucene/classification/build.xml                 |    2 +-
 .../search/join/ToParentBlockJoinQuery.java     |    2 +-
 .../lucene/search/join/TestBlockJoin.java       |   62 +-
 .../lucene/misc/SweetSpotSimilarityTest.java    |    3 +-
 solr/CHANGES.txt                                |   12 +-
 .../solr/response/VelocityResponseWriter.java   |    1 -
 .../org/apache/solr/handler/ExportWriter.java   |    1 -
 .../handler/FieldAnalysisRequestHandler.java    |   11 +-
 .../org/apache/solr/handler/SchemaHandler.java  |    9 -
 .../solr/handler/admin/LukeRequestHandler.java  |    1 -
 .../handler/component/HighlightComponent.java   |    9 +-
 .../apache/solr/highlight/SolrHighlighter.java  |    5 +-
 .../apache/solr/response/SchemaXmlWriter.java   |    5 -
 .../org/apache/solr/schema/IndexSchema.java     |   31 +-
 .../apache/solr/schema/ManagedIndexSchema.java  |    1 -
 .../solr/search/ComplexPhraseQParserPlugin.java |    3 -
 .../org/apache/solr/search/DisMaxQParser.java   |    5 +-
 .../org/apache/solr/search/LuceneQParser.java   |    3 -
 .../org/apache/solr/search/QueryParsing.java    |   13 +-
 .../apache/solr/search/SimpleQParserPlugin.java |    6 +-
 .../solr/search/SurroundQParserPlugin.java      |    2 +-
 .../apache/solr/search/XmlQParserPlugin.java    |    2 +-
 .../conf/bad-schema-defaultsearchfield.xml      |   26 +
 .../test/org/apache/solr/MinimalSchemaTest.java |    1 -
 .../FieldAnalysisRequestHandlerTest.java        |    8 +
 .../solr/handler/admin/TestCollectionAPIs.java  |    2 +-
 .../apache/solr/schema/BadIndexSchemaTest.java  |    4 +
 .../apache/solr/util/SolrPluginUtilsTest.java   |    3 +-
 .../example-DIH/solr/tika/conf/managed-schema   |    2 +-
 solr/solr-ref-guide/build.xml                   |    1 +
 solr/solr-ref-guide/meta-docs/jekyll.adoc       |   16 +-
 solr/solr-ref-guide/src/_config.yml.template    |    2 +
 solr/solr-ref-guide/src/_includes/toc.html      |   22 +-
 solr/solr-ref-guide/src/css/ref-guide.css       |   44 +-
 solr/solr-ref-guide/src/js/ref-guide-toc.js     |   36 +
 .../src/other-schema-elements.adoc              |    7 -
 .../src/putting-the-pieces-together.adoc        |    2 -
 solr/solr-ref-guide/src/solr-glossary.adoc      |    4 +-
 solr/solr-ref-guide/src/stream-decorators.adoc  |  832 ++++++++
 solr/solr-ref-guide/src/stream-evaluators.adoc  |  445 +++++
 solr/solr-ref-guide/src/stream-sources.adoc     |  405 ++++
 .../src/streaming-expressions.adoc              | 1863 +-----------------
 .../src/update-request-processors.adoc          |  191 +-
 .../solr/client/solrj/impl/HttpSolrClient.java  |    2 +
 .../solr/client/solrj/io/stream/SolrStream.java |   13 +-
 .../client/solrj/io/stream/TupleStream.java     |   37 +-
 .../response/schema/SchemaRepresentation.java   |   10 -
 .../solrj/response/schema/SchemaResponse.java   |    5 -
 solr/webapp/web/js/angular/app.js               |  252 ---
 .../web/js/angular/controllers/analysis.js      |   10 -
 .../web/js/angular/controllers/core-overview.js |   32 -
 solr/webapp/web/js/angular/controllers/cores.js |  283 ---
 .../webapp/web/js/angular/controllers/schema.js |   21 -
 solr/webapp/web/partials/schema.html            |    3 -
 55 files changed, 2083 insertions(+), 2693 deletions(-)
----------------------------------------------------------------------



[11/27] lucene-solr:jira/solr-10233: SOLR-10692: Split streaming-expressions.adoc into 4 total files; fix section titles

Posted by tf...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bc89757a/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 665fbf9..b61e8e4 100644
--- a/solr/solr-ref-guide/src/streaming-expressions.adoc
+++ b/solr/solr-ref-guide/src/streaming-expressions.adoc
@@ -1,7 +1,7 @@
 = Streaming Expressions
 :page-shortname: streaming-expressions
 :page-permalink: streaming-expressions.html
-:page-children: graph-traversal
+:page-children: stream-sources, stream-decorators, stream-evaluators, graph-traversal
 
 Streaming Expressions provide a simple yet powerful stream processing language for Solr Cloud.
 
@@ -101,1355 +101,20 @@ ParallelStream pstream = (ParallelStream)streamFactory.constructStream("parallel
 
 Because streaming expressions relies on the `/export` handler, many of the field and field type requirements to use `/export` are also requirements for `/stream`, particularly for `sort` and `fl` parameters. Please see the section <<exporting-result-sets.adoc#exporting-result-sets,Exporting Result Sets>> for details.
 
-[[StreamingExpressions-StreamSources]]
-== Stream Sources
+== Types of Streaming Expressions
 
-Stream sources originate streams.
+=== About Stream Sources
 
-[[StreamingExpressions-echo]]
-=== echo
-//TODO
+Stream sources originate streams. The most commonly used one of these is `search`, which does a query.
 
-[[StreamingExpressions-search]]
-=== search
+A full reference to all available source expressions is available in <<stream-sources.adoc#stream-sources,Stream Sources>>.
 
-The `search` function searches a SolrCloud collection and emits a stream of tuples that match the query. This is very similar to a standard Solr query, and uses many of the same parameters.
+=== About Stream Decorators
+Stream decorators wrap other stream functions or perform operations on a stream.
 
-This expression allows you to specify a request hander using the `qt` parameter. By default, the `/select` handler is used. The `/select` handler can be used for simple rapid prototyping of expressions. For production, however, you will most likely want to use the `/export` handler which is designed to `sort` and `export` entire result sets. The `/export` handler is not used by default because it has stricter requirements then the `/select` handler so it's not as easy to get started working with. To read more about the `/export` handler requirements review the section <<exporting-result-sets.adoc#exporting-result-sets,Exporting Result Sets>>.
+A full reference to all available decorator expressions is available in <<stream-decorators.adoc#stream-decorators,Stream Decorators>>.
 
-[[StreamingExpressions-Parameters]]
-==== Parameters
-
-* `collection`: (Mandatory) the collection being searched.
-* `q`: (Mandatory) The query to perform on the Solr index.
-* `fl`: (Mandatory) The list of fields to return.
-* `sort`: (Mandatory) The sort criteria.
-* `zkHost`: Only needs to be defined if the collection being searched is found in a different zkHost than the local stream handler.
-* `qt`: Specifies the query type, or request handler, to use. Set this to `/export` to work with large result sets. The default is `/select`.
-* `rows`: (Mandatory with the `/select` handler) The rows parameter specifies how many rows to return. This parameter is only needed with the `/select` handler (which is the default) since the `/export` handler always returns all rows.
-* `partitionKeys`: Comma delimited list of keys to partition the search results by. To be used with the parallel function for parallelizing operations across worker nodes. See the <<StreamingExpressions-parallel,parallel>> function for details.
-
-[[StreamingExpressions-Syntax]]
-==== Syntax
-
-[source,text]
-----
-expr=search(collection1,
-       zkHost="localhost:9983",
-       qt="/export",
-       q="*:*",
-       fl="id,a_s,a_i,a_f",
-       sort="a_f asc, a_i asc")
-----
-
-
-=== shuffle
-//TODO
-
-[[StreamingExpressions-jdbc]]
-=== jdbc
-
-The `jdbc` function searches a JDBC datasource and emits a stream of tuples representing the JDBC result set. Each row in the result set is translated into a tuple and each tuple contains all the cell values for that row.
-
-[[StreamingExpressions-Parameters.1]]
-==== Parameters
-
-* `connection`: (Mandatory) JDBC formatted connection string to whatever driver you are using.
-* `sql`: (Mandatory) query to pass off to the JDBC endpoint
-* `sort`: (Mandatory) The sort criteria indicating how the data coming out of the JDBC stream is sorted
-* `driver`: The name of the JDBC driver used for the connection. If provided then the driver class will attempt to be loaded into the JVM. If not provided then it is assumed that the driver is already loaded into the JVM. Some drivers require explicit loading so this option is provided.
-* `[driverProperty]`: One or more properties to pass to the JDBC driver during connection. The format is `propertyName="propertyValue"`. You can provide as many of these properties as you'd like and they will all be passed to the connection.
-
-[[StreamingExpressions-ConnectionsandDrivers]]
-==== Connections and Drivers
-
-Because some JDBC drivers require explicit loading the `driver` parameter can be used to provide the driver class name. If provided, then during stream construction the driver will be loaded. If the driver cannot be loaded because the class is not found on the classpath, then stream construction will fail.
-
-When the JDBC stream is opened it will validate that a driver can be found for the provided connection string. If a driver cannot be found (because it hasn't been loaded) then the open will fail.
-
-[[StreamingExpressions-Datatypes]]
-==== Datatypes
-
-Due to the inherent differences in datatypes across JDBC sources the following datatypes are supported. The table indicates what Java type will be used for a given JDBC type. Types marked as requiring conversion will go through a conversion for each value of that type. For performance reasons the cell data types are only considered when the stream is opened as this is when the converters are created.
-
-[width="100%",options="header",]
-|===
-|JDBC Type |Java Type |Requires Conversion
-|String |String |No
-|Short |Long |Yes
-|Integer |Long |Yes
-|Long |Long |No
-|Float |Double |Yes
-|Double |Double |No
-|Boolean |Boolean |No
-|===
-
-[[StreamingExpressions-Syntax.1]]
-==== Syntax
-
-A basic `jdbc` expression:
-
-[source,text]
-----
-jdbc(
-    connection="jdbc:hsqldb:mem:.",
-    sql="select NAME, ADDRESS, EMAIL, AGE from PEOPLE where AGE > 25 order by AGE, NAME DESC",
-    sort="AGE asc, NAME desc",
-    driver="org.hsqldb.jdbcDriver"
-)
-----
-
-A `jdbc` expression that passes a property to the driver:
-
-[source,text]
-----
-// get_column_name is a property to pass to the hsqldb driver
-jdbc(
-    connection="jdbc:hsqldb:mem:.",
-    sql="select NAME as FIRST_NAME, ADDRESS, EMAIL, AGE from PEOPLE where AGE > 25 order by AGE, NAME DESC",
-    sort="AGE asc, NAME desc",
-    driver="org.hsqldb.jdbcDriver",
-    get_column_name="false"
-)
-----
-
-[[StreamingExpressions-facet]]
-=== facet
-
-The `facet` function provides aggregations that are rolled up over buckets. Under the covers the facet function pushes down the aggregation into the search engine using Solr's JSON Facet API. This provides sub-second performance for many use cases. The facet function is appropriate for use with a low to moderate number of distinct values in the bucket fields. To support high cardinality aggregations see the rollup function.
-
-[[StreamingExpressions-Parameters.2]]
-==== Parameters
-
-* `collection`: (Mandatory) Collection the facets will be aggregated from.
-* `q`: (Mandatory) The query to build the aggregations from.
-* `buckets`: (Mandatory) Comma separated list of fields to rollup over. The comma separated list represents the dimensions in a multi-dimensional rollup.
-* `bucketSorts`: Comma separated list of sorts to apply to each dimension in the buckets parameters. Sorts can be on the computed metrics or on the bucket values.
-* `bucketSizeLimit`: The number of buckets to include. This value is applied to each dimension.
-* `metrics`: List of metrics to compute for the buckets. Currently supported metrics are `sum(col)`, `avg(col)`, `min(col)`, `max(col)`, `count(*)`.
-
-[[StreamingExpressions-Syntax.2]]
-==== Syntax
-
-Example 1:
-
-[source,text]
-----
-facet(collection1,
-      q="*:*",
-      buckets="a_s",
-      bucketSorts="sum(a_i) desc",
-      bucketSizeLimit=100,
-      sum(a_i),
-      sum(a_f),
-      min(a_i),
-      min(a_f),
-      max(a_i),
-      max(a_f),
-      avg(a_i),
-      avg(a_f),
-      count(*))
-----
-
-The example above shows a facet function with rollups over a single bucket, where the buckets are returned in descending order by the calculated value of the `sum(a_i)` metric.
-
-Example 2:
-
-[source,text]
-----
-facet(collection1,
-      q="*:*",
-      buckets="year_i, month_i, day_i",
-      bucketSorts="year_i desc, month_i desc, day_i desc",
-      bucketSizeLimit=100,
-      sum(a_i),
-      sum(a_f),
-      min(a_i),
-      min(a_f),
-      max(a_i),
-      max(a_f),
-      avg(a_i),
-      avg(a_f),
-      count(*))
-----
-
-The example above shows a facet function with rollups over three buckets, where the buckets are returned in descending order by bucket value.
-
-[[StreamingExpressions-features]]
-=== features
-
-The `features` function extracts the key terms from a text field in a classification training set stored in a SolrCloud collection. It uses an algorithm known as * Information Gain* , to select the important terms from the training set. The `features` function was designed to work specifically with the <<StreamingExpressions-train,train>> function, which uses the extracted features to train a text classifier.
-
-The `features` function is designed to work with a training set that provides both positive and negative examples of a class. It emits a tuple for each feature term that is extracted along with the inverse document frequency (IDF) for the term in the training set.
-
-The `features` function uses a query to select the training set from a collection. The IDF for each selected feature is calculated relative to the training set matching the query. This allows multiple training sets to be stored in the same SolrCloud collection without polluting the IDF across training sets.
-
-[[StreamingExpressions-Parameters.3]]
-==== Parameters
-
-* `collection`: (Mandatory) The collection that holds the training set
-* `q`: (Mandatory) The query that defines the training set. The IDF for the features will be generated specific to the result set matching the query.
-* `featureSet`: (Mandatory) The name of the feature set. This can be used to retrieve the features if they are stored in a SolrCloud collection.
-* `field`: (Mandatory) The text field to extract the features from.
-* `outcome`: (Mandatory) The field that defines the class, positive or negative
-* `numTerms`: (Mandatory) How many feature terms to extract.
-* `positiveLabel`: (defaults to 1) The value in the outcome field that defines a postive outcome.
-
-[[StreamingExpressions-Syntax.3]]
-==== Syntax
-
-[source,text]
-----
-features(collection1,
-         q="*:*",
-         featureSet="features1",
-         field="body",
-         outcome="out_i",
-         numTerms=250)
-----
-
-[[StreamingExpressions-gatherNodes]]
-=== gatherNodes
-
-The `gatherNodes` function provides breadth-first graph traversal. For details, see the section <<graph-traversal.adoc#graph-traversal,Graph Traversal>>.
-
-[[StreamingExpressions-model]]
-=== model
-
-The `model` function retrieves and caches logistic regression text classification models that are stored in a SolrCloud collection. The `model` function is designed to work with models that are created by the <<StreamingExpressions-train,train function>>, but can also be used to retrieve text classification models trained outside of Solr, as long as they conform to the specified format. After the model is retrieved it can be used by the <<StreamingExpressions-classify,classify function>> to classify documents.
-
-A single model tuple is fetched and returned based on the *id* parameter. The model is retrieved by matching the *id* parameter with a model name in the index. If more then one iteration of the named model is stored in the index, the highest iteration is selected.
-
-[[StreamingExpressions-Caching]]
-==== Caching
-
-The `model` function has an internal LRU (least-recently-used) cache so models do not have to be retrieved with each invocation of the `model` function. The time to cache for each model ID can be passed as a parameter to the function call. Retrieving a cached model does not reset the time for expiring the model ID in the cache.
-
-[[StreamingExpressions-ModelStorage]]
-==== Model Storage
-
-The storage format of the models in Solr is below. The `train` function outputs the format below so you only need to know schema details if you plan to use the `model` function with logistic regression models trained outside of Solr.
-
-* `name_s` (Single value, String, Stored): The name of the model.
-* `iteration_i` (Single value, Integer, Stored): The iteration number of the model. Solr can store all iterations of the models generated by the train function.
-* `terms_ss` (Multi value, String, Stored: The array of terms/features of the model.
-* `weights_ds` (Multi value, double, Stored): The array of term weights. Each weight corresponds by array index to a term.
-* `idfs_ds` (Multi value, double, Stored): The array of term IDFs (Inverse document frequency). Each IDF corresponds by array index to a term.
-
-[[StreamingExpressions-Parameters.4]]
-==== Parameters
-
-* `collection`: (Mandatory) The collection where the model is stored.
-* `id`: (Mandatory) The id/name of the model. The model function always returns one model. If there are multiple iterations of the name, the highest iteration is returned.
-* `cacheMillis`: (Optional) The amount of time to cache the model in the LRU cache.
-
-[[StreamingExpressions-Syntax.4]]
-==== Syntax
-
-[source,text]
-----
-model(modelCollection,
-      id="myModel"
-      cacheMillis="200000")
-----
-
-[[StreamingExpressions-random]]
-=== random
-
-The `random` function searches a SolrCloud collection and emits a pseudo-random set of results that match the query. Each invocation of random will return a different pseudo-random result set.
-
-[[StreamingExpressions-Parameters.5]]
-==== Parameters
-
-* `collection`: (Mandatory) The collection the stats will be aggregated from.
-* `q`: (Mandatory) The query to build the aggregations from.
-* `rows`: (Mandatory) The number of pseudo-random results to return.
-* fl: (Mandatory) The field list to return.
-* `fq`: (Optional) Filter query
-
-[[StreamingExpressions-Syntax.5]]
-==== Syntax
-
-[source,text]
-----
-random(baskets,
-       q="productID:productX",
-       rows="100",
-       fl="basketID")
-----
-
-In the example above the `random` function is searching the baskets collections for all rows where "productID:productX". It will return 100 pseudo-random results. The field list returned is the basketID.
-
-[[StreamingExpressions-significantTerms]]
-=== significantTerms
-
-The `significantTerms` function queries a SolrCloud collection, but instead of returning documents, it returns significant terms found in documents in the result set. The `significantTerms` function scores terms based on how frequently they appear in the result set and how rarely they appear in the entire corpus. The `significantTerms` function emits a tuple for each term which contains the term, the score, the foreground count and the background count. The foreground count is how many documents the term appears in in the result set. The background count is how many documents the term appears in in the entire corpus. The foreground and background counts are global for the collection.
-
-[[StreamingExpressions-Parameters.6]]
-==== Parameters
-
-* `collection`: (Mandatory) The collection that the function is run on.
-* `q`: (Mandatory) The query that describes the foreground document set.
-* `limit`: (Optional, Default 20) The max number of terms to return.
-* `minDocFreq`: (Optional, Defaults to 5 documents) The minimum number of documents the term must appear in on a shard. This is a float value. If greater then 1.0 then it's considered the absolute number of documents. If less then 1.0 it's treated as a percentage of documents.
-* `maxDocFreq`: (Optional, Defaults to 30% of documents) The maximum number of documents the term can appear in on a shard. This is a float value. If greater then 1.0 then it's considered the absolute number of documents. If less then 1.0 it's treated as a percentage of documents.
-* `minTermLength`: (Optional, Default 4) The minimum length of the term to be considered significant.
-
-[[StreamingExpressions-Syntax.6]]
-==== Syntax
-
-[source,text]
-----
-significantTerms(collection1,
-                 q="body:Solr",
-                 minDocFreq="10",
-                 maxDocFreq=".20",
-                 minTermLength="5")
-----
-
-In the example above the `significantTerms` function is querying `collection1` and returning at most 50 significant terms that appear in 10 or more documents but not more then 20% of the corpus.
-
-[[StreamingExpressions-shortestPath]]
-=== shortestPath
-
-The `shortestPath` function is an implementation of a shortest path graph traversal. The `shortestPath` function performs an iterative breadth-first search through an unweighted graph to find the shortest paths between two nodes in a graph. The `shortestPath` function emits a tuple for each path found. Each tuple emitted will contain a `path` key which points to a `List` of nodeIDs comprising the path.
-
-[[StreamingExpressions-Parameters.7]]
-==== Parameters
-
-* `collection`: (Mandatory) The collection that the topic query will be run on.
-* `from`: (Mandatory) The nodeID to start the search from
-* `to`: (Mandatory) The nodeID to end the search at
-* `edge`: (Mandatory) Syntax: `from_field=to_field`. The `from_field` defines which field to search from. The `to_field` defines which field to search to. See example below for a detailed explanation.
-* `threads`: (Optional : Default 6) The number of threads used to perform the partitioned join in the traversal.
-* `partitionSize`: (Optional : Default 250) The number of nodes in each partition of the join.
-* `fq`: (Optional) Filter query
-* `maxDepth`: (Mandatory) Limits to the search to a maximum depth in the graph.
-
-[[StreamingExpressions-Syntax.7]]
-==== Syntax
-
-[source,text]
-----
-shortestPath(collection,
-             from="john@company.com",
-             to="jane@company.com",
-             edge="from_address=to_address",
-             threads="6",
-             partitionSize="300",
-             fq="limiting query",
-             maxDepth="4")
-----
-
-The expression above performs a breadth-first search to find the shortest paths in an unweighted, directed graph.
-
-The search starts from the nodeID "\john@company.com" in the `from_address` field and searches for the nodeID "\jane@company.com" in the `to_address` field. This search is performed iteratively until the `maxDepth` has been reached. Each level in the traversal is implemented as a parallel partitioned nested loop join across the entire collection. The `threads` parameter controls the number of threads performing the join at each level, while the `partitionSize` parameter controls the of number of nodes in each join partition. The `maxDepth` parameter controls the number of levels to traverse. `fq` is a limiting query applied to each level in the traversal.
-
-[[StreamingExpressions-stats]]
-=== stats
-
-The `stats` function gathers simple aggregations for a search result set. The stats function does not support rollups over buckets, so the stats stream always returns a single tuple with the rolled up stats. Under the covers the stats function pushes down the generation of the stats into the search engine using the StatsComponent. The stats function currently supports the following metrics: `count(*)`, `sum()`, `avg()`, `min()`, and `max()`.
-
-[[StreamingExpressions-Parameters.8]]
-==== Parameters
-
-* `collection`: (Mandatory) Collection the stats will be aggregated from.
-* `q`: (Mandatory) The query to build the aggregations from.
-* `metrics`: (Mandatory) The metrics to include in the result tuple. Current supported metrics are `sum(col)`, `avg(col)`, `min(col)`, `max(col)` and `count(*)`
-
-[[StreamingExpressions-Syntax.8]]
-==== Syntax
-
-[source,text]
-----
-stats(collection1,
-      q=*:*,
-      sum(a_i),
-      sum(a_f),
-      min(a_i),
-      min(a_f),
-      max(a_i),
-      max(a_f),
-      avg(a_i),
-      avg(a_f),
-      count(*))
-----
-
-[[StreamingExpressions-timeseries]]
-=== timeseries
-
-//TODO
-
-[[StreamingExpressions-train]]
-=== train
-
-The `train` function trains a Logistic Regression text classifier on a training set stored in a SolrCloud collection. It uses a parallel iterative, batch Gradient Descent approach to train the model. The training algorithm is embedded inside Solr so with each iteration only the model is streamed across the network.
-
-The `train` function wraps a <<StreamingExpressions-features,features>> function which provides the terms and inverse document frequency (IDF) used to train the model. The `train` function operates over the same training set as the `features` function, which includes both positive and negative examples of the class.
-
-With each iteration the `train` function emits a tuple with the model. The model contains the feature terms, weights, and the confusion matrix for the model. The optimized model can then be used to classify documents based on their feature terms.
-
-[[StreamingExpressions-Parameters.9]]
-==== Parameters
-
-* `collection`: (Mandatory) Collection that holds the training set
-* `q`: (Mandatory) The query that defines the training set. The IDF for the features will be generated on the
-* `name`: (Mandatory) The name of model. This can be used to retrieve the model if they stored in a Solr Cloud collection.
-* `field`: (Mandatory) The text field to extract the features from.
-* `outcome`: (Mandatory) The field that defines the class, positive or negative
-* `maxIterations`: (Mandatory) How many training iterations to perform.
-* `positiveLabel`: (defaults to 1) The value in the outcome field that defines a positive outcome.
-
-[[StreamingExpressions-Syntax.9]]
-==== Syntax
-
-[source,text]
-----
-train(collection1,
-      features(collection1, q="*:*", featureSet="first", field="body", outcome="out_i", numTerms=250),
-      q="*:*",
-      name="model1",
-      field="body",
-      outcome="out_i",
-      maxIterations=100)
-----
-
-[[StreamingExpressions-topic]]
-=== topic
-
-The `topic` function provides publish/subscribe messaging capabilities built on top of SolrCloud. The topic function allows users to subscribe to a query. The function then provides one-time delivery of new or updated documents that match the topic query. The initial call to the topic function establishes the checkpoints for the specific topic ID. Subsequent calls to the same topic ID will return documents added or updated after the initial checkpoint. Each run of the topic query updates the checkpoints for the topic ID. Setting the initialCheckpoint parameter to 0 will cause the topic to process all documents in the index that match the topic query.
-
-[WARNING]
-====
-The topic function should be considered in beta until https://issues.apache.org/jira/browse/SOLR-8709[SOLR-8709] is committed and released.
-====
-
-[[StreamingExpressions-Parameters.10]]
-==== Parameters
-
-* `checkpointCollection`: (Mandatory) The collection where the topic checkpoints are stored.
-* `collection`: (Mandatory) The collection that the topic query will be run on.
-* `id`: (Mandatory) The unique ID for the topic. The checkpoints will be saved under this id.
-* `q`: (Mandatory) The topic query.
-* `fl`: (Mandatory) The field list returned by the topic function.
-* `initialCheckpoint`: (Optional) Sets the initial Solr `\_version_` number to start reading from the queue. If not set, it defaults to the highest version in the index. Setting to 0 will process all records that match query in the index.
-
-[[StreamingExpressions-Syntax.10]]
-==== Syntax
-
-[source,text]
-----
-topic(checkpointCollection,
-      collection,
-      id="uniqueId",
-      q="topic query",
-      fl="id, name, country")
-----
-
-[[StreamingExpressions-StreamDecorators]]
-== Stream Decorators
-
-Stream decorators wrap other stream functions or perform operations on the stream.
-
-
-=== cartesianProduct
-//TODO
-
-=== cell
-//TODO
-
-[[StreamingExpressions-classify]]
-=== classify
-
-The `classify` function classifies tuples using a logistic regression text classification model. It was designed specifically to work with models trained using the <<StreamingExpressions-train,train function>>. The `classify` function uses the <<StreamingExpressions-model,model function>> to retrieve a stored model and then scores a stream of tuples using the model. The tuples read by the classifier must contain a text field that can be used for classification. The classify function uses a Lucene analyzer to extract the features from the text so the model can be applied. By default the `classify` function looks for the analyzer using the name of text field in the tuple. If the Solr schema on the worker node does not contain this field, the analyzer can be looked up in another field by specifying the `analyzerField` parameter.
-
-Each tuple that is classified is assigned two scores:
-
-* probability_d* : A float between 0 and 1 which describes the probability that the tuple belongs to the class. This is useful in the classification use case.
-
-* score_d* : The score of the document that has not be squashed between 0 and 1. The score may be positive or negative. The higher the score the better the document fits the class. This un-squashed score will be useful in query re-ranking and recommendation use cases. This score is particularly useful when multiple high ranking documents have a probability_d score of 1, which won't provide a meaningful ranking between documents.
-
-[[StreamingExpressions-Parameters.11]]
-==== Parameters
-
-* `model expression`: (Mandatory) Retrieves the stored logistic regression model.
-* `field`: (Mandatory) The field in the tuples to apply the classifier to. By default the analyzer for this field in the schema will be used extract the features.
-* `analyzerField`: (Optional) Specifies a different field to find the analyzer from in the schema.
-
-[[StreamingExpressions-Syntax.11]]
-==== Syntax
-
-[source,text]
-----
-classify(model(modelCollection,
-             id="model1",
-             cacheMillis=5000),
-         search(contentCollection,
-             q="id:(a b c)",
-             fl="text_t, id",
-             sort="id asc"),
-             field="text_t")
-----
-
-In the example above the `classify expression` is retrieving the model using the `model` function. It is then classifying tuples returned by the `search` function. The `text_t` field is used for the text classification and the analyzer for the `text_t` field in the Solr schema is used to analyze the text and extract the features.
-
-[[StreamingExpressions-commit]]
-=== commit
-
-The `commit` function wraps a single stream (A) and given a collection and batch size will send commit messages to the collection when the batch size is fulfilled or the end of stream is reached. A commit stream is used most frequently with an update stream and as such the commit will take into account possible summary tuples coming from the update stream. All tuples coming into the commit stream will be returned out of the commit stream - no tuples will be dropped and no tuples will be added.
-
-[[StreamingExpressions-Parameters.12]]
-==== Parameters
-
-* `collection`: The collection to send commit messages to (required)
-* `batchSize`: The commit batch size, sends commit message when batch size is hit. If not provided (or provided as value 0) then a commit is only sent at the end of the incoming stream.
-* `waitFlush`: The value passed directly to the commit handler (true/false, default: false)
-* `waitSearcher`: The value passed directly to the commit handler (true/false, default: false)
-* `softCommit`: The value passed directly to the commit handler (true/false, default: false)
-* `StreamExpression for StreamA` (required)
-
-[[StreamingExpressions-Syntax.12]]
-==== Syntax
-
-[source,text]
-----
-commit(
-    destinationCollection,
-    batchSize=2,
-    update(
-        destinationCollection,
-        batchSize=5,
-        search(collection1, q=*:*, fl="id,a_s,a_i,a_f,s_multi,i_multi", sort="a_f asc, a_i asc")
-    )
-)
-----
-
-[[StreamingExpressions-complement]]
-=== complement
-
-The `complement` function wraps two streams (A and B) and emits tuples from A which do not exist in B. The tuples are emitted in the order in which they appear in stream A. Both streams must be sorted by the fields being used to determine equality (using the `on` parameter).
-
-[[StreamingExpressions-Parameters.13]]
-==== Parameters
-
-* `StreamExpression for StreamA`
-* `StreamExpression for StreamB`
-* `on`: Fields to be used for checking equality of tuples between A and B. Can be of the format `on="fieldName"`, `on="fieldNameInLeft=fieldNameInRight"`, or `on="fieldName, otherFieldName=rightOtherFieldName"`.
-
-[[StreamingExpressions-Syntax.13]]
-==== Syntax
-
-[source,text]
-----
-complement(
-  search(collection1, q=a_s:(setA || setAB), fl="id,a_s,a_i", sort="a_i asc, a_s asc"),
-  search(collection1, q=a_s:(setB || setAB), fl="id,a_s,a_i", sort="a_i asc"),
-  on="a_i"
-)
-
-complement(
-  search(collection1, q=a_s:(setA || setAB), fl="id,a_s,a_i", sort="a_i asc, a_s asc"),
-  search(collection1, q=a_s:(setB || setAB), fl="id,a_s,a_i", sort="a_i asc, a_s asc"),
-  on="a_i,a_s"
-)
-----
-
-[[StreamingExpressions-daemon]]
-=== daemon
-
-The `daemon` function wraps another function and runs it at intervals using an internal thread. The `daemon` function can be used to provide both continuous push and pull streaming.
-
-[[StreamingExpressions-Continuouspushstreaming]]
-==== Continuous Push Streaming
-
-With continuous push streaming the `daemon` function wraps another function and is then sent to the `/stream` handler for execution. The `/stream` handler recognizes the `daemon` function and keeps it resident in memory, so it can run its internal function at intervals.
-
-In order to facilitate the pushing of tuples, the `daemon` function must wrap another stream decorator that pushes the tuples somewhere. One example of this is the `update` function, which wraps a stream and sends the tuples to another SolrCloud collection for indexing.
-
-[[StreamingExpressions-Syntax.14]]
-==== Syntax
-
-[source,text]
-----
-daemon(id="uniqueId",
-       runInterval="1000",
-       terminate="true",
-       update(destinationCollection,
-              batchSize=100,
-              topic(checkpointCollection,
-                    topicCollection,
-                    q="topic query",
-                    fl="id, title, abstract, text",
-                    id="topicId",
-                    initialCheckpoint=0)
-               )
-        )
-----
-
-The sample code above shows a `daemon` function wrapping an `update` function, which is wrapping a `topic` function. When this expression is sent to the `/stream` handler, the `/stream` hander sees the `daemon` function and keeps it in memory where it will run at intervals. In this particular example, the `daemon` function will run the `update` function every second. The `update` function is wrapping a <<StreamingExpressions-topic,`topic` function>>, which will stream tuples that match the `topic` function query in batches. Each subsequent call to the topic will return the next batch of tuples for the topic. The `update` function will send all the tuples matching the topic to another collection to be indexed. The `terminate` parameter tells the daemon to terminate when the `topic` function stops sending tuples.
-
-The effect of this is to push documents that match a specific query into another collection. Custom push functions can be plugged in that push documents out of Solr and into other systems, such as Kafka or an email system.
-
-Push streaming can also be used for continuous background aggregation scenarios where aggregates are rolled up in the background at intervals and pushed to other Solr collections. Another use case is continuous background machine learning model optimization, where the optimized model is pushed to another Solr collection where it can be integrated into queries.
-
-The `/stream` handler supports a small set commands for listing and controlling daemon functions:
-
-[source,text]
-----
-http://localhost:8983/collection/stream?action=list
-----
-
-This command will provide a listing of the current daemon's running on the specific node along with there current state.
-
-[source,text]
-----
-http://localhost:8983/collection/stream?action=stop&id=daemonId
-----
-
-This command will stop a specific daemon function but leave it resident in memory.
-
-[source,text]
-----
-http://localhost:8983/collection/stream?action=start&id=daemonId
-----
-
-This command will start a specific daemon function that has been stopped.
-
-[source,text]
-----
-http://localhost:8983/collection/stream?action=kill&id=daemonId
-----
-
-This command will stop a specific daemon function and remove it from memory.
-
-[[StreamingExpressions-ContinousPullStreaming]]
-==== Continuous Pull Streaming
-
-The {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/io/stream/DaemonStream.html[DaemonStream] java class (part of the SolrJ libraries) can also be embedded in a java application to provide continuous pull streaming. Sample code:
-
-[source,java]
-----
-StreamContext context = new StreamContext()
-SolrClientCache cache = new SolrClientCache();
-context.setSolrClientCache(cache);
-
-Map topicQueryParams = new HashMap();
-topicQueryParams.put("q","hello");  // The query for the topic
-topicQueryparams.put("rows", "500"); // How many rows to fetch during each run
-topicQueryparams.put("fl", "id", "title"); // The field list to return with the documents
-
-TopicStream topicStream = new TopicStream(zkHost,        // Host address for the zookeeper service housing the collections
-                                         "checkpoints",  // The collection to store the topic checkpoints
-                                         "topicData",    // The collection to query for the topic records
-                                         "topicId",      // The id of the topic
-                                         -1,             // checkpoint every X tuples, if set -1 it will checkpoint after each run.
-                                          topicQueryParams); // The query parameters for the TopicStream
-
-DaemonStream daemonStream = new DaemonStream(topicStream,             // The underlying stream to run.
-                                             "daemonId",              // The id of the daemon
-                                             1000,                    // The interval at which to run the internal stream
-                                             500);                    // The internal queue size for the daemon stream. Tuples will be placed in the queue
-                                                                      // as they are read by the internal internal thread.
-                                                                      // Calling read() on the daemon stream reads records from the internal queue.
-
-daemonStream.setStreamContext(context);
-
-daemonStream.open();
-
-//Read until it's time to shutdown the DaemonStream. You can define the shutdown criteria.
-while(!shutdown()) {
-    Tuple tuple = daemonStream.read() // This will block until tuples become available from the underlying stream (TopicStream)
-                                      // The EOF tuple (signaling the end of the stream) will never occur until the DaemonStream has been shutdown.
-    //Do something with the tuples
-}
-
-// Shutdown the DaemonStream.
-daemonStream.shutdown();
-
-//Read the DaemonStream until the EOF Tuple is found.
-//This allows the underlying stream to perform an orderly shutdown.
-
-while(true) {
-    Tuple tuple = daemonStream.read();
-    if(tuple.EOF) {
-        break;
-    } else {
-        //Do something with the tuples.
-    }
-}
-//Finally close the stream
-daemonStream.close();
-----
-
-[[StreamingExpressions-eval]]
-=== eval
-
-//todo
-
-[[StreamingExpressions-executor]]
-=== executor
-
-The `executor` function wraps a stream source that contains streaming expressions, and executes the expressions in parallel. The `executor` function looks for the expression in the `expr_s` field in each tuple. The `executor` function has an internal thread pool that runs tasks that compile and run expressions in parallel on the same worker node. This function can also be parallelized across worker nodes by wrapping it in the <<StreamingExpressions-parallel,`parallel`>> function to provide parallel execution of expressions across a cluster.
-
-The `executor` function does not do anything specific with the output of the expressions that it runs. Therefore the expressions that are executed must contain the logic for pushing tuples to their destination. The <<StreamingExpressions-update,update function>> can be included in the expression being executed to send the tuples to a SolrCloud collection for storage.
-
-This model allows for asynchronous execution of jobs where the output is stored in a SolrCloud collection where it can be accessed as the job progresses.
-
-[[StreamingExpressions-Parameters.14]]
-==== Parameters
-
-* `threads`: (Optional) The number of threads in the executors thread pool for executing expressions.
-* `StreamExpression`: (Mandatory) The stream source which contains the Streaming Expressions to execute.
-
-[[StreamingExpressions-Syntax.15]]
-==== Syntax
-
-[source,text]
-----
-daemon(id="myDaemon",
-       terminate="true",
-       executor(threads=10,
-                topic(checkpointCollection
-                      storedExpressions,
-                      q="*:*",
-                      fl="id, expr_s",
-                      initialCheckPoint=0,
-                      id="myTopic")))
-----
-
-In the example above a <<StreamingExpressions-daemon,daemon>> wraps an executor**,** which wraps a <<StreamingExpressions-topic,topic>> that is returning tuples with expressions to execute. When sent to the stream handler, the daemon will call the executor at intervals which will cause the executor to read from the topic and execute the expressions found in the `expr_s` field. The daemon will repeatedly call the executor until all the tuples that match the topic have been iterated, then it will terminate. This is the approach for executing batches of streaming expressions from a `topic` queue.
-
-[[StreamingExpressions-fetch]]
-=== fetch
-
-The `fetch` function iterates a stream and fetches additional fields and adds them to the tuples. The `fetch` function fetches in batches to limit the number of calls back to Solr. Tuples streamed from the `fetch` function will contain the original fields and the additional fields that were fetched. The `fetch` function supports one-to-one fetches. Many-to-one fetches, where the stream source contains duplicate keys, will also work, but one-to-many fetches are currently not supported by this function.
-
-[[StreamingExpressions-Parameters.15]]
-==== Parameters
-
-* `Collection`: (Mandatory) The collection to fetch the fields from.
-* `StreamExpression`: (Mandatory) The stream source for the fetch function.
-* `fl`: (Mandatory) The fields to be fetched.
-* `on`: Fields to be used for checking equality of tuples between stream source and fetched records. Formatted as `on="fieldNameInTuple=fieldNameInCollection"`.
-* `batchSize`: (Optional) The batch fetch size.
-
-[[StreamingExpressions-Syntax.16]]
-==== Syntax
-
-[source,text]
-----
-fetch(addresses,
-      search(people, q="*:*", fl="username, firstName, lastName", sort="username asc"),
-      fl="streetAddress, city, state, country, zip",
-      on="username=userId")
-----
-
-The example above fetches addresses for users by matching the username in the tuple with the userId field in the addresses collection.
-
-[[StreamingExpressions-having]]
-=== having
-
-The `having` expression wraps a stream and applies a boolean operation to each tuple. It emits only tuples for which the boolean operation returns *true*.
-
-[[StreamingExpressions-Parameters.16]]
-==== Parameters
-
-* `StreamExpression`: (Mandatory) The stream source for the having function.
-* `booleanEvaluator`: (Madatory) The following boolean operations are supported: *eq* (equals), *gt* (greater than), *lt* (less than), *gteq* (greater than or equal to), *lteq* (less than or equal to), *and*, *or, eor* (exclusive or), and *not*. Boolean evaluators can be nested with other evaluators to form complex boolean logic.
-
-The comparison evaluators compare the value in a specific field with a value, whether a string, number, or boolean. For example: *eq*(field1, 10), returns true if *field1* is equal to 10.
-
-[[StreamingExpressions-Syntax.17]]
-==== Syntax
-
-[source,text]
-----
-having(rollup(over=a_s,
-              sum(a_i),
-              search(collection1,
-                     q=*:*,
-                     fl="id,a_s,a_i,a_f",
-                     sort="a_s asc")),
-       and(gt(sum(a_i), 100), lt(sum(a_i), 110)))
-
-----
-
-In this example, the `having` expression iterates the aggregated tuples from the `rollup` expression and emits all tuples where the field `sum(a_i)` is greater then 100 and less then 110.
-
-[[StreamingExpressions-leftOuterJoin]]
-=== leftOuterJoin
-
-The `leftOuterJoin` function wraps two streams, Left and Right, and emits tuples from Left. If there is a tuple in Right equal (as defined by `on`) then the values in that tuple will be included in the emitted tuple. An equal tuple in Right *need not* exist for the Left tuple to be emitted. This supports one-to-one, one-to-many, many-to-one, and many-to-many left outer join scenarios. The tuples are emitted in the order in which they appear in the Left stream. Both streams must be sorted by the fields being used to determine equality (using the `on` parameter). If both tuples contain a field of the same name then the value from the Right stream will be used in the emitted tuple.
-
-You can wrap the incoming streams with a `select` function to be specific about which field values are included in the emitted tuple.
-
-[[StreamingExpressions-Parameters.17]]
-==== Parameters
-
-* `StreamExpression for StreamLeft`
-* `StreamExpression for StreamRight`
-* `on`: Fields to be used for checking equality of tuples between Left and Right. Can be of the format `on="fieldName"`, `on="fieldNameInLeft=fieldNameInRight"`, or `on="fieldName, otherFieldName=rightOtherFieldName"`.
-
-[[StreamingExpressions-Syntax.18]]
-==== Syntax
-
-[source,text]
-----
-leftOuterJoin(
-  search(people, q=*:*, fl="personId,name", sort="personId asc"),
-  search(pets, q=type:cat, fl="personId,petName", sort="personId asc"),
-  on="personId"
-)
-
-leftOuterJoin(
-  search(people, q=*:*, fl="personId,name", sort="personId asc"),
-  search(pets, q=type:cat, fl="ownerId,petName", sort="ownerId asc"),
-  on="personId=ownerId"
-)
-
-leftOuterJoin(
-  search(people, q=*:*, fl="personId,name", sort="personId asc"),
-  select(
-    search(pets, q=type:cat, fl="ownerId,name", sort="ownerId asc"),
-    ownerId,
-    name as petName
-  ),
-  on="personId=ownerId"
-)
-----
-
-[[StreamingExpressions-hashJoin]]
-=== hashJoin
-
-The `hashJoin` function wraps two streams, Left and Right, and for every tuple in Left which exists in Right will emit a tuple containing the fields of both tuples. This supports one-to-one, one-to-many, many-to-one, and many-to-many inner join scenarios. The tuples are emitted in the order in which they appear in the Left stream. The order of the streams does not matter. If both tuples contain a field of the same name then the value from the Right stream will be used in the emitted tuple.
-
-You can wrap the incoming streams with a `select` function to be specific about which field values are included in the emitted tuple.
-
-The hashJoin function can be used when the tuples of Left and Right cannot be put in the same order. Because the tuples are out of order this stream functions by reading all values from the Right stream during the open operation and will store all tuples in memory. The result of this is a memory footprint equal to the size of the Right stream.
-
-[[StreamingExpressions-Parameters.18]]
-==== Parameters
-
-* `StreamExpression for StreamLeft`
-* `hashed=StreamExpression for StreamRight`
-* `on`: Fields to be used for checking equality of tuples between Left and Right. Can be of the format `on="fieldName"`, `on="fieldNameInLeft=fieldNameInRight"`, or `on="fieldName, otherFieldName=rightOtherFieldName"`.
-
-[[StreamingExpressions-Syntax.19]]
-==== Syntax
-
-[source,text]
-----
-hashJoin(
-  search(people, q=*:*, fl="personId,name", sort="personId asc"),
-  hashed=search(pets, q=type:cat, fl="personId,petName", sort="personId asc"),
-  on="personId"
-)
-
-hashJoin(
-  search(people, q=*:*, fl="personId,name", sort="personId asc"),
-  hashed=search(pets, q=type:cat, fl="ownerId,petName", sort="ownerId asc"),
-  on="personId=ownerId"
-)
-
-hashJoin(
-  search(people, q=*:*, fl="personId,name", sort="personId asc"),
-  hashed=select(
-    search(pets, q=type:cat, fl="ownerId,name", sort="ownerId asc"),
-    ownerId,
-    name as petName
-  ),
-  on="personId=ownerId"
-)
-----
-
-[[StreamingExpressions-innerJoin]]
-=== innerJoin
-
-Wraps two streams Left and Right and for every tuple in Left which exists in Right will emit a tuple containing the fields of both tuples. This supports one-one, one-many, many-one, and many-many inner join scenarios. The tuples are emitted in the order in which they appear in the Left stream. Both streams must be sorted by the fields being used to determine equality (the 'on' parameter). If both tuples contain a field of the same name then the value from the Right stream will be used in the emitted tuple. You can wrap the incoming streams with a select(...) to be specific about which field values are included in the emitted tuple.
-
-[[StreamingExpressions-Parameters.19]]
-==== Parameters
-
-* `StreamExpression for StreamLeft`
-* `StreamExpression for StreamRight`
-* `on`: Fields to be used for checking equality of tuples between Left and Right. Can be of the format `on="fieldName"`, `on="fieldNameInLeft=fieldNameInRight"`, or `on="fieldName, otherFieldName=rightOtherFieldName"`.
-
-[[StreamingExpressions-Syntax.20]]
-==== Syntax
-
-[source,text]
-----
-innerJoin(
-  search(people, q=*:*, fl="personId,name", sort="personId asc"),
-  search(pets, q=type:cat, fl="personId,petName", sort="personId asc"),
-  on="personId"
-)
-
-innerJoin(
-  search(people, q=*:*, fl="personId,name", sort="personId asc"),
-  search(pets, q=type:cat, fl="ownerId,petName", sort="ownerId asc"),
-  on="personId=ownerId"
-)
-
-innerJoin(
-  search(people, q=*:*, fl="personId,name", sort="personId asc"),
-  select(
-    search(pets, q=type:cat, fl="ownerId,name", sort="ownerId asc"),
-    ownerId,
-    name as petName
-  ),
-  on="personId=ownerId"
-)
-----
-
-[[StreamingExpressions-intersect]]
-=== intersect
-
-The `intersect` function wraps two streams, A and B, and emits tuples from A which *DO* exist in B. The tuples are emitted in the order in which they appear in stream A. Both streams must be sorted by the fields being used to determine equality (the `on` parameter). Only tuples from A are emitted.
-
-[[StreamingExpressions-Parameters.20]]
-==== Parameters
-
-* `StreamExpression for StreamA`
-* `StreamExpression for StreamB`
-* `on`: Fields to be used for checking equality of tuples between A and B. Can be of the format `on="fieldName"`, `on="fieldNameInLeft=fieldNameInRight"`, or `on="fieldName, otherFieldName=rightOtherFieldName"`.
-
-[[StreamingExpressions-Syntax.21]]
-==== Syntax
-
-[source,text]
-----
-intersect(
-  search(collection1, q=a_s:(setA || setAB), fl="id,a_s,a_i", sort="a_i asc, a_s asc"),
-  search(collection1, q=a_s:(setB || setAB), fl="id,a_s,a_i", sort="a_i asc"),
-  on="a_i"
-)
-
-intersect(
-  search(collection1, q=a_s:(setA || setAB), fl="id,a_s,a_i", sort="a_i asc, a_s asc"),
-  search(collection1, q=a_s:(setB || setAB), fl="id,a_s,a_i", sort="a_i asc, a_s asc"),
-  on="a_i,a_s"
-)
-----
-
-[[StreamingExpressions-merge]]
-=== merge
-
-The `merge` function merges two or more streaming expressions and maintains the ordering of the underlying streams. Because the order is maintained, the sorts of the underlying streams must line up with the on parameter provided to the merge function.
-
-[[StreamingExpressions-Parameters.21]]
-==== Parameters
-
-* `StreamExpression A`
-* `StreamExpression B`
-* `Optional StreamExpression C,D,....Z`
-* `on`: Sort criteria for performing the merge. Of the form `fieldName order` where order is `asc` or `desc`. Multiple fields can be provided in the form `fieldA order, fieldB order`.
-
-[[StreamingExpressions-Syntax.22]]
-==== Syntax
-
-[source,text]
-----
-# Merging two stream expressions together
-merge(
-      search(collection1,
-             q="id:(0 3 4)",
-             fl="id,a_s,a_i,a_f",
-             sort="a_f asc"),
-      search(collection1,
-             q="id:(1)",
-             fl="id,a_s,a_i,a_f",
-             sort="a_f asc"),
-      on="a_f asc")
-----
-
-[source,text]
-----
-# Merging four stream expressions together. Notice that while the sorts of each stream are not identical they are
-# comparable. That is to say the first N fields in each stream's sort matches the N fields in the merge's on clause.
-merge(
-      search(collection1,
-             q="id:(0 3 4)",
-             fl="id,fieldA,fieldB,fieldC",
-             sort="fieldA asc, fieldB desc"),
-      search(collection1,
-             q="id:(1)",
-             fl="id,fieldA",
-             sort="fieldA asc"),
-      search(collection2,
-             q="id:(10 11 13)",
-             fl="id,fieldA,fieldC",
-             sort="fieldA asc"),
-      search(collection3,
-             q="id:(987)",
-             fl="id,fieldA,fieldC",
-             sort="fieldA asc"),
-      on="fieldA asc")
-----
-
-[[StreamingExpressions-list]]
-=== list
-// TODO
-
-[[StreamingExpressions-null]]
-=== null
-
-The null expression is a useful utility function for understanding bottlenecks when performing parallel relational algebra (joins, intersections, rollups etc.). The null function reads all the tuples from an underlying stream and returns a single tuple with the count and processing time. Because the null stream adds minimal overhead of it's own, it can be used to isolate the performance of Solr's /export handler. If the /export handlers performance is not the bottleneck, then the bottleneck is likely occurring in the workers where the stream decorators are running.
-
-The null expression can be wrapped by the parallel function and sent to worker nodes. In this scenario each worker will return one tuple with the count of tuples processed on the worker and the timing information for that worker. This gives valuable information such as:
-
-1.  As more workers are added does the performance of the /export handler improve or not.
-2.  Are tuples being evenly distributed across the workers, or is the hash partitioning sending more documents to a single worker.
-3.  Are all workers processing data at the same speed, or is one of the workers the source of the bottleneck.
-
-[[StreamingExpressions-Parameters.22]]
-==== Parameters
-
-* `StreamExpression`: (Mandatory) The expression read by the null function.
-
-[[StreamingExpressions-Syntax.23]]
-==== Syntax
-
-[source,text]
-----
- parallel(workerCollection,
-          null(search(collection1, q=*:*, fl="id,a_s,a_i,a_f", sort="a_s desc", qt="/export", partitionKeys="a_s")),
-          workers="20",
-          zkHost="localhost:9983",
-          sort="a_s desc")
-----
-
-The expression above shows a parallel function wrapping a null function. This will cause the null function to be run in parallel across 20 worker nodes. Each worker will return a single tuple with number of tuples processed and time it took to iterate the tuples.
-
-[[StreamingExpressions-outerHashJoin]]
-=== outerHashJoin
-
-The `outerHashJoin` function wraps two streams, Left and Right, and emits tuples from Left. If there is a tuple in Right equal (as defined by the `on` parameter) then the values in that tuple will be included in the emitted tuple. An equal tuple in Right *need not* exist for the Left tuple to be emitted. This supports one-to-one, one-to-many, many-to-one, and many-to-many left outer join scenarios. The tuples are emitted in the order in which they appear in the Left stream. The order of the streams does not matter. If both tuples contain a field of the same name then the value from the Right stream will be used in the emitted tuple.
-
-You can wrap the incoming streams with a `select` function to be specific about which field values are included in the emitted tuple.
-
-The outerHashJoin stream can be used when the tuples of Left and Right cannot be put in the same order. Because the tuples are out of order, this stream functions by reading all values from the Right stream during the open operation and will store all tuples in memory. The result of this is a memory footprint equal to the size of the Right stream.
-
-[[StreamingExpressions-Parameters.23]]
-==== Parameters
-
-* `StreamExpression for StreamLeft`
-* `hashed=StreamExpression for StreamRight`
-* `on`: Fields to be used for checking equality of tuples between Left and Right. Can be of the format `on="fieldName"`, `on="fieldNameInLeft=fieldNameInRight"`, or `on="fieldName, otherFieldName=rightOtherFieldName"`.
-
-[[StreamingExpressions-Syntax.24]]
-==== Syntax
-
-[source,text]
-----
-outerHashJoin(
-  search(people, q=*:*, fl="personId,name", sort="personId asc"),
-  hashed=search(pets, q=type:cat, fl="personId,petName", sort="personId asc"),
-  on="personId"
-)
-
-outerHashJoin(
-  search(people, q=*:*, fl="personId,name", sort="personId asc"),
-  hashed=search(pets, q=type:cat, fl="ownerId,petName", sort="ownerId asc"),
-  on="personId=ownerId"
-)
-
-outerHashJoin(
-  search(people, q=*:*, fl="personId,name", sort="personId asc"),
-  hashed=select(
-    search(pets, q=type:cat, fl="ownerId,name", sort="ownerId asc"),
-    ownerId,
-    name as petName
-  ),
-  on="personId=ownerId"
-)
-----
-
-[[StreamingExpressions-parallel]]
-=== parallel
-
-The `parallel` function wraps a streaming expression and sends it to N worker nodes to be processed in parallel.
-
-The parallel function requires that the `partitionKeys` parameter be provided to the underlying searches. The `partitionKeys` parameter will partition the search results (tuples) across the worker nodes. Tuples with the same values in the partitionKeys field will be shuffled to the same worker nodes.
-
-The parallel function maintains the sort order of the tuples returned by the worker nodes, so the sort criteria of the parallel function must match up with the sort order of the tuples returned by the workers.
-
-.Worker Collections
-[TIP]
-====
-The worker nodes can be from the same collection as the data, or they can be a different collection entirely, even one that only exists for parallel streaming expressions. A worker collection can be any SolrCloud collection that has the `/stream` handler configured. Unlike normal SolrCloud collections, worker collections don't have to hold any data. Worker collections can be empty collections that exist only to execute streaming expressions.
-====
-
-[[StreamingExpressions-Parameters.24]]
-==== Parameters
-
-* `collection`: Name of the worker collection to send the StreamExpression to.
-* `StreamExpression`: Expression to send to the worker collection.
-* `workers`: Number of workers in the worker collection to send the expression to.
-* `zkHost`: (Optional) The ZooKeeper connect string where the worker collection resides.
-* `sort`: The sort criteria for ordering tuples returned by the worker nodes.
-
-[[StreamingExpressions-Syntax.25]]
-==== Syntax
-
-[source,text]
-----
- parallel(workerCollection,
-          reduce(search(collection1, q=*:*, fl="id,a_s,a_i,a_f", sort="a_s desc", partitionKeys="a_s"),
-                 by="a_s",
-                 group(sort="a_f desc", n="4")),
-          workers="20",
-          zkHost="localhost:9983",
-          sort="a_s desc")
-----
-
-The expression above shows a `parallel` function wrapping a `reduce` function. This will cause the `reduce` function to be run in parallel across 20 worker nodes.
-
-[[StreamingExpressions-priority]]
-=== priority
-
-The `priority` function is a simple priority scheduler for the <<StreamingExpressions-executor,executor>> function. The executor function doesn't directly have a concept of task prioritization; instead it simply executes tasks in the order that they are read from it's underlying stream. The `priority` function provides the ability to schedule a higher priority task ahead of lower priority tasks that were submitted earlier.
-
-The `priority` function wraps two <<StreamingExpressions-topic,topics>> that are both emitting tuples that contain streaming expressions to execute. The first topic is considered the higher priority task queue.
-
-Each time the `priority` function is called, it checks the higher priority task queue to see if there are any tasks to execute. If tasks are waiting in the higher priority queue then the priority function will emit the higher priority tasks. If there are no high priority tasks to run, the lower priority queue tasks are emitted.
-
-The `priority` function will only emit a batch of tasks from one of the queues each time it is called. This ensures that no lower priority tasks are executed until the higher priority queue has no tasks to run.
-
-[[StreamingExpressions-Parameters.25]]
-==== Parameters
-
-* `topic expression`: (Mandatory) the high priority task queue
-* `topic expression`: (Mandatory) the lower priority task queue
-
-[[StreamingExpressions-Syntax.26]]
-==== Syntax
-
-[source,text]
-----
-daemon(id="myDaemon",
-       executor(threads=10,
-                priority(topic(checkpointCollection, storedExpressions, q="priority:high", fl="id, expr_s", initialCheckPoint=0,id="highPriorityTasks"),
-                         topic(checkpointCollection, storedExpressions, q="priority:low", fl="id, expr_s", initialCheckPoint=0,id="lowPriorityTasks"))))
-----
-
-In the example above the `daemon` function is calling the executor iteratively. Each time it's called, the `executor` function will execute the tasks emitted by the `priority` function. The `priority` function wraps two topics. The first topic is the higher priority task queue, the second topics is the lower priority topic.
-
-[[StreamingExpressions-reduce]]
-=== reduce
-
-The `reduce` function wraps an internal stream and groups tuples by common fields.
-
-Each tuple group is operated on as a single block by a pluggable reduce operation. The group operation provided with Solr implements distributed grouping functionality. The group operation also serves as an example reduce operation that can be referred to when building custom reduce operations.
-
-[IMPORTANT]
-====
-The reduce function relies on the sort order of the underlying stream. Accordingly the sort order of the underlying stream must be aligned with the group by field.
-====
-
-[[StreamingExpressions-Parameters.26]]
-==== Parameters
-
-* `StreamExpression`: (Mandatory)
-* `by`: (Mandatory) A comma separated list of fields to group by.
-* `Reduce Operation`: (Mandatory)
-
-[[StreamingExpressions-Syntax.27]]
-==== Syntax
-
-[source,text]
-----
-reduce(search(collection1, q=*:*, fl="id,a_s,a_i,a_f", sort="a_s asc, a_f asc"),
-       by="a_s",
-       group(sort="a_f desc", n="4")
-)
-----
-
-[[StreamingExpressions-rollup]]
-=== rollup
-
-The `rollup` function wraps another stream function and rolls up aggregates over bucket fields. The rollup function relies on the sort order of the underlying stream to rollup aggregates one grouping at a time. Accordingly, the sort order of the underlying stream must match the fields in the `over` parameter of the rollup function.
-
-The rollup function also needs to process entire result sets in order to perform its aggregations. When the underlying stream is the `search` function, the `/export` handler can be used to provide full sorted result sets to the rollup function. This sorted approach allows the rollup function to perform aggregations over very high cardinality fields. The disadvantage of this approach is that the tuples must be sorted and streamed across the network to a worker node to be aggregated. For faster aggregation over low to moderate cardinality fields, the `facet` function can be used.
-
-[[StreamingExpressions-Parameters.27]]
-==== Parameters
-
-* `StreamExpression` (Mandatory)
-* `over`: (Mandatory) A list of fields to group by.
-* `metrics`: (Mandatory) The list of metrics to compute. Currently supported metrics are `sum(col)`, `avg(col)`, `min(col)`, `max(col)`, `count(*)`.
-
-[[StreamingExpressions-Syntax.28]]
-==== Syntax
-
-[source,text]
-----
-rollup(
-   search(collection1, q=*:*, fl="a_s,a_i,a_f", qt="/export", sort="a_s asc"),
-   over="a_s",
-   sum(a_i),
-   sum(a_f),
-   min(a_i),
-   min(a_f),
-   max(a_i),
-   max(a_f),
-   avg(a_i),
-   avg(a_f),
-   count(*)
-)
-----
-
-The example about shows the rollup function wrapping the search function. Notice that search function is using the `/export` handler to provide the entire result set to the rollup stream. Also notice that the search function's *sort param* matches up with the rollup's `over` parameter. This allows the rollup function to rollup the over the `a_s` field, one group at a time.
-
-[[StreamingExpressions-scoreNodes]]
-=== scoreNodes
-
-See section in <<graph-traversal.adoc#GraphTraversal-UsingthescoreNodesFunctiontoMakeaRecommendation,graph traversal>>.
-
-[[StreamingExpressions-select]]
-=== select
-
-The `select` function wraps a streaming expression and outputs tuples containing a subset or modified set of fields from the incoming tuples. The list of fields included in the output tuple can contain aliases to effectively rename fields. The select stream supports both operations and evaluators. One can provide a list of operations and evaluators to perform on any fields, such as `replace, add, if`, etc....
-
-[[StreamingExpressions-Parameters.28]]
-==== Parameters
-
-* `StreamExpression`
-* `fieldName`: name of field to include in the output tuple (can include multiple of these), such as `outputTuple[fieldName] = inputTuple[fieldName]`
-* `fieldName as aliasFieldName`: aliased field name to include in the output tuple (can include multiple of these), such as `outputTuple[aliasFieldName] = incomingTuple[fieldName]`
-* `replace(fieldName, value, withValue=replacementValue)`: if `incomingTuple[fieldName] == value` then `outgoingTuple[fieldName]` will be set to `replacementValue`. `value` can be the string "null" to replace a null value with some other value.
-* `replace(fieldName, value, withField=otherFieldName)`: if `incomingTuple[fieldName] == value` then `outgoingTuple[fieldName]` will be set to the value of `incomingTuple[otherFieldName]`. `value` can be the string "null" to replace a null value with some other value.
-
-[[StreamingExpressions-Syntax.29]]
-==== Syntax
-
-[source,text]
-----
-// output tuples with fields teamName, wins, losses, and winPercentages where a null value for wins or losses is translated to the value of 0
-select(
-  search(collection1, fl="id,teamName_s,wins,losses", q="*:*", sort="id asc"),
-  teamName_s as teamName,
-  wins,
-  losses,
-  replace(wins,null,withValue=0),
-  replace(losses,null,withValue=0),
-  if(eq(0,wins), 0, div(add(wins,losses), wins)) as winPercentage
-)
-----
-
-[[StreamingExpressions-sort]]
-=== sort
-
-The `sort` function wraps a streaming expression and re-orders the tuples. The sort function emits all incoming tuples in the new sort order. The sort function reads all tuples from the incoming stream, re-orders them using an algorithm with `O(nlog(n))` performance characteristics, where n is the total number of tuples in the incoming stream, and then outputs the tuples in the new sort order. Because all tuples are read into memory, the memory consumption of this function grows linearly with the number of tuples in the incoming stream.
-
-[[StreamingExpressions-Parameters.29]]
-==== Parameters
-
-* `StreamExpression`
-* `by`: Sort criteria for re-ordering the tuples
-
-[[StreamingExpressions-Syntax.30]]
-==== Syntax
-
-The expression below finds dog owners and orders the results by owner and pet name. Notice that it uses an efficient innerJoin by first ordering by the person/owner id and then re-orders the final output by the owner and pet names.
-
-[source,text]
-----
-sort(
-  innerJoin(
-    search(people, q=*:*, fl="id,name", sort="id asc"),
-    search(pets, q=type:dog, fl="owner,petName", sort="owner asc"),
-    on="id=owner"
-  ),
-  by="name asc, petName asc"
-)
-----
-
-[[StreamingExpressions-top]]
-=== top
-
-The `top` function wraps a streaming expression and re-orders the tuples. The top function emits only the top N tuples in the new sort order. The top function re-orders the underlying stream so the sort criteria *does not* have to match up with the underlying stream.
-
-[[StreamingExpressions-Parameters.30]]
-==== Parameters
-
-* `n`: Number of top tuples to return.
-* `StreamExpression`
-* `sort`: Sort criteria for selecting the top N tuples.
-
-[[StreamingExpressions-Syntax.31]]
-==== Syntax
-
-The expression below finds the top 3 results of the underlying search. Notice that it reverses the sort order. The top function re-orders the results of the underlying stream.
-
-[source,text]
-----
-top(n=3,
-     search(collection1,
-            q="*:*",
-            qt="/export",
-            fl="id,a_s,a_i,a_f",
-            sort="a_f desc, a_i desc"),
-      sort="a_f asc, a_i asc")
-----
-
-[[StreamingExpressions-unique]]
-=== unique
-
-The `unique` function wraps a streaming expression and emits a unique stream of tuples based on the `over` parameter. The unique function relies on the sort order of the underlying stream. The `over` parameter must match up with the sort order of the underlying stream.
-
-The unique function implements a non-co-located unique algorithm. This means that records with the same unique `over` field do not need to be co-located on the same shard. When executed in the parallel, the `partitionKeys` parameter must be the same as the unique `over` field so that records with the same keys will be shuffled to the same worker.
-
-[[StreamingExpressions-Parameters.31]]
-==== Parameters
-
-* `StreamExpression`
-* `over`: The unique criteria.
-
-[[StreamingExpressions-Syntax.32]]
-==== Syntax
-
-[source,text]
-----
-unique(
-  search(collection1,
-         q="*:*",
-         qt="/export",
-         fl="id,a_s,a_i,a_f",
-         sort="a_f asc, a_i asc"),
-  over="a_f")
-----
-
-[[StreamingExpressions-update]]
-=== update
-
-The `update` function wraps another functions and sends the tuples to a SolrCloud collection for indexing.
-
-[[StreamingExpressions-Parameters.32]]
-==== Parameters
-
-* `destinationCollection`: (Mandatory) The collection where the tuples will indexed.
-* `batchSize`: (Mandatory) The indexing batch size.
-* `StreamExpression`: (Mandatory)
-
-[[StreamingExpressions-Syntax.33]]
-==== Syntax
-
-[source,text]
-----
- update(destinationCollection,
-        batchSize=500,
-        search(collection1,
-               q=*:*,
-               fl="id,a_s,a_i,a_f,s_multi,i_multi",
-               sort="a_f asc, a_i asc"))
-
-----
-
-The example above sends the tuples returned by the `search` function to the `destinationCollection` to be indexed.
-
-[[StreamingExpressions-StreamEvaluators]]
-== Stream Evaluators
+=== About Stream Evaluators
 
 Stream Evaluators can be used to evaluate (calculate) new values based on other values in a tuple. That newly evaluated value can be put into the tuple (as part of a `select(...)` clause), used to filter streams (as part of a `having(...)` clause), and for other things. Evaluators can contain field names, raw values, or other evaluators, giving you the ability to create complex evaluation logic, including conditional if/then choices.
 
@@ -1460,512 +125,6 @@ In cases where you want to use raw values as part of an evaluation you will need
 3.  If the parameter can be parsed into a valid evaluator, then it is considered an evaluator. For example, `eq(add(10,4),add(7,7))`
 4.  The parameter is considered a field name, even if it quoted. For example, `eq(fieldA,"fieldB")`
 
-If you wish to use a raw string as part of an evaluation, you will want to consider using the `raw(string)` evaluator. This will always return the raw value, no matter what is entered.analyze (6.6)
-
-[[StreamingExpressions-abs]]
-=== abs
-
-The `abs` function will return the absolute value of the provided single parameter. The `abs` function will fail to execute if the value is non-numeric. If a null value is found then null will be returned as the result.
-
-[[StreamingExpressions-Parameters.33]]
-==== Parameters
-
-* `Field Name | Raw Number | Number Evaluator`
-
-[[StreamingExpressions-Syntax.34]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `abs` evaluator. Only one parameter is accepted. Returns a numeric value.
-
-[source,text]
-----
-abs(1) // 1, not really a good use case for it
-abs(-1) // 1, not really a good use case for it
-abs(add(fieldA,fieldB)) // absolute value of fieldA + fieldB
-abs(fieldA) // absolute value of fieldA
-----
-
-[[StreamingExpressions-add]]
-=== add
-
-The `add` function will take 2 or more numeric values and add them together. The `add` function will fail to execute if any of the values are non-numeric. If a null value is found then null will be returned as the result.
-
-[[StreamingExpressions-Parameters.34]]
-==== Parameters
-
-* `Field Name | Raw Number | Number Evaluator`
-* `Field Name | Raw Number | Number Evaluator`
-* `......`
-* `Field Name | Raw Number | Number Evaluator`
-
-[[StreamingExpressions-Syntax.35]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `add` evaluator. The number and order of these parameters do not matter and is not limited except that at least two parameters are required. Returns a numeric value.
-
-[source,text]
-----
-add(1,2,3,4) // 1 + 2 + 3 + 4 == 10
-add(1,fieldA) // 1 + value of fieldA
-add(fieldA,1.4) // value of fieldA + 1.4
-add(fieldA,fieldB,fieldC) // value of fieldA + value of fieldB + value of fieldC
-add(fieldA,div(fieldA,fieldB)) // value of fieldA + (value of fieldA / value of fieldB)
-add(fieldA,if(gt(fieldA,fieldB),fieldA,fieldB)) // if fieldA > fieldB then fieldA + fieldA, else fieldA + fieldB
-----
-
-[[StreamingExpressions-div]]
-=== div
-
-The `div` function will take two numeric values and divide them. The function will fail to execute if any of the values are non-numeric or null, or the 2nd value is 0. Returns a numeric value.
-
-[[StreamingExpressions-Parameters.35]]
-==== Parameters
-
-* `Field Name | Raw Number | Number Evaluator`
-* `Field Name | Raw Number | Number Evaluator`
-
-[[StreamingExpressions-Syntax.36]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `div` evaluator. The first value will be divided by the second and as such the second cannot be 0.
-
-[source,text]
-----
-div(1,2) // 1 / 2
-div(1,fieldA) // 1 / fieldA
-div(fieldA,1.4) // fieldA / 1.4
-div(fieldA,add(fieldA,fieldB)) // fieldA / (fieldA + fieldB)
-----
-
-[[StreamingExpressions-log]]
-=== log
-
-The `log` function will return the natural log of the provided single parameter. The `log` function will fail to execute if the value is non-numeric. If a null value is found, then null will be returned as the result.
-
-[[StreamingExpressions-Parameters.36]]
-==== Parameters
-
-* `Field Name | Raw Number | Number Evaluator`
-
-[[StreamingExpressions-Syntax.37]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `log` evaluator. Only one parameter is accepted. Returns a numeric value.
-
-[source,text]
-----
-log(100)
-log(add(fieldA,fieldB))
-log(fieldA)
-----
-
-[[StreamingExpressions-mult]]
-=== mult
-
-The `mult` function will take two or more numeric values and multiply them together. The `mult` function will fail to execute if any of the values are non-numeric. If a null value is found then null will be returned as the result.
-
-[[StreamingExpressions-Parameters.37]]
-==== Parameters
-
-* `Field Name | Raw Number | Number Evaluator`
-* `Field Name | Raw Number | Number Evaluator`
-* `......`
-* `Field Name | Raw Number | Number Evaluator`
-
-[[StreamingExpressions-Syntax.38]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `mult` evaluator. The number and order of these parameters do not matter and is not limited except that at least two parameters are required. Returns a numeric value.
-
-[source,text]
-----
-mult(1,2,3,4) // 1 * 2 * 3 * 4
-mult(1,fieldA) // 1 * value of fieldA
-mult(fieldA,1.4) // value of fieldA * 1.4
-mult(fieldA,fieldB,fieldC) // value of fieldA * value of fieldB * value of fieldC
-mult(fieldA,div(fieldA,fieldB)) // value of fieldA * (value of fieldA / value of fieldB)
-mult(fieldA,if(gt(fieldA,fieldB),fieldA,fieldB)) // if fieldA > fieldB then fieldA * fieldA, else fieldA * fieldB
-----
-
-[[StreamingExpressions-sub]]
-=== sub
-
-The `sub` function will take 2 or more numeric values and subtract them, from left to right. The sub function will fail to execute if any of the values are non-numeric. If a null value is found then null will be returned as the result.
-
-[[StreamingExpressions-Parameters.38]]
-==== Parameters
-
-* `Field Name | Raw Number | Number Evaluator`
-* `Field Name | Raw Number | Number Evaluator`
-* `......`
-* `Field Name | Raw Number | Number Evaluator`
-
-[[StreamingExpressions-Syntax.39]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `sub` evaluator. The number of these parameters does not matter and is not limited except that at least two parameters are required. Returns a numeric value.
-
-[source,text]
-----
-sub(1,2,3,4) // 1 - 2 - 3 - 4
-sub(1,fieldA) // 1 - value of fieldA
-sub(fieldA,1.4) // value of fieldA - 1.4
-sub(fieldA,fieldB,fieldC) // value of fieldA - value of fieldB - value of fieldC
-sub(fieldA,div(fieldA,fieldB)) // value of fieldA - (value of fieldA / value of fieldB)
-if(gt(fieldA,fieldB),sub(fieldA,fieldB),sub(fieldB,fieldA)) // if fieldA > fieldB then fieldA - fieldB, else fieldB - field
-----
-
-[[StreamingExpressions-pow]]
-=== pow
-//TODO
-
-[[StreamingExpressions-mod]]
-=== mod
-//TODO
-
-[[StreamingExpressions-ceil]]
-==== ceil
-//TODO
-
-[[StreamingExpressions-floor]]
-=== floor
-//TODO
-
-[[StreamingExpressions-sin]]
-=== sin
-//TODO
-
-[[StreamingExpressions-asin]]
-=== asin
-//TODO
-
-[[StreamingExpressions-sinh]]
-=== sinh
-//TODO
-
-[[StreamingExpressions-cos]]
-=== cos
-//TODO
-
-[[StreamingExpressions-acos]]
-=== acos
-//TODO
-
-[[StreamingExpressions-atan]]
-=== atan
-//TODO
-
-[[StreamingExpressions-round]]
-=== round
-//TODO
-
-[[StreamingExpressions-sqrt]]
-=== sqrt
-//TODO
-
-[[StreamingExpressions-cbrt]]
-=== cbrt
-
-=== and
-
-The `and` function will return the logical AND of at least 2 boolean parameters. The function will fail to execute if any parameters are non-boolean or null. Returns a boolean value.
-
-[[StreamingExpressions-Parameters.39]]
-==== Parameters
-
-* `Field Name | Raw Boolean | Boolean Evaluator`
-* `Field Name | Raw Boolean | Boolean Evaluator`
-* `......`
-* `Field Name | Raw Boolean | Boolean Evaluator`
-
-[[StreamingExpressions-Syntax.40]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `and` evaluator. At least two parameters are required, but there is no limit to how many you can use.
-
-[source,text]
-----
-and(true,fieldA) // true && fieldA
-and(fieldA,fieldB) // fieldA && fieldB
-and(or(fieldA,fieldB),fieldC) // (fieldA || fieldB) && fieldC
-and(fieldA,fieldB,fieldC,or(fieldD,fieldE),fieldF)
-----
-
-[[StreamingExpressions-eq]]
-=== eq
-
-The `eq` function will return whether all the parameters are equal, as per Java's standard `equals(...)` function. The function accepts parameters of any type, but will fail to execute if all the parameters are not of the same type. That is, all are Boolean, all are String, all are Numeric. If any any parameters are null and there is at least one parameter that is not null then false will be returned. Returns a boolean value.
-
-[[StreamingExpressions-Parameters.40]]
-==== Parameters
-
-* `Field Name | Raw Value | Evaluator`
-* `Field Name | Raw Value | Evaluator`
-* `......`
-* `Field Name | Raw Value | Evaluator`
-
-[[StreamingExpressions-Syntax.41]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `eq` evaluator.
-
-[source,text]
-----
-eq(1,2) // 1 == 2
-eq(1,fieldA) // 1 == fieldA
-eq(fieldA,val(foo)) fieldA == "foo"
-eq(add(fieldA,fieldB),6) // fieldA + fieldB == 6
-----
-
-[[StreamingExpressions-eor]]
-=== eor
-
-The `eor` function will return the logical exclusive or of at least two boolean parameters. The function will fail to execute if any parameters are non-boolean or null. Returns a boolean value.
-
-[[StreamingExpressions-Parameters.41]]
-==== Parameters
-
-* `Field Name | Raw Boolean | Boolean Evaluator`
-* `Field Name | Raw Boolean | Boolean Evaluator`
-* `......`
-* `Field Name | Raw Boolean | Boolean Evaluator`
-
-[[StreamingExpressions-Syntax.42]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `eor` evaluator. At least two parameters are required, but there is no limit to how many you can use.
-
-[source,text]
-----
-eor(true,fieldA) // true iff fieldA is false
-eor(fieldA,fieldB) // true iff either fieldA or fieldB is true but not both
-eor(eq(fieldA,fieldB),eq(fieldC,fieldD)) // true iff either fieldA == fieldB or fieldC == fieldD but not both
-----
-
-[[StreamingExpressions-gteq]]
-=== gteq
-
-The `gteq` function will return whether the first parameter is greater than or equal to the second parameter. The function accepts numeric and string parameters, but will fail to execute if all the parameters are not of the same type. That is, all are String or all are Numeric. If any any parameters are null then an error will be raised. Returns a boolean value.
-
-[[StreamingExpressions-Parameters.42]]
-==== Parameters
-
-* `Field Name | Raw Value | Evaluator`
-* `Field Name | Raw Value | Evaluator`
-
-[[StreamingExpressions-Syntax.43]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `gteq` evaluator.
-
-[source,text]
-----
-gteq(1,2) // 1 >= 2
-gteq(1,fieldA) // 1 >= fieldA
-gteq(fieldA,val(foo)) fieldA >= "foo"
-gteq(add(fieldA,fieldB),6) // fieldA + fieldB >= 6
-----
-
-[[StreamingExpressions-gt]]
-=== gt
-
-The `gt` function will return whether the first parameter is greater than the second parameter. The function accepts numeric or string parameters, but will fail to execute if all the parameters are not of the same type. That is, all are String or all are Numeric. If any any parameters are null then an error will be raised. Returns a boolean value.
-
-[[StreamingExpressions-Parameters.43]]
-==== Parameters
-
-* `Field Name | Raw Value | Evaluator`
-* `Field Name | Raw Value | Evaluator`
-
-[[StreamingExpressions-Syntax.44]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `gt` evaluator.
-
-[source,text]
-----
-gt(1,2) // 1 > 2
-gt(1,fieldA) // 1 > fieldA
-gt(fieldA,val(foo)) fieldA > "foo"
-gt(add(fieldA,fieldB),6) // fieldA + fieldB > 6
-----
-
-[[StreamingExpressions-if]]
-=== if
-
-The `if` function works like a standard conditional if/then statement. If the first parameter is true, then the second parameter will be returned, else the third parameter will be returned. The function accepts a boolean as the first parameter and anything as the second and third parameters. An error will occur if the first parameter is not a boolean or is null.
-
-[[StreamingExpressions-Parameters.44]]
-==== Parameters
-
-* `Field Name | Raw Value | Boolean Evaluator`
-* `Field Name | Raw Value | Evaluator`
-* `Field Name | Raw Value | Evaluator`
-
-[[StreamingExpressions-Syntax.45]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `if` evaluator.
-
-[source,text]
-----
-if(fieldA,fieldB,fieldC) // if fieldA is true then fieldB else fieldC
-if(gt(fieldA,5), fieldA, 5) // if fieldA > 5 then fieldA else 5
-if(eq(fieldB,null), null, div(fieldA,fieldB)) // if fieldB is null then null else fieldA / fieldB
-----
-
-[[StreamingExpressions-lteq]]
-=== lteq
-
-The l`teq` function will return whether the first parameter is less than or equal to the second parameter. The function accepts numeric and string parameters, but will fail to execute if all the parameters are not of the same type. That is, all are String or all are Numeric. If any any parameters are null then an error will be raised. Returns a boolean value.
-
-[[StreamingExpressions-Parameters.45]]
-==== Parameters
-
-* `Field Name | Raw Value | Evaluator`
-* `Field Name | Raw Value | Evaluator`
-
-[[StreamingExpressions-Syntax.46]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `lteq` evaluator.
-
-[source,text]
-----
-lteq(1,2) // 1 <= 2
-lteq(1,fieldA) // 1 <= fieldA
-lteq(fieldA,val(foo)) fieldA <= "foo"
-lteq(add(fieldA,fieldB),6) // fieldA + fieldB <= 6
-----
-
-[[StreamingExpressions-lt]]
-=== lt
-
-The `lt` function will return whether the first parameter is less than the second parameter. The function accepts numeric or string parameters, but will fail to execute if all the parameters are not of the same type. That is, all are String or all are Numeric. If any any parameters are null then an error will be raised. Returns a boolean value.
-
-[[StreamingExpressions-Parameters.46]]
-==== Parameters
-
-* `Field Name | Raw Value | Evaluator`
-* `Field Name | Raw Value | Evaluator`
-
-[[StreamingExpressions-Syntax.47]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `lt` evaluator.
-
-[source,text]
-----
-lt(1,2) // 1 < 2
-lt(1,fieldA) // 1 < fieldA
-lt(fieldA,val(foo)) fieldA < "foo"
-lt(add(fieldA,fieldB),6) // fieldA + fieldB < 6
-----
-
-[[StreamingExpressions-not]]
-=== not
-
-The `not` function will return the logical NOT of a single boolean parameter. The function will fail to execute if the parameter is non-boolean or null. Returns a boolean value.
-
-[[StreamingExpressions-Parameters.47]]
-==== Parameters
-
-* `Field Name | Raw Boolean | Boolean Evaluator`
-
-[[StreamingExpressions-Syntax.48]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `not` evaluator. Only one parameter is allowed.
-
-[source,text]
-----
-not(true) // false
-not(fieldA) // true if fieldA is false else false
-not(eq(fieldA,fieldB)) // true if fieldA != fieldB
-----
-
-[[StreamingExpressions-or]]
-=== or
-
-The `or` function will return the logical OR of at least 2 boolean parameters. The function will fail to execute if any parameters are non-boolean or null. Returns a boolean value.
-
-[[StreamingExpressions-Parameters.48]]
-==== Parameters
-
-* `Field Name | Raw Boolean | Boolean Evaluator`
-* `Field Name | Raw Boolean | Boolean Evaluator`
-* `......`
-* `Field Name | Raw Boolean | Boolean Evaluator`
-
-[[StreamingExpressions-Syntax.49]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `or` evaluator. At least two parameters are required, but there is no limit to how many you can use.
-
-[source,text]
-----
-or(true,fieldA) // true || fieldA
-or(fieldA,fieldB) // fieldA || fieldB
-or(and(fieldA,fieldB),fieldC) // (fieldA && fieldB) || fieldC
-or(fieldA,fieldB,fieldC,and(fieldD,fieldE),fieldF)
-----
-
-[[StreamingExpressions-analyze]]
-=== analyze
-//TODO
-
-[[StreamingExpressions-second]]
-=== second
-//TODO
-
-[[StreamingExpressions-minute]]
-=== minute
-//TODO
-
-[[StreamingExpressions-hour]]
-=== hour
-//TODO
-
-[[StreamingExpressions-day]]
-=== day
-//TODO
-
-[[StreamingExpressions-month]]
-=== month
-//TODO
-
-[[StreamingExpressions-year]]
-=== year
-//TODO
-
-[[StreamingExpressions-convert]]
-=== convert
-//TODO
-
-[[StreamingExpressions-raw]]
-=== raw
-
-The `raw` function will return whatever raw value is the parameter. This is useful for cases where you want to use a string as part of another evaluator.
-
-[[StreamingExpressions-Parameters.49]]
-==== Parameters
-
-* `Raw Value`
-
-[[StreamingExpressions-Syntax.50]]
-==== Syntax
-
-The expressions below show the various ways in which you can use the `raw` evaluator. Whatever is inside will be returned as-is. Internal evaluators are considered strings and are not evaluated.
-
-[source,text]
-----
-raw(foo) // "foo"
-raw(count(*)) // "count(*)"
-raw(45) // 45
-raw(true) // "true" (note: this returns the string "true" and not the boolean true)
-eq(raw(fieldA), fieldA) // true if the value of fieldA equals the string "fieldA"
-----
+If you wish to use a raw string as part of an evaluation, you will want to consider using the `raw(string)` evaluator. This will always return the raw value, no matter what is entered.
 
-[[StreamingExpressions-UUID]]
-=== UUID
-//TODO
+A full reference to all available evaluator expressions is available in <<stream-evaluators.adoc#stream-evaluators,Stream Evaluators>>.


[24/27] lucene-solr:jira/solr-10233: SOLR-10693: Add copyOfRange Stream Evaluator

Posted by tf...@apache.org.
SOLR-10693: Add copyOfRange Stream Evaluator


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

Branch: refs/heads/jira/solr-10233
Commit: 59aa5d7515fe4af0d2006957d1a5b3a0d3f753f9
Parents: 0aea8cb
Author: Joel Bernstein <jb...@apache.org>
Authored: Mon May 22 14:06:42 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Mon May 22 18:42:08 2017 -0400

----------------------------------------------------------------------
 .../org/apache/solr/handler/StreamHandler.java  |  1 +
 .../solrj/io/stream/CopyOfRangeEvaluator.java   | 85 ++++++++++++++++++++
 .../solrj/io/stream/StreamExpressionTest.java   | 48 +++++++++++
 3 files changed, 134 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/59aa5d75/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 bf37383..a2a49a0 100644
--- a/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
@@ -180,6 +180,7 @@ public class StreamHandler extends RequestHandlerBase implements SolrCoreAware,
       .withFunctionName("scale", ScaleEvaluator.class)
       .withFunctionName("distance", DistanceEvaluator.class)
       .withFunctionName("copyOf", CopyOfEvaluator.class)
+      .withFunctionName("copyOfRange", CopyOfRangeEvaluator.class)
       .withFunctionName("percentile", PercentileEvaluator.class)
       .withFunctionName("empiricalDistribution", EmpiricalDistributionEvaluator.class)
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/59aa5d75/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CopyOfRangeEvaluator.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CopyOfRangeEvaluator.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CopyOfRangeEvaluator.java
new file mode 100644
index 0000000..c4c1e77
--- /dev/null
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/CopyOfRangeEvaluator.java
@@ -0,0 +1,85 @@
+/*
+ * 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.stream;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.solr.client.solrj.io.Tuple;
+import org.apache.solr.client.solrj.io.eval.ComplexEvaluator;
+import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
+import org.apache.solr.client.solrj.io.stream.expr.Explanation;
+import org.apache.solr.client.solrj.io.stream.expr.Explanation.ExpressionType;
+import org.apache.solr.client.solrj.io.stream.expr.Expressible;
+import org.apache.solr.client.solrj.io.stream.expr.StreamExpression;
+import org.apache.solr.client.solrj.io.stream.expr.StreamExpressionParameter;
+import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
+
+public class CopyOfRangeEvaluator extends ComplexEvaluator implements Expressible {
+
+  private static final long serialVersionUID = 1;
+
+  public CopyOfRangeEvaluator(StreamExpression expression, StreamFactory factory) throws IOException {
+    super(expression, factory);
+  }
+
+  public List<Number> evaluate(Tuple tuple) throws IOException {
+    StreamEvaluator colEval1 = subEvaluators.get(0);
+
+    List<Number> numbers1 = (List<Number>)colEval1.evaluate(tuple);
+    double[] vals = new double[numbers1.size()];
+
+    for(int i=0; i<vals.length; i++) {
+      vals[i] = numbers1.get(i).doubleValue();
+    }
+
+    StreamEvaluator startIndexEval = subEvaluators.get(1);
+    Number startIndexNum = (Number)startIndexEval.evaluate(tuple);
+    int startIndex = startIndexNum.intValue();
+
+    StreamEvaluator endIndexEval = subEvaluators.get(2);
+    Number endIndexNum = (Number)endIndexEval.evaluate(tuple);
+    int endIndex = endIndexNum.intValue();
+
+    vals = Arrays.copyOfRange(vals, startIndex, endIndex);
+
+    List<Number> copyOf = new ArrayList(vals.length);
+
+    for(int i=0; i<vals.length; i++) {
+      copyOf.add(vals[i]);
+    }
+
+    return copyOf;
+  }
+
+  @Override
+  public StreamExpressionParameter toExpression(StreamFactory factory) throws IOException {
+    StreamExpression expression = new StreamExpression(factory.getFunctionName(getClass()));
+    return expression;
+  }
+
+  @Override
+  public Explanation toExplanation(StreamFactory factory) throws IOException {
+    return new Explanation(nodeId.toString())
+        .withExpressionType(ExpressionType.EVALUATOR)
+        .withFunctionName(factory.getFunctionName(getClass()))
+        .withImplementingClass(getClass().getName())
+        .withExpression(toExpression(factory).toString());
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/59aa5d75/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 e651338..1632818 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
@@ -5508,6 +5508,54 @@ public class StreamExpressionTest extends SolrCloudTestCase {
   }
 
 
+  public void testCopyOfRange() throws Exception {
+    UpdateRequest updateRequest = new UpdateRequest();
+
+    int i=0;
+    while(i<50) {
+      updateRequest.add(id, "id_"+(++i),"test_dt", getDateString("2016", "5", "1"), "price_f", "400.00");
+    }
+
+    while(i<100) {
+      updateRequest.add(id, "id_"+(++i),"test_dt", getDateString("2015", "5", "1"), "price_f", "300.0");
+    }
+
+    while(i<150) {
+      updateRequest.add(id, "id_"+(++i),"test_dt", getDateString("2014", "5", "1"), "price_f", "500.0");
+    }
+
+    while(i<250) {
+      updateRequest.add(id, "id_"+(++i),"test_dt", getDateString("2013", "5", "1"), "price_f", "100.00");
+    }
+
+    updateRequest.commit(cluster.getSolrClient(), COLLECTIONORALIAS);
+
+    String expr = "timeseries("+COLLECTIONORALIAS+", q=\"*:*\", start=\"2013-01-01T01:00:00.000Z\", " +
+        "end=\"2016-12-01T01:00:00.000Z\", " +
+        "gap=\"+1YEAR\", " +
+        "field=\"test_dt\", " +
+        "count(*), sum(price_f), max(price_f), min(price_f))";
+
+    String cexpr = "let(a="+expr+", c=col(a, max(price_f)), tuple(copy=copyOfRange(c, 1, 3)))";
+
+    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<Number> copy1 = (List<Number>)tuples.get(0).get("copy");
+    assertTrue(copy1.size() == 2);
+    assertTrue(copy1.get(0).doubleValue() == 500D);
+    assertTrue(copy1.get(1).doubleValue() == 300D);
+  }
+
+
   @Test
   public void testPercentiles() throws Exception {
     UpdateRequest updateRequest = new UpdateRequest();


[27/27] lucene-solr:jira/solr-10233: Merge branch 'master' into jira/solr-10233

Posted by tf...@apache.org.
Merge branch 'master' into jira/solr-10233


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

Branch: refs/heads/jira/solr-10233
Commit: 359201a61fd0ff90de8fa33a982ef64665871d2f
Parents: 7382b65 2d18458
Author: Tomas Fernandez Lobbe <tf...@apache.org>
Authored: Mon May 22 16:53:33 2017 -0700
Committer: Tomas Fernandez Lobbe <tf...@apache.org>
Committed: Mon May 22 16:53:33 2017 -0700

----------------------------------------------------------------------
 solr/NOTICE.txt                                 |  18 +++-
 .../org/apache/solr/handler/StreamHandler.java  |   2 +
 solr/solr-ref-guide/README.adoc                 |  16 +++
 .../meta-docs/asciidoc-syntax.adoc              |  16 +++
 .../solr-ref-guide/meta-docs/editing-tools.adoc |  16 +++
 solr/solr-ref-guide/meta-docs/jekyll.adoc       |  16 +++
 solr/solr-ref-guide/meta-docs/pdf.adoc          |  16 +++
 solr/solr-ref-guide/meta-docs/publish.adoc      |  16 +++
 solr/solr-ref-guide/src/a-quick-overview.adoc   |  16 +++
 solr/solr-ref-guide/src/a-step-closer.adoc      |  16 +++
 solr/solr-ref-guide/src/about-filters.adoc      |  16 +++
 solr/solr-ref-guide/src/about-this-guide.adoc   |  16 +++
 solr/solr-ref-guide/src/about-tokenizers.adoc   |  16 +++
 ...adding-custom-plugins-in-solrcloud-mode.adoc |  16 +++
 solr/solr-ref-guide/src/analysis-screen.adoc    |  16 +++
 solr/solr-ref-guide/src/analyzers.adoc          |  16 +++
 ...uthentication-and-authorization-plugins.adoc |  16 +++
 .../src/basic-authentication-plugin.adoc        |  16 +++
 solr/solr-ref-guide/src/blob-store-api.adoc     |  16 +++
 solr/solr-ref-guide/src/blockjoin-faceting.adoc |  16 +++
 .../solr-ref-guide/src/charfilterfactories.adoc |  16 +++
 .../src/choosing-an-output-format.adoc          |  16 +++
 solr/solr-ref-guide/src/client-api-lineup.adoc  |  16 +++
 solr/solr-ref-guide/src/client-apis.adoc        |  16 +++
 solr/solr-ref-guide/src/cloud-screens.adoc      |  16 +++
 solr/solr-ref-guide/src/codec-factory.adoc      |  16 +++
 .../src/collapse-and-expand-results.adoc        |  16 +++
 .../src/collection-specific-tools.adoc          |  16 +++
 solr/solr-ref-guide/src/collections-api.adoc    |  16 +++
 .../src/collections-core-admin.adoc             |  16 +++
 .../combining-distribution-and-replication.adoc |  16 +++
 .../src/command-line-utilities.adoc             |  16 +++
 .../src/common-query-parameters.adoc            |  16 +++
 solr/solr-ref-guide/src/config-api.adoc         |  16 +++
 solr/solr-ref-guide/src/config-sets.adoc        |  16 +++
 solr/solr-ref-guide/src/configsets-api.adoc     |  16 +++
 solr/solr-ref-guide/src/configuration-apis.adoc |  16 +++
 .../solr-ref-guide/src/configuring-logging.adoc |  16 +++
 .../src/configuring-solrconfig-xml.adoc         |  16 +++
 solr/solr-ref-guide/src/content-streams.adoc    |  16 +++
 solr/solr-ref-guide/src/copying-fields.adoc     |  16 +++
 .../solr-ref-guide/src/core-specific-tools.adoc |  16 +++
 solr/solr-ref-guide/src/coreadmin-api.adoc      |  16 +++
 .../src/cross-data-center-replication-cdcr.adoc |  16 +++
 ...adir-and-directoryfactory-in-solrconfig.adoc |  16 +++
 solr/solr-ref-guide/src/dataimport-screen.adoc  |  16 +++
 solr/solr-ref-guide/src/de-duplication.adoc     |  16 +++
 .../src/defining-core-properties.adoc           |  16 +++
 solr/solr-ref-guide/src/defining-fields.adoc    |  16 +++
 .../detecting-languages-during-indexing.adoc    |  16 +++
 .../src/distributed-requests.adoc               |  16 +++
 .../distributed-search-with-index-sharding.adoc |  16 +++
 .../src/documents-fields-and-schema-design.adoc |  16 +++
 solr/solr-ref-guide/src/documents-screen.adoc   |  16 +++
 solr/solr-ref-guide/src/docvalues.adoc          |  16 +++
 solr/solr-ref-guide/src/dynamic-fields.adoc     |  16 +++
 solr/solr-ref-guide/src/enabling-ssl.adoc       |  16 +++
 solr/solr-ref-guide/src/errata.adoc             |  16 +++
 .../src/exporting-result-sets.adoc              |  16 +++
 solr/solr-ref-guide/src/faceting.adoc           |  16 +++
 .../src/field-properties-by-use-case.adoc       |  16 +++
 .../field-type-definitions-and-properties.adoc  |  16 +++
 .../src/field-types-included-with-solr.adoc     |  16 +++
 solr/solr-ref-guide/src/files-screen.adoc       |  16 +++
 .../solr-ref-guide/src/filter-descriptions.adoc |  16 +++
 solr/solr-ref-guide/src/format-of-solr-xml.adoc |  16 +++
 solr/solr-ref-guide/src/function-queries.adoc   |  16 +++
 solr/solr-ref-guide/src/further-assistance.adoc |  16 +++
 solr/solr-ref-guide/src/getting-assistance.adoc |  16 +++
 .../src/getting-started-with-solrcloud.adoc     |  16 +++
 solr/solr-ref-guide/src/getting-started.adoc    |  16 +++
 solr/solr-ref-guide/src/graph-traversal.adoc    |  16 +++
 .../src/hadoop-authentication-plugin.adoc       |  16 +++
 solr/solr-ref-guide/src/highlighting.adoc       |  16 +++
 .../solr-ref-guide/src/how-solrcloud-works.adoc |  16 +++
 .../src/implicit-requesthandlers.adoc           |  16 +++
 solr/solr-ref-guide/src/index-replication.adoc  |  16 +++
 solr/solr-ref-guide/src/index.adoc              |  16 +++
 .../src/indexconfig-in-solrconfig.adoc          |  16 +++
 .../src/indexing-and-basic-data-operations.adoc |  16 +++
 solr/solr-ref-guide/src/indexupgrader-tool.adoc |  16 +++
 .../src/initparams-in-solrconfig.adoc           |  16 +++
 solr/solr-ref-guide/src/installing-solr.adoc    |  16 +++
 .../src/introduction-to-client-apis.adoc        |  16 +++
 ...ntroduction-to-scaling-and-distribution.adoc |  16 +++
 .../src/introduction-to-solr-indexing.adoc      |  16 +++
 solr/solr-ref-guide/src/java-properties.adoc    |  16 +++
 solr/solr-ref-guide/src/jvm-settings.adoc       |  16 +++
 .../src/kerberos-authentication-plugin.adoc     |  16 +++
 solr/solr-ref-guide/src/language-analysis.adoc  |  16 +++
 solr/solr-ref-guide/src/learning-to-rank.adoc   |  16 +++
 .../src/legacy-scaling-and-distribution.adoc    |  16 +++
 .../src/lib-directives-in-solrconfig.adoc       |  16 +++
 solr/solr-ref-guide/src/licenses/LICENSE        |  21 ----
 .../src/licenses/LICENSE-BSD-NAVGOCO.txt        |  27 -----
 .../src/local-parameters-in-queries.adoc        |  16 +++
 solr/solr-ref-guide/src/logging.adoc            |  16 +++
 .../major-changes-from-solr-5-to-solr-6.adoc    |  16 +++
 .../src/making-and-restoring-backups.adoc       |  16 +++
 solr/solr-ref-guide/src/managed-resources.adoc  |  16 +++
 solr/solr-ref-guide/src/managing-solr.adoc      |  16 +++
 .../src/mbean-request-handler.adoc              |  16 +++
 solr/solr-ref-guide/src/merging-indexes.adoc    |  16 +++
 solr/solr-ref-guide/src/metrics-reporting.adoc  |  16 +++
 solr/solr-ref-guide/src/morelikethis.adoc       |  16 +++
 .../src/near-real-time-searching.adoc           |  16 +++
 solr/solr-ref-guide/src/other-parsers.adoc      |  16 +++
 .../src/other-schema-elements.adoc              |  16 +++
 ...w-of-documents-fields-and-schema-design.adoc |  16 +++
 .../src/overview-of-searching-in-solr.adoc      |  16 +++
 .../src/overview-of-the-solr-admin-ui.adoc      |  16 +++
 .../src/pagination-of-results.adoc              |  16 +++
 .../src/parallel-sql-interface.adoc             |  16 +++
 .../solr-ref-guide/src/parameter-reference.adoc |  16 +++
 .../src/pdf/SolrRefGuide-all.adoc               |  16 +++
 .../src/performance-statistics-reference.adoc   |  16 +++
 solr/solr-ref-guide/src/phonetic-matching.adoc  |  16 +++
 solr/solr-ref-guide/src/ping.adoc               |  16 +++
 .../src/plugins-stats-screen.adoc               |  16 +++
 solr/solr-ref-guide/src/post-tool.adoc          |  16 +++
 .../src/putting-the-pieces-together.adoc        |  16 +++
 solr/solr-ref-guide/src/query-re-ranking.adoc   |  16 +++
 solr/solr-ref-guide/src/query-screen.adoc       |  16 +++
 .../src/query-settings-in-solrconfig.adoc       |  16 +++
 .../src/query-syntax-and-parsing.adoc           |  16 +++
 .../read-and-write-side-fault-tolerance.adoc    |  16 +++
 solr/solr-ref-guide/src/realtime-get.adoc       |  16 +++
 solr/solr-ref-guide/src/relevance.adoc          |  16 +++
 solr/solr-ref-guide/src/replication-screen.adoc |  16 +++
 .../src/request-parameters-api.adoc             |  16 +++
 .../src/requestdispatcher-in-solrconfig.adoc    |  16 +++
 ...lers-and-searchcomponents-in-solrconfig.adoc |  16 +++
 solr/solr-ref-guide/src/response-writers.adoc   |  16 +++
 solr/solr-ref-guide/src/result-clustering.adoc  |  16 +++
 solr/solr-ref-guide/src/result-grouping.adoc    |  16 +++
 .../src/rule-based-authorization-plugin.adoc    |  16 +++
 .../src/rule-based-replica-placement.adoc       |  16 +++
 .../src/running-solr-on-hdfs.adoc               |  16 +++
 solr/solr-ref-guide/src/running-solr.adoc       |  16 +++
 .../src/running-your-analyzer.adoc              |  16 +++
 solr/solr-ref-guide/src/schema-api.adoc         |  16 +++
 .../src/schema-browser-screen.adoc              |  16 +++
 ...schema-factory-definition-in-solrconfig.adoc |  16 +++
 solr/solr-ref-guide/src/schemaless-mode.adoc    |  16 +++
 solr/solr-ref-guide/src/searching.adoc          |  16 +++
 solr/solr-ref-guide/src/securing-solr.adoc      |  16 +++
 solr/solr-ref-guide/src/segments-info.adoc      |  16 +++
 ...tting-up-an-external-zookeeper-ensemble.adoc |  16 +++
 .../shards-and-indexing-data-in-solrcloud.adoc  |  16 +++
 .../src/solr-control-script-reference.adoc      |  16 +++
 .../src/solr-cores-and-solr-xml.adoc            |  16 +++
 solr/solr-ref-guide/src/solr-field-types.adoc   |  16 +++
 solr/solr-ref-guide/src/solr-glossary.adoc      |  16 +++
 .../src/solr-jdbc-apache-zeppelin.adoc          |  16 +++
 .../src/solr-jdbc-dbvisualizer.adoc             |  16 +++
 .../src/solr-jdbc-python-jython.adoc            |  16 +++
 solr/solr-ref-guide/src/solr-jdbc-r.adoc        |  16 +++
 .../src/solr-jdbc-squirrel-sql.adoc             |  16 +++
 solr/solr-ref-guide/src/solr-plugins.adoc       |  16 +++
 .../solrcloud-configuration-and-parameters.adoc |  16 +++
 ...lrcloud-with-legacy-configuration-files.adoc |  16 +++
 solr/solr-ref-guide/src/solrcloud.adoc          |  16 +++
 solr/solr-ref-guide/src/spatial-search.adoc     |  16 +++
 solr/solr-ref-guide/src/spell-checking.adoc     |  16 +++
 solr/solr-ref-guide/src/stream-decorators.adoc  |  16 +++
 solr/solr-ref-guide/src/stream-evaluators.adoc  |  16 +++
 solr/solr-ref-guide/src/stream-screen.adoc      |  16 +++
 solr/solr-ref-guide/src/stream-sources.adoc     |  16 +++
 .../src/streaming-expressions.adoc              |  16 +++
 solr/solr-ref-guide/src/suggester.adoc          |  16 +++
 .../src/taking-solr-to-production.adoc          |  16 +++
 .../src/the-dismax-query-parser.adoc            |  16 +++
 .../src/the-extended-dismax-query-parser.adoc   |  16 +++
 .../src/the-query-elevation-component.adoc      |  16 +++
 .../src/the-standard-query-parser.adoc          |  16 +++
 .../solr-ref-guide/src/the-stats-component.adoc |  16 +++
 .../src/the-term-vector-component.adoc          |  16 +++
 .../solr-ref-guide/src/the-terms-component.adoc |  16 +++
 .../src/the-well-configured-solr-instance.adoc  |  16 +++
 solr/solr-ref-guide/src/thread-dump.adoc        |  16 +++
 solr/solr-ref-guide/src/tokenizers.adoc         |  16 +++
 .../transforming-and-indexing-custom-json.adoc  |  16 +++
 .../src/transforming-result-documents.adoc      |  16 +++
 solr/solr-ref-guide/src/uima-integration.adoc   |  16 +++
 ...anding-analyzers-tokenizers-and-filters.adoc |  16 +++
 .../src/update-request-processors.adoc          |  16 +++
 .../src/updatehandlers-in-solrconfig.adoc       |  16 +++
 .../src/updating-parts-of-documents.adoc        |  16 +++
 .../src/upgrading-a-solr-cluster.adoc           |  16 +++
 solr/solr-ref-guide/src/upgrading-solr.adoc     |  16 +++
 .../src/uploading-data-with-index-handlers.adoc |  18 +++-
 ...g-data-with-solr-cell-using-apache-tika.adoc |  16 +++
 ...store-data-with-the-data-import-handler.adoc |  16 +++
 solr/solr-ref-guide/src/using-javascript.adoc   |  16 +++
 .../solr-ref-guide/src/using-jmx-with-solr.adoc |  16 +++
 solr/solr-ref-guide/src/using-python.adoc       |  16 +++
 .../src/using-solr-from-ruby.adoc               |  16 +++
 solr/solr-ref-guide/src/using-solrj.adoc        |  16 +++
 ...-the-solr-administration-user-interface.adoc |  16 +++
 ...zookeeper-to-manage-configuration-files.adoc |  16 +++
 solr/solr-ref-guide/src/v2-api.adoc             |  16 +++
 .../src/velocity-response-writer.adoc           |  16 +++
 solr/solr-ref-guide/src/velocity-search-ui.adoc |  16 +++
 ...king-with-currencies-and-exchange-rates.adoc |  16 +++
 solr/solr-ref-guide/src/working-with-dates.adoc |  16 +++
 .../src/working-with-enum-fields.adoc           |  16 +++
 ...rking-with-external-files-and-processes.adoc |  16 +++
 .../src/zookeeper-access-control.adoc           |  16 +++
 .../solrj/io/stream/CopyOfRangeEvaluator.java   |  85 +++++++++++++++
 .../solrj/io/stream/DescribeEvaluator.java      |  92 +++++++++++++++++
 .../solrj/io/stream/StreamExpressionTest.java   | 103 +++++++++++++++++++
 211 files changed, 3560 insertions(+), 54 deletions(-)
----------------------------------------------------------------------



[14/27] lucene-solr:jira/solr-10233: SOLR-10612: Fix precommit (tabs)

Posted by tf...@apache.org.
SOLR-10612: Fix precommit (tabs)


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

Branch: refs/heads/jira/solr-10233
Commit: f62248c90a4a139e49a42efe39dddabd6fb51732
Parents: a622568
Author: Jan Høydahl <ja...@apache.org>
Authored: Sun May 21 10:42:05 2017 +0200
Committer: Jan Høydahl <ja...@apache.org>
Committed: Sun May 21 10:42:05 2017 +0200

----------------------------------------------------------------------
 solr/solr-ref-guide/src/css/ref-guide.css   |  8 ++--
 solr/solr-ref-guide/src/js/ref-guide-toc.js | 58 ++++++++++++------------
 2 files changed, 33 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f62248c9/solr/solr-ref-guide/src/css/ref-guide.css
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/css/ref-guide.css b/solr/solr-ref-guide/src/css/ref-guide.css
index 8cbe0f2..a17a07d 100644
--- a/solr/solr-ref-guide/src/css/ref-guide.css
+++ b/solr/solr-ref-guide/src/css/ref-guide.css
@@ -1102,10 +1102,10 @@ body.toc2 #header > h1:nth-last-child(2)
        and (min-width : 768px)
 {
     #toc.toc-right
-    {   
-	float: right;
-	margin-left: 1em;
-	border: none;
+    {
+        float: right;
+        margin-left: 1em;
+        border: none;
     }
 }
 .toc > ul

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/f62248c9/solr/solr-ref-guide/src/js/ref-guide-toc.js
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/js/ref-guide-toc.js b/solr/solr-ref-guide/src/js/ref-guide-toc.js
index 3acd191..fd80c6f 100644
--- a/solr/solr-ref-guide/src/js/ref-guide-toc.js
+++ b/solr/solr-ref-guide/src/js/ref-guide-toc.js
@@ -2,35 +2,35 @@
 
 // NOTE: toc.html is only include if :page-toc: is true, so it's safe to do this document.ready unconditionally
 function do_tocs(page_toc_levels) {
-    $( document ).ready(function() {
+  $( document ).ready(function() {
 
-	// headers used - start at 2, and we have to be careful about trailing comma
-	toc_headers = 0 < page_toc_levels ? 'h2' : '';
-	
-	for (i = 1; i < page_toc_levels; i++) {
-	    toc_headers += ",h" + (2 + i);
-	}
-	// top level TOC
-	$('#toc').toc({ minimumHeaders: 2, listType: 'ul', showSpeed: 0, headers: toc_headers });
-	
-	// any subsection TOCs
-	$('.section-toc').each(function() {
-            // toc() needs a selector string, so we'll build one by fetching the id of the nearest header
-	    // that comes before us, then use to make a selector for all sub headers in the same section
-	    // NOTE: this depends a lot of the particular structure of HTML asciidoctor generates
-	    header = $(this).closest("div:has(:header:first-child)").children(":header").first();
-            selector = "#" + header.attr("id") + " ~ * :header";
-            $(this).toc({ minimumHeaders: 2, listType: 'ul', showSpeed: 0, headers: selector });
-	});
-	
-	/* this offset helps account for the space taken up by the floating toolbar. */
-	$('.toc').on('click', 'a', function() {
-	    var target = $(this.getAttribute('href'))
-	    , scroll_target = target.offset().top
-	    
-	    $(window).scrollTop(scroll_target - 10);
-	    return false
-	})
-	
+    // headers used - start at 2, and we have to be careful about trailing comma
+    toc_headers = 0 < page_toc_levels ? 'h2' : '';
+
+    for (i = 1; i < page_toc_levels; i++) {
+      toc_headers += ",h" + (2 + i);
+    }
+    // top level TOC
+    $('#toc').toc({ minimumHeaders: 2, listType: 'ul', showSpeed: 0, headers: toc_headers });
+
+    // any subsection TOCs
+    $('.section-toc').each(function() {
+      // toc() needs a selector string, so we'll build one by fetching the id of the nearest header
+      // that comes before us, then use to make a selector for all sub headers in the same section
+      // NOTE: this depends a lot of the particular structure of HTML asciidoctor generates
+      header = $(this).closest("div:has(:header:first-child)").children(":header").first();
+      selector = "#" + header.attr("id") + " ~ * :header";
+      $(this).toc({ minimumHeaders: 2, listType: 'ul', showSpeed: 0, headers: selector });
     });
+
+    /* this offset helps account for the space taken up by the floating toolbar. */
+    $('.toc').on('click', 'a', function() {
+      var target = $(this.getAttribute('href'))
+          , scroll_target = target.offset().top
+
+      $(window).scrollTop(scroll_target - 10);
+      return false
+    })
+
+  });
 }


[09/27] lucene-solr:jira/solr-10233: Ref Guide: add AtomicUpdateRequestProcessorFactory from SOLR-9530

Posted by tf...@apache.org.
Ref Guide: add AtomicUpdateRequestProcessorFactory from SOLR-9530


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

Branch: refs/heads/jira/solr-10233
Commit: fa76171a63cca0b42f81213f4cf1284bdaab6b63
Parents: 3392a12
Author: Cassandra Targett <ca...@lucidworks.com>
Authored: Fri May 19 13:10:24 2017 -0500
Committer: Cassandra Targett <ca...@lucidworks.com>
Committed: Fri May 19 13:10:51 2017 -0500

----------------------------------------------------------------------
 .../src/update-request-processors.adoc          | 191 +++++++++++--------
 1 file changed, 113 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/fa76171a/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 e140116..d61e3d7 100644
--- a/solr/solr-ref-guide/src/update-request-processors.adoc
+++ b/solr/solr-ref-guide/src/update-request-processors.adoc
@@ -2,7 +2,9 @@
 :page-shortname: update-request-processors
 :page-permalink: update-request-processors.html
 
-Every update request received by Solr is run through a chain of plugins known as Update Request Processors, or __URPs__. This can be useful, for example, to add a field to the document being indexed; to change the value of a particular field; or to drop an update if the incoming document doesn't fulfill certain criteria. In fact, a surprisingly large number of features in Solr are implemented as Update Processors and therefore it is necessary to understand how such plugins work and where are they configured.
+Every update request received by Solr is run through a chain of plugins known as Update Request Processors, or _URPs_.
+
+This can be useful, for example, to add a field to the document being indexed; to change the value of a particular field; or to drop an update if the incoming document doesn't fulfill certain criteria. In fact, a surprisingly large number of features in Solr are implemented as Update Processors and therefore it is necessary to understand how such plugins work and where are they configured.
 
 [[UpdateRequestProcessors-AnatomyandLifecycle]]
 == Anatomy and Lifecycle
@@ -11,19 +13,14 @@ An Update Request Processor is created as part of a {solr-javadocs}/solr-core/or
 
 The easiest way to describe an Update Request Processor is to look at the Javadocs of the abstract class {solr-javadocs}//solr-core/org/apache/solr/update/processor/UpdateRequestProcessor.html[UpdateRequestProcessor]. Every UpdateRequestProcessor must have a corresponding factory class which extends {solr-javadocs}/solr-core/org/apache/solr/update/processor/UpdateRequestProcessorFactory.html[UpdateRequestProcessorFactory]. This factory class is used by Solr to create a new instance of this plugin. Such a design provides two benefits:
 
-1.  An update request processor need not be thread safe because it is used by one and only one request thread and destroyed once the request is complete.
-2.  The factory class can accept configuration parameters and maintain any state that may be required between requests. The factory class must be thread-safe.
+. An update request processor need not be thread safe because it is used by one and only one request thread and destroyed once the request is complete.
+. The factory class can accept configuration parameters and maintain any state that may be required between requests. The factory class must be thread-safe.
 
 Every update request processor chain is constructed during loading of a Solr core and cached until the core is unloaded. Each `UpdateRequestProcessorFactory` specified in the chain is also instantiated and initialized with configuration that may have been specified in `solrconfig.xml`.
 
 When an update request is received by Solr, it looks up the update chain to be used for this request. A new instance of each UpdateRequestProcessor specified in the chain is created using the corresponding factory. The update request is parsed into corresponding {solr-javadocs}/solr-core/org/apache/solr/update/UpdateCommand.html[UpdateCommand] objects which are run through the chain. Each UpdateRequestProcessor instance is responsible for invoking the next plugin in the chain. It can choose to short circuit the chain by not invoking the next processor and even abort further processing by throwing an exception.
 
-[NOTE]
-====
-
-A single update request may contain a batch of multiple new documents or deletes and therefore the corresponding processXXX methods of an UpdateRequestProcessor will be invoked multiple times for every individual update. However, it is guaranteed that a single thread will serially invoke these methods.
-
-====
+NOTE: A single update request may contain a batch of multiple new documents or deletes and therefore the corresponding processXXX methods of an UpdateRequestProcessor will be invoked multiple times for every individual update. However, it is guaranteed that a single thread will serially invoke these methods.
 
 [[UpdateRequestProcessors-Configuration]]
 == Configuration
@@ -48,7 +45,7 @@ Each of these perform an essential function and as such any custom chain usually
 
 The following example demonstrates how a custom chain can be configured inside `solrconfig.xml`.
 
-.updateRequestProcessorChain
+.Example dedupe updateRequestProcessorChain
 [source,xml]
 ----
 <updateRequestProcessorChain name="dedupe">
@@ -69,9 +66,7 @@ In the above example, a new update processor chain named "dedupe" is created wit
 .RunUpdateProcessorFactory
 [WARNING]
 ====
-
 Do not forget to add `RunUpdateProcessorFactory` at the end of any chains you define in `solrconfig.xml`. Otherwise update requests processed by that chain will not actually affect the indexed data.
-
 ====
 
 [[UpdateRequestProcessors-ConfiguringIndividualProcessorsasTop-LevelPlugins]]
@@ -113,14 +108,14 @@ In SolrCloud mode, all processors in the chain _before_ the `DistributedUpdatePr
 
 For example, consider the "dedupe" chain which we saw in a section above. Assume that a 3-node SolrCloud cluster exists where node A hosts the leader of shard1, node B hosts the leader of shard2 and node C hosts the replica of shard2. Assume that an update request is sent to node A which forwards the update to node B (because the update belongs to shard2) which then distributes the update to its replica node C. Let's see what happens at each node:
 
-* **Node A**: Runs the update through the `SignatureUpdateProcessor` (which computes the signature and puts it in the "id" field), then `LogUpdateProcessor` and then `DistributedUpdateProcessor`. This processor determines that the update actually belongs to node B and is forwarded to node B. The update is not processed further. This is required because the next processor, `RunUpdateProcessor`, will execute the update against the local shard1 index which would lead to duplicate data on shard1 and shard2.
-* **Node B**: Receives the update and sees that it was forwarded by another node. The update is directly sent to `DistributedUpdateProcessor` because it has already been through the `SignatureUpdateProcessor` on node A and doing the same signature computation again would be redundant. The `DistributedUpdateProcessor` determines that the update indeed belongs to this node, distributes it to its replica on Node C and then forwards the update further in the chain to `RunUpdateProcessor`.
-* **Node C**: Receives the update and sees that it was distributed by its leader. The update is directly sent to `DistributedUpdateProcessor` which performs some consistency checks and forwards the update further in the chain to `RunUpdateProcessor`.
+* *Node A*: Runs the update through the `SignatureUpdateProcessor` (which computes the signature and puts it in the "id" field), then `LogUpdateProcessor` and then `DistributedUpdateProcessor`. This processor determines that the update actually belongs to node B and is forwarded to node B. The update is not processed further. This is required because the next processor, `RunUpdateProcessor`, will execute the update against the local shard1 index which would lead to duplicate data on shard1 and shard2.
+* *Node B*: Receives the update and sees that it was forwarded by another node. The update is directly sent to `DistributedUpdateProcessor` because it has already been through the `SignatureUpdateProcessor` on node A and doing the same signature computation again would be redundant. The `DistributedUpdateProcessor` determines that the update indeed belongs to this node, distributes it to its replica on Node C and then forwards the update further in the chain to `RunUpdateProcessor`.
+* *Node C*: Receives the update and sees that it was distributed by its leader. The update is directly sent to `DistributedUpdateProcessor` which performs some consistency checks and forwards the update further in the chain to `RunUpdateProcessor`.
 
 In summary:
 
-1.  All processors before `DistributedUpdateProcessor` are only run on the first node that receives an update request whether it be a forwarding node (e.g., node A in the above example) or a leader (e.g., node B). We call these "pre-processors" or just "processors".
-2.  All processors after `DistributedUpdateProcessor` run only on the leader and the replica nodes. They are not executed on forwarding nodes. Such processors are called "post-processors".
+. All processors before `DistributedUpdateProcessor` are only run on the first node that receives an update request whether it be a forwarding node (e.g., node A in the above example) or a leader (e.g., node B). We call these "pre-processors" or just "processors".
+. All processors after `DistributedUpdateProcessor` run only on the leader and the replica nodes. They are not executed on forwarding nodes. Such processors are called "post-processors".
 
 In the previous section, we saw that the `updateRequestProcessorChain` was configured with `processor="remove_blanks, signature"`. This means that such processors are of the #1 kind and are run only on the forwarding nodes. Similarly, we can configure them as the #2 kind by specifying with the attribute "post-processor" as follows:
 
@@ -134,20 +129,17 @@ In the previous section, we saw that the `updateRequestProcessorChain` was confi
 
 However executing a processor only on the forwarding nodes is a great way of distributing an expensive computation such as de-duplication across a SolrCloud cluster by sending requests randomly via a load balancer. Otherwise the expensive computation is repeated on both the leader and replica nodes.
 
+// TODO 6.6 I think this can be removed after SOLR-9530 -CT
 .Pre-processors and Atomic Updates
 [WARNING]
 ====
-
 Because `DistributedUpdateProcessor` is responsible for processing <<updating-parts-of-documents.adoc#updating-parts-of-documents,Atomic Updates>> into full documents on the leader node, this means that pre-processors which are executed only on the forwarding nodes can only operate on the partial document. If you have a processor which must process a full document then the only choice is to specify it as a post-processor.
-
 ====
 
 .Custom update chain post-processors may never be invoked on a recovering replica
 [WARNING]
 ====
-
-While a replica is in <<read-and-write-side-fault-tolerance.adoc#ReadandWriteSideFaultTolerance-WriteSideFaultTolerance,recovery>>, inbound update requests are buffered to the transaction log. After recovery has completed successfully, those buffered update requests are replayed. As of this writing, however, custom update chain post-processors are never invoked for buffered update requests. See https://issues.apache.org/jira/browse/SOLR-8030[SOLR-8030]. To work around this problem until SOLR-8030 has been fixed, **avoid specifying post-processors in custom update chains**.
-
+While a replica is in <<read-and-write-side-fault-tolerance.adoc#ReadandWriteSideFaultTolerance-WriteSideFaultTolerance,recovery>>, inbound update requests are buffered to the transaction log. After recovery has completed successfully, those buffered update requests are replayed. As of this writing, however, custom update chain post-processors are never invoked for buffered update requests. See https://issues.apache.org/jira/browse/SOLR-8030[SOLR-8030]. To work around this problem until SOLR-8030 has been fixed, *avoid specifying post-processors in custom update chains*.
 ====
 
 [[UpdateRequestProcessors-UsingCustomChains]]
@@ -158,7 +150,7 @@ While a replica is in <<read-and-write-side-fault-tolerance.adoc#ReadandWriteSid
 
 The `update.chain` parameter can be used in any update request to choose a custom chain which has been configured in `solrconfig.xml`. For example, in order to choose the "dedupe" chain described in a previous section, one can issue the following request:
 
-.update.chain
+.Using update.chain
 [source,bash]
 ----
 curl "http://localhost:8983/solr/gettingstarted/update/json?update.chain=dedupe&commit=true" -H 'Content-type: application/json' -d '
@@ -182,12 +174,12 @@ The above should dedupe the two identical documents and index only one of them.
 [[UpdateRequestProcessors-Processor_Post-ProcessorRequestParameters]]
 === Processor & Post-Processor Request Parameters
 
-We can dynamically construct a custom update request processor chain using the "processor" and "post-processor" request parameters. Multiple processors can be specified as a comma-separated value for these two parameters. For example:
+We can dynamically construct a custom update request processor chain using the `processor` and `post-processor` request parameters. Multiple processors can be specified as a comma-separated value for these two parameters. For example:
 
-.Constructing a chain at request time
+.Executing processors configured in solrconfig.xml as (pre)-processors
 [source,bash]
 ----
-# Executing processors configured in solrconfig.xml as (pre)-processors
+
 curl "http://localhost:8983/solr/gettingstarted/update/json?processor=remove_blanks,signature&commit=true" -H 'Content-type: application/json' -d '
 [
   {
@@ -202,8 +194,11 @@ curl "http://localhost:8983/solr/gettingstarted/update/json?processor=remove_bla
 
   }
 ]'
- 
-# Executing processors configured in solrconfig.xml as pre- and post-processors
+----
+
+.Executing processors configured in solrconfig.xml as pre- and post-processors
+[source,bash]
+----
 curl "http://localhost:8983/solr/gettingstarted/update/json?processor=remove_blanks&post-processor=signature&commit=true" -H 'Content-type: application/json' -d '
 [
   {
@@ -230,7 +225,7 @@ This can be done by adding either "update.chain" or "processor" and "post-proces
 
 The following is an `initParam` defined in the <<schemaless-mode.adoc#schemaless-mode,schemaless configuration>> which applies a custom update chain to all request handlers starting with "/update/".
 
-.InitParams
+.Example initParams
 [source,xml]
 ----
 <initParams path="/update/**">
@@ -242,12 +237,10 @@ The following is an `initParam` defined in the <<schemaless-mode.adoc#schemaless
 
 Alternately, one can achieve a similar effect using the "defaults" as shown in the example below:
 
-.defaults
+.Example defaults
 [source,xml]
 ----
-<requestHandler name="/update/extract"
-                startup="lazy"
-                class="solr.extraction.ExtractingRequestHandler" >
+<requestHandler name="/update/extract" startup="lazy" class="solr.extraction.ExtractingRequestHandler" >
   <lst name="defaults">
     <str name="update.chain">add-unknown-fields-to-the-schema</str>
   </lst>
@@ -262,69 +255,111 @@ What follows are brief descriptions of the currently available update request pr
 [[UpdateRequestProcessors-GeneralUseUpdateProcessorFactories]]
 === General Use UpdateProcessorFactories
 
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/AddSchemaFieldsUpdateProcessorFactory.html[AddSchemaFieldsUpdateProcessorFactory]: This processor will dynamically add fields to the schema if an input document contains one or more fields that don't match any field or dynamic field in the schema.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/ClassificationUpdateProcessorFactory.html[ClassificationUpdateProcessorFactory]: This processor uses Lucene's classification module to provide simple document classification. See https://wiki.apache.org/solr/SolrClassification for more details on how to use this processor.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/CloneFieldUpdateProcessorFactory.html[CloneFieldUpdateProcessorFactory]: Clones the values found in any matching _source_ field into the configured _dest_ field.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/DefaultValueUpdateProcessorFactory.html[DefaultValueUpdateProcessorFactory]: A simple processor that adds a default value to any document which does not already have a value in fieldName.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/DocBasedVersionConstraintsProcessorFactory.html[DocBasedVersionConstraintsProcessorFactory]: This Factory generates an UpdateProcessor that helps to enforce version constraints on documents based on per-document version numbers using a configured name of a versionField.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactory.html[DocExpirationUpdateProcessorFactory]: Update Processor Factory for managing automatic "expiration" of documents.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/FieldNameMutatingUpdateProcessorFactory.html[FieldNameMutatingUpdateProcessorFactory]: Modifies field names by replacing all matches to the configured `pattern` with the configured `replacement`.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/IgnoreCommitOptimizeUpdateProcessorFactory.html[IgnoreCommitOptimizeUpdateProcessorFactory]: Allows you to ignore commit and/or optimize requests from client applications when running in SolrCloud mode, for more information, see: Shards and Indexing Data in SolrCloud
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/RegexpBoostProcessorFactory.html[RegexpBoostProcessorFactory]: A processor which will match content of "inputField" against regular expressions found in "boostFilename", and if it matches will return the corresponding boost value from the file and output this to "boostField" as a double value.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.html[SignatureUpdateProcessorFactory]: Uses a defined set of fields to generate a hash "signature" for the document. Useful for only indexing one copy of "similar" documents.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactory.html[StatelessScriptUpdateProcessorFactory]: An update request processor factory that enables the use of update processors implemented as scripts.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/TimestampUpdateProcessorFactory.html[TimestampUpdateProcessorFactory]: An update processor that adds a newly generated date value of "NOW" to any document being added that does not already have a value in the specified field.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/URLClassifyProcessorFactory.html[URLClassifyProcessorFactory]: Update processor which examines a URL and outputs to various other fields with characteristics of that URL, including length, number of path levels, whether it is a top level URL (levels==0), whether it looks like a landing/index page, a canonical representation of the URL (e.g., stripping index.html), the domain and path parts of the URL, etc.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/UUIDUpdateProcessorFactory.html[UUIDUpdateProcessorFactory]: An update processor that adds a newly generated UUID value to any document being added that does not already have a value in the specified field.
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/AddSchemaFieldsUpdateProcessorFactory.html[AddSchemaFieldsUpdateProcessorFactory]:: This processor will dynamically add fields to the schema if an input document contains one or more fields that don't match any field or dynamic field in the schema.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/AtomicUpdateRequestProcessorFactory.html[AtomicUpdateProcessorFactory]:: This processor will convert conventional field-value documents to atomic update documents.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/ClassificationUpdateProcessorFactory.html[ClassificationUpdateProcessorFactory]:: This processor uses Lucene's classification module to provide simple document classification. See https://wiki.apache.org/solr/SolrClassification for more details on how to use this processor.
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/CloneFieldUpdateProcessorFactory.html[CloneFieldUpdateProcessorFactory]:: Clones the values found in any matching _source_ field into the configured _dest_ field.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/DefaultValueUpdateProcessorFactory.html[DefaultValueUpdateProcessorFactory]:: A simple processor that adds a default value to any document which does not already have a value in fieldName.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/DocBasedVersionConstraintsProcessorFactory.html[DocBasedVersionConstraintsProcessorFactory]:: This Factory generates an UpdateProcessor that helps to enforce version constraints on documents based on per-document version numbers using a configured name of a versionField.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/DocExpirationUpdateProcessorFactory.html[DocExpirationUpdateProcessorFactory]:: Update Processor Factory for managing automatic "expiration" of documents.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/FieldNameMutatingUpdateProcessorFactory.html[FieldNameMutatingUpdateProcessorFactory]:: Modifies field names by replacing all matches to the configured `pattern` with the configured `replacement`.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/IgnoreCommitOptimizeUpdateProcessorFactory.html[IgnoreCommitOptimizeUpdateProcessorFactory]:: Allows you to ignore commit and/or optimize requests from client applications when running in SolrCloud mode, for more information, see: Shards and Indexing Data in SolrCloud
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/RegexpBoostProcessorFactory.html[RegexpBoostProcessorFactory]:: A processor which will match content of "inputField" against regular expressions found in "boostFilename", and if it matches will return the corresponding boost value from the file and output this to "boostField" as a double value.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/SignatureUpdateProcessorFactory.html[SignatureUpdateProcessorFactory]:: Uses a defined set of fields to generate a hash "signature" for the document. Useful for only indexing one copy of "similar" documents.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/StatelessScriptUpdateProcessorFactory.html[StatelessScriptUpdateProcessorFactory]:: An update request processor factory that enables the use of update processors implemented as scripts.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/TimestampUpdateProcessorFactory.html[TimestampUpdateProcessorFactory]:: An update processor that adds a newly generated date value of "NOW" to any document being added that does not already have a value in the specified field.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/URLClassifyProcessorFactory.html[URLClassifyProcessorFactory]:: Update processor which examines a URL and outputs to various other fields with characteristics of that URL, including length, number of path levels, whether it is a top level URL (levels==0), whether it looks like a landing/index page, a canonical representation of the URL (e.g., stripping index.html), the domain and path parts of the URL, etc.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/UUIDUpdateProcessorFactory.html[UUIDUpdateProcessorFactory]:: An update processor that adds a newly generated UUID value to any document being added that does not already have a value in the specified field.
 
 [[UpdateRequestProcessors-FieldMutatingUpdateProcessorFactoryDerivedFactories]]
 === FieldMutatingUpdateProcessorFactory Derived Factories
 
 These factories all provide functionality to _modify_ fields in a document as they're being indexed. When using any of these factories, please consult the {solr-javadocs}/solr-core/org/apache/solr/update/processor/FieldMutatingUpdateProcessorFactory.html[FieldMutatingUpdateProcessorFactory javadocs] for details on the common options they all support for configuring which fields are modified.
 
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/ConcatFieldUpdateProcessorFactory.html[ConcatFieldUpdateProcessorFactory]: Concatenates multiple values for fields matching the specified conditions using a configurable delimiter.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/CountFieldValuesUpdateProcessorFactory.html[CountFieldValuesUpdateProcessorFactory]: Replaces any list of values for a field matching the specified conditions with the the count of the number of values for that field.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/FieldLengthUpdateProcessorFactory.html[FieldLengthUpdateProcessorFactory]: Replaces any CharSequence values found in fields matching the specified conditions with the lengths of those CharSequences (as an Integer).
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/FirstFieldValueUpdateProcessorFactory.html[FirstFieldValueUpdateProcessorFactory]: Keeps only the first value of fields matching the specified conditions.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/HTMLStripFieldUpdateProcessorFactory.html[HTMLStripFieldUpdateProcessorFactory]: Strips all HTML Markup in any CharSequence values found in fields matching the specified conditions.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/IgnoreFieldUpdateProcessorFactory.html[IgnoreFieldUpdateProcessorFactory]: Ignores and removes fields matching the specified conditions from any document being added to the index.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/LastFieldValueUpdateProcessorFactory.html[LastFieldValueUpdateProcessorFactory]: Keeps only the last value of fields matching the specified conditions.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/MaxFieldValueUpdateProcessorFactory.html[MaxFieldValueUpdateProcessorFactory]: An update processor that keeps only the the maximum value from any selected fields where multiple values are found.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/MinFieldValueUpdateProcessorFactory.html[MinFieldValueUpdateProcessorFactory]: An update processor that keeps only the the minimum value from any selected fields where multiple values are found.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/ParseBooleanFieldUpdateProcessorFactory.html[ParseBooleanFieldUpdateProcessorFactory]: Attempts to mutate selected fields that have only CharSequence-typed values into Boolean values.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/ParseDateFieldUpdateProcessorFactory.html[ParseDateFieldUpdateProcessorFactory]: Attempts to mutate selected fields that have only CharSequence-typed values into Solr date values.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/ParseNumericFieldUpdateProcessorFactory.html[ParseNumericFieldUpdateProcessorFactory] derived classes:
-** {solr-javadocs}/solr-core/org/apache/solr/update/processor/ParseDoubleFieldUpdateProcessorFactory.html[ParseDoubleFieldUpdateProcessorFactory]: Attempts to mutate selected fields that have only CharSequence-typed values into Double values.
-** {solr-javadocs}/solr-core/org/apache/solr/update/processor/ParseFloatFieldUpdateProcessorFactory.html[ParseFloatFieldUpdateProcessorFactory]: Attempts to mutate selected fields that have only CharSequence-typed values into Float values.
-** {solr-javadocs}/solr-core/org/apache/solr/update/processor/ParseIntFieldUpdateProcessorFactory.html[ParseIntFieldUpdateProcessorFactory]: Attempts to mutate selected fields that have only CharSequence-typed values into Integer values.
-** {solr-javadocs}/solr-core/org/apache/solr/update/processor/ParseLongFieldUpdateProcessorFactory.html[ParseLongFieldUpdateProcessorFactory]: Attempts to mutate selected fields that have only CharSequence-typed values into Long values.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/PreAnalyzedUpdateProcessorFactory.html[PreAnalyzedUpdateProcessorFactory]: An update processor that parses configured fields of any document being added using _PreAnalyzedField_ with the configured format parser.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/RegexReplaceProcessorFactory.html[RegexReplaceProcessorFactory]: An updated processor that applies a configured regex to any CharSequence values found in the selected fields, and replaces any matches with the configured replacement string.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/RemoveBlankFieldUpdateProcessorFactory.html[RemoveBlankFieldUpdateProcessorFactory]: Removes any values found which are CharSequence with a length of 0. (ie: empty strings).
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/TrimFieldUpdateProcessorFactory.html[TrimFieldUpdateProcessorFactory]: Trims leading and trailing whitespace from any CharSequence values found in fields matching the specified conditions.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/TruncateFieldUpdateProcessorFactory.html[TruncateFieldUpdateProcessorFactory]: Truncates any CharSequence values found in fields matching the specified conditions to a maximum character length.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/UniqFieldsUpdateProcessorFactory.html[UniqFieldsUpdateProcessorFactory]: Removes duplicate values found in fields matching the specified conditions.
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/ConcatFieldUpdateProcessorFactory.html[ConcatFieldUpdateProcessorFactory]:: Concatenates multiple values for fields matching the specified conditions using a configurable delimiter.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/CountFieldValuesUpdateProcessorFactory.html[CountFieldValuesUpdateProcessorFactory]:: Replaces any list of values for a field matching the specified conditions with the the count of the number of values for that field.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/FieldLengthUpdateProcessorFactory.html[FieldLengthUpdateProcessorFactory]:: Replaces any CharSequence values found in fields matching the specified conditions with the lengths of those CharSequences (as an Integer).
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/FirstFieldValueUpdateProcessorFactory.html[FirstFieldValueUpdateProcessorFactory]:: Keeps only the first value of fields matching the specified conditions.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/HTMLStripFieldUpdateProcessorFactory.html[HTMLStripFieldUpdateProcessorFactory]:: Strips all HTML Markup in any CharSequence values found in fields matching the specified conditions.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/IgnoreFieldUpdateProcessorFactory.html[IgnoreFieldUpdateProcessorFactory]:: Ignores and removes fields matching the specified conditions from any document being added to the index.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/LastFieldValueUpdateProcessorFactory.html[LastFieldValueUpdateProcessorFactory]:: Keeps only the last value of fields matching the specified conditions.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/MaxFieldValueUpdateProcessorFactory.html[MaxFieldValueUpdateProcessorFactory]:: An update processor that keeps only the the maximum value from any selected fields where multiple values are found.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/MinFieldValueUpdateProcessorFactory.html[MinFieldValueUpdateProcessorFactory]:: An update processor that keeps only the the minimum value from any selected fields where multiple values are found.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/ParseBooleanFieldUpdateProcessorFactory.html[ParseBooleanFieldUpdateProcessorFactory]:: Attempts to mutate selected fields that have only CharSequence-typed values into Boolean values.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/ParseDateFieldUpdateProcessorFactory.html[ParseDateFieldUpdateProcessorFactory]:: Attempts to mutate selected fields that have only CharSequence-typed values into Solr date values.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/ParseNumericFieldUpdateProcessorFactory.html[ParseNumericFieldUpdateProcessorFactory] derived classes::
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/ParseDoubleFieldUpdateProcessorFactory.html[ParseDoubleFieldUpdateProcessorFactory]::: Attempts to mutate selected fields that have only CharSequence-typed values into Double values.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/ParseFloatFieldUpdateProcessorFactory.html[ParseFloatFieldUpdateProcessorFactory]::: Attempts to mutate selected fields that have only CharSequence-typed values into Float values.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/ParseIntFieldUpdateProcessorFactory.html[ParseIntFieldUpdateProcessorFactory]::: Attempts to mutate selected fields that have only CharSequence-typed values into Integer values.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/ParseLongFieldUpdateProcessorFactory.html[ParseLongFieldUpdateProcessorFactory]::: Attempts to mutate selected fields that have only CharSequence-typed values into Long values.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/PreAnalyzedUpdateProcessorFactory.html[PreAnalyzedUpdateProcessorFactory]:: An update processor that parses configured fields of any document being added using _PreAnalyzedField_ with the configured format parser.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/RegexReplaceProcessorFactory.html[RegexReplaceProcessorFactory]:: An updated processor that applies a configured regex to any CharSequence values found in the selected fields, and replaces any matches with the configured replacement string.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/RemoveBlankFieldUpdateProcessorFactory.html[RemoveBlankFieldUpdateProcessorFactory]:: Removes any values found which are CharSequence with a length of 0. (ie: empty strings).
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/TrimFieldUpdateProcessorFactory.html[TrimFieldUpdateProcessorFactory]:: Trims leading and trailing whitespace from any CharSequence values found in fields matching the specified conditions.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/TruncateFieldUpdateProcessorFactory.html[TruncateFieldUpdateProcessorFactory]:: Truncates any CharSequence values found in fields matching the specified conditions to a maximum character length.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/UniqFieldsUpdateProcessorFactory.html[UniqFieldsUpdateProcessorFactory]:: Removes duplicate values found in fields matching the specified conditions.
 
 [[UpdateRequestProcessors-UpdateProcessorFactoriesThatCanBeLoadedasPlugins]]
 === Update Processor Factories That Can Be Loaded as Plugins
 
 These processors are included in Solr releases as "contribs", and require additional jars loaded at runtime. See the README files associated with each contrib for details:
 
-* The {solr-javadocs}/solr-langid/index.html[`langid`] contrib provides:
-** {solr-javadocs}/solr-langid/org/apache/solr/update/processor/LangDetectLanguageIdentifierUpdateProcessorFactory.html[LangDetectLanguageIdentifierUpdateProcessorFactory]: Identifies the language of a set of input fields using http://code.google.com/p/language-detection.
-** {solr-javadocs}/solr-langid/org/apache/solr/update/processor/TikaLanguageIdentifierUpdateProcessorFactory.html[TikaLanguageIdentifierUpdateProcessorFactory]: Identifies the language of a set of input fields using Tika's LanguageIdentifier.
-* The {solr-javadocs}/solr-uima/index.html[`uima`] contrib provides:
-** {solr-javadocs}/solr-uima/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorFactory.html[UIMAUpdateRequestProcessorFactory]: Update document(s) to be indexed with UIMA extracted information.
+The {solr-javadocs}/solr-langid/index.html[`langid`] contrib provides::
+
+{solr-javadocs}/solr-langid/org/apache/solr/update/processor/LangDetectLanguageIdentifierUpdateProcessorFactory.html[LangDetectLanguageIdentifierUpdateProcessorFactory]::: Identifies the language of a set of input fields using http://code.google.com/p/language-detection.
+
+{solr-javadocs}/solr-langid/org/apache/solr/update/processor/TikaLanguageIdentifierUpdateProcessorFactory.html[TikaLanguageIdentifierUpdateProcessorFactory]::: Identifies the language of a set of input fields using Tika's LanguageIdentifier.
+
+The {solr-javadocs}/solr-uima/index.html[`uima`] contrib provides::
+
+{solr-javadocs}/solr-uima/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorFactory.html[UIMAUpdateRequestProcessorFactory]::: Update document(s) to be indexed with UIMA extracted information.
 
 [[UpdateRequestProcessors-UpdateProcessorFactoriesYouShouldNotModifyorRemove]]
 === Update Processor Factories You Should _Not_ Modify or Remove
 
 These are listed for completeness, but are part of the Solr infrastructure, particularly SolrCloud. Other than insuring you do _not_ remove them when modifying the update request handlers (or any copies you make), you will rarely, if ever, need to change these.
 
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/DistributedUpdateProcessorFactory.html[DistributedUpdateProcessorFactory]: Used to distribute updates to all necessary nodes.
-** {solr-javadocs}/solr-core/org/apache/solr/update/processor/NoOpDistributingUpdateProcessorFactory.html[NoOpDistributingUpdateProcessorFactory]: An alternative No-Op implementation of `DistributingUpdateProcessorFactory` that always returns null. Designed for experts who want to bypass distributed updates and use their own custom update logic.
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/LogUpdateProcessorFactory.html[LogUpdateProcessorFactory]: A logging processor. This keeps track of all commands that have passed through the chain and prints them on finish().
-* {solr-javadocs}/solr-core/org/apache/solr/update/processor/RunUpdateProcessorFactory.html[RunUpdateProcessorFactory]: Executes the update commands using the underlying UpdateHandler. Almost all processor chains should end with an instance of `RunUpdateProcessorFactory` unless the user is explicitly executing the update commands in an alternative custom `UpdateRequestProcessorFactory`.
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/DistributedUpdateProcessorFactory.html[DistributedUpdateProcessorFactory]:: Used to distribute updates to all necessary nodes.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/NoOpDistributingUpdateProcessorFactory.html[NoOpDistributingUpdateProcessorFactory]::: An alternative No-Op implementation of `DistributingUpdateProcessorFactory` that always returns null. Designed for experts who want to bypass distributed updates and use their own custom update logic.
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/LogUpdateProcessorFactory.html[LogUpdateProcessorFactory]:: A logging processor. This keeps track of all commands that have passed through the chain and prints them on finish().
+
+{solr-javadocs}/solr-core/org/apache/solr/update/processor/RunUpdateProcessorFactory.html[RunUpdateProcessorFactory]:: Executes the update commands using the underlying UpdateHandler. Almost all processor chains should end with an instance of `RunUpdateProcessorFactory` unless the user is explicitly executing the update commands in an alternative custom `UpdateRequestProcessorFactory`.
 
 [[UpdateRequestProcessors-UpdateProcessorsThatCanBeUsedatRuntime]]
 === Update Processors That Can Be Used at Runtime


[20/27] lucene-solr:jira/solr-10233: SOLR-10725: ASL header in all *.adoc files

Posted by tf...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 6af1941..ea3c7c5 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,22 @@
 = 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
+// 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.
 
 The fundamental premise of Solr is simple. You give it a lot of information, then later you can ask it questions and find the piece of information you want. The part where you feed in all the information is called _indexing_ or _updating_. When you ask a question, it's called a _query_.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 c432f20..60ae891 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,22 @@
 = 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
+// 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.
 
 Solr offers a rich, flexible set of features for search. To understand the extent of this flexibility, it's helpful to begin with an overview of the steps and components involved in a Solr search.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 1f96ccc..fea6c69 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,22 @@
 = 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
+// 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.
 
 Solr features a Web interface that makes it easy for Solr administrators and programmers to view <<files-screen.adoc#files-screen,Solr configuration>> details, run <<query-screen.adoc#query-screen,queries and analyze>> document fields in order to fine-tune a Solr configuration and access <<getting-assistance.adoc#getting-assistance,online documentation>> and other help.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 98d750f..a9c8368 100644
--- a/solr/solr-ref-guide/src/pagination-of-results.adoc
+++ b/solr/solr-ref-guide/src/pagination-of-results.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 
 In most search applications, the "top" matching results (sorted by score, or some other criteria) are displayed to some human user.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 d4bb2c0..c527e05 100644
--- a/solr/solr-ref-guide/src/parallel-sql-interface.adoc
+++ b/solr/solr-ref-guide/src/parallel-sql-interface.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 Solr's Parallel SQL Interface brings the power of SQL to SolrCloud.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 4942f57..7f395d5 100644
--- a/solr/solr-ref-guide/src/parameter-reference.adoc
+++ b/solr/solr-ref-guide/src/parameter-reference.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 == Cluster Parameters
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/src/pdf/SolrRefGuide-all.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/pdf/SolrRefGuide-all.adoc b/solr/solr-ref-guide/src/pdf/SolrRefGuide-all.adoc
index 667fc3b..38fa227 100644
--- a/solr/solr-ref-guide/src/pdf/SolrRefGuide-all.adoc
+++ b/solr/solr-ref-guide/src/pdf/SolrRefGuide-all.adoc
@@ -1,6 +1,22 @@
 = Apache Solr Reference Guide: For Solr {solr-docs-version}
 :toc:
 :toc-title: Table of Contents
+// 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.
 
 [discrete]
 = Licenses

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 c0dfa1b..3c53601 100644
--- a/solr/solr-ref-guide/src/performance-statistics-reference.adoc
+++ b/solr/solr-ref-guide/src/performance-statistics-reference.adoc
@@ -1,6 +1,22 @@
 = 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
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This page explains some of the <<using-jmx-with-solr.adoc#using-jmx-with-solr,JMX>> statistics that Solr exposes.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 1f2f3c0..0e7c81a 100644
--- a/solr/solr-ref-guide/src/phonetic-matching.adoc
+++ b/solr/solr-ref-guide/src/phonetic-matching.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Phonetic matching algorithms may be used to encode tokens so that two different spellings that are pronounced similarly will match.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 d0a6039..d8d730d 100644
--- a/solr/solr-ref-guide/src/ping.adoc
+++ b/solr/solr-ref-guide/src/ping.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Choosing Ping under a core name issues a `ping` request to check whether the core is up and responding to requests.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 e32ca05..2f221dc 100644
--- a/solr/solr-ref-guide/src/plugins-stats-screen.adoc
+++ b/solr/solr-ref-guide/src/plugins-stats-screen.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Plugins screen shows information and statistics about the status and performance of various plugins running in each Solr core. You can find information about the performance of the Solr caches, the state of Solr's searchers, and the configuration of Request Handlers and Search Components.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 f6d084b..80e74d4 100644
--- a/solr/solr-ref-guide/src/post-tool.adoc
+++ b/solr/solr-ref-guide/src/post-tool.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Solr includes a simple command line tool for POSTing various types of content to a Solr server.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 73b37d7..0626814 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,22 @@
 = 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
+// 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.
 
 At the highest level, `schema.xml` is structured as follows.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 9f02059..0bdc8bb 100644
--- a/solr/solr-ref-guide/src/query-re-ranking.adoc
+++ b/solr/solr-ref-guide/src/query-re-ranking.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 Query Re-Ranking allows you to run a simple query (A) for matching documents and then re-rank the top N documents using the scores from a more complex query (B).
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 5480796..23c2334 100644
--- a/solr/solr-ref-guide/src/query-screen.adoc
+++ b/solr/solr-ref-guide/src/query-screen.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 You can use the *Query* screen to submit a search query to a Solr collection and analyze the results.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 52f852d..f380110 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,22 @@
 = 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
+// 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.
 
 The settings in this section affect the way that Solr will process and respond to queries.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 31f5131..0e9fe04 100644
--- a/solr/solr-ref-guide/src/query-syntax-and-parsing.adoc
+++ b/solr/solr-ref-guide/src/query-syntax-and-parsing.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 Solr supports several query parsers, offering search application designers great flexibility in controlling how queries are parsed.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/src/read-and-write-side-fault-tolerance.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/read-and-write-side-fault-tolerance.adoc b/solr/solr-ref-guide/src/read-and-write-side-fault-tolerance.adoc
index 91d94bb..07ebd16 100644
--- a/solr/solr-ref-guide/src/read-and-write-side-fault-tolerance.adoc
+++ b/solr/solr-ref-guide/src/read-and-write-side-fault-tolerance.adoc
@@ -1,6 +1,22 @@
 = Read and Write Side Fault Tolerance
 :page-shortname: read-and-write-side-fault-tolerance
 :page-permalink: read-and-write-side-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
+// 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.
 
 SolrCloud supports elasticity, high availability, and fault tolerance in reads and writes.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 e9ddc5c..0573e05 100644
--- a/solr/solr-ref-guide/src/realtime-get.adoc
+++ b/solr/solr-ref-guide/src/realtime-get.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 For index updates to be visible (searchable), some kind of commit must reopen a searcher to a new point-in-time view of the index.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 afa37e5..63628d2 100644
--- a/solr/solr-ref-guide/src/relevance.adoc
+++ b/solr/solr-ref-guide/src/relevance.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 *Relevance* is the degree to which a query response satisfies a user who is searching for information.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 d8c8e3f..b4e5407 100644
--- a/solr/solr-ref-guide/src/replication-screen.adoc
+++ b/solr/solr-ref-guide/src/replication-screen.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Replication screen shows you the current replication state for the core you have specified. <<solrcloud.adoc#solrcloud,SolrCloud>> has supplanted much of this functionality, but if you are still using Master-Slave index replication, you can use this screen to:
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 8037421..0c53e98 100644
--- a/solr/solr-ref-guide/src/request-parameters-api.adoc
+++ b/solr/solr-ref-guide/src/request-parameters-api.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Request Parameters API allows creating parameter sets, a.k.a. paramsets, that can override or take the place of parameters defined in `solrconfig.xml`.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 44ef0b1..3243f4a 100644
--- a/solr/solr-ref-guide/src/requestdispatcher-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/requestdispatcher-in-solrconfig.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The `requestDispatcher` element of `solrconfig.xml` controls the way the Solr HTTP `RequestDispatcher` implementation responds to requests.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 380e2c5..15ddef6 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,22 @@
 = 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
+// 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.
 
 After the `<query>` section of `solrconfig.xml`, request handlers and search components are configured.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 3fe3bf4..2cb03ee 100644
--- a/solr/solr-ref-guide/src/response-writers.adoc
+++ b/solr/solr-ref-guide/src/response-writers.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 A Response Writer generates the formatted response of a search. Solr supports a variety of Response Writers to ensure that query responses can be parsed by the appropriate language or application.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 0321445..932e373 100644
--- a/solr/solr-ref-guide/src/result-clustering.adoc
+++ b/solr/solr-ref-guide/src/result-clustering.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The *clustering* (or *cluster analysis*) plugin attempts to automatically discover groups of related search hits (documents) and assign human-readable labels to these groups.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 d2dfafb..72a79a1 100644
--- a/solr/solr-ref-guide/src/result-grouping.adoc
+++ b/solr/solr-ref-guide/src/result-grouping.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Result Grouping groups documents with a common field value into groups and returns the top documents for each group.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 3e1cb28..76a6c4f 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,22 @@
 = 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
+// 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.
 
 Solr allows configuring roles to control user access to the system.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 c069cf3..30e15eb 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,22 @@
 = 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
+// 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.
 
 When Solr needs to assign nodes to collections, it can either automatically assign them randomly or the user can specify a set of nodes where it should create the replicas.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 4e51446..b3e12a5 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,22 @@
 = 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
+// 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.
 
 Solr has support for writing and reading its index and transaction log files to the HDFS distributed filesystem.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/src/running-solr.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/running-solr.adoc b/solr/solr-ref-guide/src/running-solr.adoc
index 6cb904d..ecc4112 100644
--- a/solr/solr-ref-guide/src/running-solr.adoc
+++ b/solr/solr-ref-guide/src/running-solr.adoc
@@ -1,6 +1,22 @@
 = Running Solr
 :page-shortname: running-solr
 :page-permalink: running-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
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section describes how to run Solr with an example schema, how to add documents, and how to run queries.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 c143d7f..3918f9e 100644
--- a/solr/solr-ref-guide/src/running-your-analyzer.adoc
+++ b/solr/solr-ref-guide/src/running-your-analyzer.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Once you've <<field-type-definitions-and-properties.adoc#field-type-definitions-and-properties,defined a field type in your Schema>>, and specified the analysis steps that you want applied to it, you should test it out to make sure that it behaves the way you expect it to.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 e414be0..1710936 100644
--- a/solr/solr-ref-guide/src/schema-api.adoc
+++ b/solr/solr-ref-guide/src/schema-api.adoc
@@ -1,6 +1,22 @@
 = Schema API
 :page-shortname: schema-api
 :page-permalink: schema-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
+// 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.
 
 The Schema API allows you to use an HTTP API to manage many of the elements of your schema.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 58444d9..e797255 100644
--- a/solr/solr-ref-guide/src/schema-browser-screen.adoc
+++ b/solr/solr-ref-guide/src/schema-browser-screen.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Schema Browser screen lets you review schema data in a browser window.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 400bc16..4254e61 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,22 @@
 = 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
+// 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.
 
 Solr's <<schema-api.adoc#schema-api,Schema API>> enables remote clients to access <<documents-fields-and-schema-design.adoc#documents-fields-and-schema-design,schema>> information, and make schema modifications, through a REST interface.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 992beac..05ad77e 100644
--- a/solr/solr-ref-guide/src/schemaless-mode.adoc
+++ b/solr/solr-ref-guide/src/schemaless-mode.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Schemaless Mode is a set of Solr features that, when used together, allow users to rapidly construct an effective schema by simply indexing sample data, without having to manually edit the schema.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 67cb851..426976c 100644
--- a/solr/solr-ref-guide/src/searching.adoc
+++ b/solr/solr-ref-guide/src/searching.adoc
@@ -2,6 +2,22 @@
 :page-shortname: searching
 :page-permalink: searching.html
 :page-children: overview-of-searching-in-solr, velocity-search-ui, relevance, query-syntax-and-parsing, 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
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section describes how Solr works with search requests. It covers the following topics:
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 e8a226b..72f67f9 100644
--- a/solr/solr-ref-guide/src/securing-solr.adoc
+++ b/solr/solr-ref-guide/src/securing-solr.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 When planning how to secure Solr, you should consider which of the available features or approaches are right for you.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 1f11fb1..c5a4395 100644
--- a/solr/solr-ref-guide/src/segments-info.adoc
+++ b/solr/solr-ref-guide/src/segments-info.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Segments Info screen lets you see a visualization of the various segments in the underlying Lucene index for this core, with information about the size of each segment – both bytes and in number of documents – as well as other basic metadata about those segments. Most visible is the the number of deleted documents, but you can hover your mouse over the segments to see additional numeric details.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 451c3f8..9aa4d05 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,22 @@
 = 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
+// 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.
 
 Although Solr comes bundled with http://zookeeper.apache.org[Apache ZooKeeper], you should consider yourself discouraged from using this internal ZooKeeper in production.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 930779c..4e1c03e 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,22 @@
 = 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
+// 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.
 
 When your collection is too large for one node, you can break it up and store it in sections by creating multiple *shards*.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 1c94a8b..d5fc5c8 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,22 @@
 = Solr Control Script Reference
 :page-shortname: solr-control-script-reference
 :page-permalink: solr-control-script-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
+// 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.
 
 Solr includes a script known as "`bin/solr`" that allows you to perform many common operations on your Solr installation or cluster.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 2e44bab..ee9a7c7 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
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 In Solr, the term _core_ is used to refer to a single index and associated transaction log and configuration files (including the `solrconfig.xml` and Schema files, among others). Your Solr installation can have multiple cores if needed, which allows you to index data with different structures in the same server, and maintain more control over how your data is presented to different audiences. In SolrCloud mode you will be more familiar with the term _collection._ Behind the scenes a collection consists of one or more cores.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 b9bf1da..811511e 100644
--- a/solr/solr-ref-guide/src/solr-field-types.adoc
+++ b/solr/solr-ref-guide/src/solr-field-types.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 The field type defines how Solr should interpret data in a field and how the field can be queried. There are many field types included with Solr by default, and they can also be defined locally.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 d5c0ca2..1feed2f 100644
--- a/solr/solr-ref-guide/src/solr-glossary.adoc
+++ b/solr/solr-ref-guide/src/solr-glossary.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 These are common terms used with Solr.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 dd81b0e..d6a69d5 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,22 @@
 = 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
+// 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.
 
 The Solr JDBC driver can support Apache Zeppelin.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 af70dfd..f3ecc86 100644
--- a/solr/solr-ref-guide/src/solr-jdbc-dbvisualizer.adoc
+++ b/solr/solr-ref-guide/src/solr-jdbc-dbvisualizer.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Solr's JDBC driver supports DBVisualizer for querying Solr.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 4158bb0..2cdafed 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,22 @@
 = 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
+// 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.
 
 Solr's JDBC driver supports Python and Jython.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 3dedbcc..0809763 100644
--- a/solr/solr-ref-guide/src/solr-jdbc-r.adoc
+++ b/solr/solr-ref-guide/src/solr-jdbc-r.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 R supports accessing JDBC using the https://www.rforge.net/RJDBC/[RJDBC] library.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 bac4cbd..607aa3d 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,22 @@
 = 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
+// 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.
 
 For http://squirrel-sql.sourceforge.net[SQuirreL SQL], you will need to create a new driver for Solr. This will add several SolrJ client .jars to the SQuirreL SQL classpath. The files required are:
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 05b264a..58cc81b 100644
--- a/solr/solr-ref-guide/src/solr-plugins.adoc
+++ b/solr/solr-ref-guide/src/solr-plugins.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 Solr allows you to load custom code to perform a variety of tasks within Solr, from custom Request Handlers to process your searches, to custom Analyzers and Token Filters for your text field. You can even load custom Field Types. These pieces of custom code are called plugins.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 c4f3c55..539dc38 100644
--- a/solr/solr-ref-guide/src/solrcloud-configuration-and-parameters.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-configuration-and-parameters.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 In this section, we'll cover the various configuration options for SolrCloud.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 6f79c6a..20688ea 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,22 @@
 = 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
+// 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.
 
 If you are migrating from a non-SolrCloud environment to SolrCloud, this information may be helpful.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 b095862..db59ada 100644
--- a/solr/solr-ref-guide/src/solrcloud.adoc
+++ b/solr/solr-ref-guide/src/solrcloud.adoc
@@ -2,6 +2,22 @@
 :page-shortname: solrcloud
 :page-permalink: solrcloud.html
 :page-children: getting-started-with-solrcloud, how-solrcloud-works, solrcloud-configuration-and-parameters, rule-based-replica-placement, cross-data-center-replication-cdcr
+// 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.
 
 Apache Solr includes the ability to set up a cluster of Solr servers that combines fault tolerance and high availability. Called *SolrCloud*, these capabilities provide distributed indexing and search capabilities, supporting the following features:
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 af1d0ba..c44ed77 100644
--- a/solr/solr-ref-guide/src/spatial-search.adoc
+++ b/solr/solr-ref-guide/src/spatial-search.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Solr supports location data for use in spatial/geospatial searches.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 770ea44..c371192 100644
--- a/solr/solr-ref-guide/src/spell-checking.adoc
+++ b/solr/solr-ref-guide/src/spell-checking.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The SpellCheck component is designed to provide inline query suggestions based on other, similar, terms.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/src/stream-decorators.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-decorators.adoc b/solr/solr-ref-guide/src/stream-decorators.adoc
index 08282c1..cbbc9ef 100644
--- a/solr/solr-ref-guide/src/stream-decorators.adoc
+++ b/solr/solr-ref-guide/src/stream-decorators.adoc
@@ -3,6 +3,22 @@
 :page-permalink: stream-decorators.html
 :page-tocclass: right
 :page-toclevels: 1
+// 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.
 
 == cartesianProduct
 //TODO


[15/27] lucene-solr:jira/solr-10233: SOLR-10698: StreamHandler should allow connections to be closed early

Posted by tf...@apache.org.
SOLR-10698: StreamHandler should allow connections to be closed early


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

Branch: refs/heads/jira/solr-10233
Commit: 02b1c8aa360c8c87bf4cc20b688d7993ec6d7b1b
Parents: f62248c
Author: Joel Bernstein <jb...@apache.org>
Authored: Mon May 22 10:43:40 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Mon May 22 10:44:02 2017 -0400

----------------------------------------------------------------------
 .../org/apache/solr/handler/ExportWriter.java   |  1 -
 .../solr/client/solrj/impl/HttpSolrClient.java  |  2 ++
 .../solr/client/solrj/io/stream/SolrStream.java | 14 ++++----
 .../client/solrj/io/stream/TupleStream.java     | 36 ++++++++++++++++++--
 4 files changed, 41 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/02b1c8aa/solr/core/src/java/org/apache/solr/handler/ExportWriter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/ExportWriter.java b/solr/core/src/java/org/apache/solr/handler/ExportWriter.java
index bd43d5f..46ec3a4 100644
--- a/solr/core/src/java/org/apache/solr/handler/ExportWriter.java
+++ b/solr/core/src/java/org/apache/solr/handler/ExportWriter.java
@@ -270,7 +270,6 @@ public class ExportWriter implements SolrCore.RawWriter, Closeable {
         }
       } catch(Throwable e) {
         Throwable ex = e;
-        e.printStackTrace();
         while(ex != null) {
           String m = ex.getMessage();
           if(m != null && m.contains("Broken pipe")) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/02b1c8aa/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 1692aa9..dea1711 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
@@ -544,6 +544,7 @@ public class HttpSolrClient extends SolrClient {
       // Execute the method.
       HttpClientContext httpClientRequestContext = HttpClientUtil.createNewHttpClientRequestContext();
       final HttpResponse response = httpClient.execute(method, httpClientRequestContext);
+
       int httpStatus = response.getStatusLine().getStatusCode();
       
       // Read the contents
@@ -582,6 +583,7 @@ public class HttpSolrClient extends SolrClient {
         // no processor specified, return raw stream
         NamedList<Object> rsp = new NamedList<>();
         rsp.add("stream", respBody);
+        rsp.add("closeableResponse", response);
         // Only case where stream should not be closed
         shouldClose = false;
         return rsp;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/02b1c8aa/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java
index f132815..2bb2e1c 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/SolrStream.java
@@ -26,6 +26,8 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrRequest;
 import org.apache.solr.client.solrj.SolrServerException;
@@ -68,6 +70,7 @@ public class SolrStream extends TupleStream {
   private transient SolrClientCache cache;
   private String slice;
   private long checkpoint = -1;
+  private CloseableHttpResponse closeableHttpResponse;
 
   /**
    * @param baseUrl Base URL of the stream.
@@ -188,11 +191,7 @@ public class SolrStream extends TupleStream {
   * */
 
   public void close() throws IOException {
-
-    if (tupleStreamParser != null) {
-      tupleStreamParser.close();
-    }
-
+    closeableHttpResponse.close();
     if(cache == null) {
       client.close();
     }
@@ -266,7 +265,7 @@ public class SolrStream extends TupleStream {
   }
 
   // temporary...
-  public static TupleStreamParser constructParser(SolrClient server, SolrParams requestParams) throws IOException, SolrServerException {
+  public TupleStreamParser constructParser(SolrClient server, SolrParams requestParams) throws IOException, SolrServerException {
     String p = requestParams.get("qt");
     if (p != null) {
       ModifiableSolrParams modifiableSolrParams = (ModifiableSolrParams) requestParams;
@@ -280,6 +279,7 @@ public class SolrStream extends TupleStream {
     query.setMethod(SolrRequest.METHOD.POST);
     NamedList<Object> genericResponse = server.request(query);
     InputStream stream = (InputStream) genericResponse.get("stream");
+    this.closeableHttpResponse = (CloseableHttpResponse)genericResponse.get("closeableResponse");
     if (CommonParams.JAVABIN.equals(wt)) {
       return new JavabinTupleStreamParser(stream, true);
     } else {
@@ -287,6 +287,4 @@ public class SolrStream extends TupleStream {
       return new JSONTupleStream(reader);
     }
   }
-
-
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/02b1c8aa/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TupleStream.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TupleStream.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TupleStream.java
index ceea6af..0542bd6 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TupleStream.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/TupleStream.java
@@ -18,7 +18,9 @@ package org.apache.solr.client.solrj.io.stream;
 
 import java.io.Closeable;
 import java.io.IOException;
+import java.io.PrintWriter;
 import java.io.Serializable;
+import java.lang.invoke.MethodHandles;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -44,10 +46,14 @@ import org.apache.solr.common.cloud.Slice;
 import org.apache.solr.common.cloud.ZkCoreNodeProps;
 import org.apache.solr.common.cloud.ZkStateReader;
 import org.apache.solr.common.util.StrUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 public abstract class TupleStream implements Closeable, Serializable, MapWriter {
 
+  private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
   private static final long serialVersionUID = 1;
   
   private UUID streamNodeId = UUID.randomUUID();
@@ -78,7 +84,7 @@ public abstract class TupleStream implements Closeable, Serializable, MapWriter
     open();
     ew.put("docs", (IteratorWriter) iw -> {
       try {
-        for (; ; ) {
+        for ( ; ; ) {
           Tuple tuple = read();
           if (tuple != null) {
             iw.add(tuple);
@@ -90,8 +96,22 @@ public abstract class TupleStream implements Closeable, Serializable, MapWriter
             break;
           }
         }
-      } catch (IOException e) {
-        throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e);
+      } catch (Throwable e) {
+        close();
+        Throwable ex = e;
+        while(ex != null) {
+          String m = ex.getMessage();
+          if(m != null && m.contains("Broken pipe")) {
+            throw new IgnoreException();
+          }
+          ex = ex.getCause();
+        }
+
+        if(e instanceof IOException) {
+          throw e;
+        } else {
+          throw new IOException(e);
+        }
       }
     });
   }
@@ -178,4 +198,14 @@ public abstract class TupleStream implements Closeable, Serializable, MapWriter
 
     throw new IOException("Slices not found for " + collectionName);
   }
+
+  public static class IgnoreException extends IOException {
+    public void printStackTrace(PrintWriter pw) {
+      pw.print("Early Client Disconnect");
+    }
+
+    public String getMessage() {
+      return "Early Client Disconnect";
+    }
+  }
 }
\ No newline at end of file


[06/27] lucene-solr:jira/solr-10233: SOLR-10042: Clean up old comments from Angular UI code

Posted by tf...@apache.org.
SOLR-10042: Clean up old comments from Angular UI 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/467af790
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/467af790
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/467af790

Branch: refs/heads/jira/solr-10233
Commit: 467af790cbf50b5633204e384c0efbf19fad30de
Parents: 629624d
Author: Jan Høydahl <ja...@apache.org>
Authored: Fri May 19 13:17:14 2017 +0200
Committer: Jan Høydahl <ja...@apache.org>
Committed: Fri May 19 13:17:14 2017 +0200

----------------------------------------------------------------------
 solr/webapp/web/js/angular/app.js               | 252 -----------------
 .../web/js/angular/controllers/analysis.js      |  10 -
 .../web/js/angular/controllers/core-overview.js |  32 ---
 solr/webapp/web/js/angular/controllers/cores.js | 283 -------------------
 .../webapp/web/js/angular/controllers/schema.js |  17 --
 5 files changed, 594 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/467af790/solr/webapp/web/js/angular/app.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/app.js b/solr/webapp/web/js/angular/app.js
index c4ebef5..1b7aa00 100644
--- a/solr/webapp/web/js/angular/app.js
+++ b/solr/webapp/web/js/angular/app.js
@@ -463,255 +463,3 @@ solrAdminApp.controller('MainController', function($scope, $route, $rootScope, $
       $rootScope.exceptions = {};
   });
 });
-
-
-
-/* THE BELOW CODE IS TAKEN FROM js/scripts/app.js, AND STILL REQUIRES INTEGRATING
-
-
-// @todo clear timeouts
-
-    // activate_core
-    this.before
-    (
-      {},
-      function( context )
-      {
-
-        var menu_wrapper = $( '#menu-wrapper' );
-
-        // global dashboard doesn't have params.splat
-        if( !this.params.splat )
-        {
-          this.params.splat = [ '~index' ];
-        }
-
-        var selector = '~' === this.params.splat[0][0]
-                     ? '#' + this.params.splat[0].replace( /^~/, '' ) + '.global'
-                     : '#core-selector #' + this.params.splat[0].replace( /\./g, '__' );
-
-        var active_element = $( selector, menu_wrapper );
-
-        // @todo "There is no core with this name"
-
-        if( active_element.hasClass( 'global' ) )
-        {
-          active_element
-            .addClass( 'active' );
-
-          if( this.params.splat[1] )
-          {
-            $( '.' + this.params.splat[1], active_element )
-              .addClass( 'active' );
-          }
-
-          $( '#core-selector option[selected]' )
-            .removeAttr( 'selected' )
-            .trigger( 'liszt:updated' );
-
-          $( '#core-selector .chzn-container > a' )
-            .addClass( 'chzn-default' );
-        }
-        else
-        {
-          active_element
-            .attr( 'selected', 'selected' )
-            .trigger( 'liszt:updated' );
-
-
-          $( '#core-menu .' + this.params.splat[1] )
-            .addClass( 'active' );
-
-      }
-    );
-  }
-);
-
-var solr_admin = function( app_config )
-{
-  this.menu_element = $( '#core-selector select' );
-  this.core_menu = $( '#core-menu ul' );
-
-  this.config = config;
-  this.timeout = null;
-
-  this.core_regex_base = '^#\\/([\\w\\d-\\.]+)';
-
-  show_global_error = function( error )
-  {
-    var main = $( '#main' );
-
-    $( 'div[id$="-wrapper"]', main )
-      .remove();
-
-    main
-      .addClass( 'error' )
-      .append( error );
-
-    var pre_tags = $( 'pre', main );
-    if( 0 !== pre_tags.size() )
-    {
-      hljs.highlightBlock( pre_tags.get(0) );
-    }
-  };
-
-  sort_cores_data = function sort_cores_data( cores_status )
-  {
-    // build array of core-names for sorting
-    var core_names = [];
-    for( var core_name in cores_status )
-    {
-      core_names.push( core_name );
-    }
-    core_names.sort();
-
-    var core_count = core_names.length;
-    var cores = {};
-
-    for( var i = 0; i < core_count; i++ )
-    {
-      var core_name = core_names[i];
-      cores[core_name] = cores_status[core_name];
-    }
-
-    return cores;
-  };
-
-  this.set_cores_data = function set_cores_data( cores )
-  {
-    that.cores_data = sort_cores_data( cores.status );
-
-    that.menu_element
-      .empty();
-
-    var core_list = [];
-    core_list.push( '<option></option>' );
-
-    var core_count = 0;
-    for( var core_name in that.cores_data )
-    {
-      core_count++;
-      var core_path = config.solr_path + '/' + core_name;
-      var classes = [];
-
-      if( cores.status[core_name]['isDefaultCore'] )
-      {
-        classes.push( 'default' );
-      }
-
-      var core_tpl = '<option '
-                   + '    id="' + core_name.replace( /\./g, '__' ) + '" '
-                   + '    class="' + classes.join( ' ' ) + '"'
-                   + '    data-basepath="' + core_path + '"'
-                   + '    schema="' + cores.status[core_name]['schema'] + '"'
-                   + '    config="' + cores.status[core_name]['config'] + '"'
-                   + '    value="#/' + core_name + '"'
-                   + '    title="' + core_name + '"'
-                   + '>'
-                   + core_name
-                   + '</option>';
-
-      core_list.push( core_tpl );
-    }
-
-    var has_cores = 0 !== core_count;
-    if( has_cores )
-    {
-      that.menu_element
-        .append( core_list.join( "\n" ) )
-        .trigger( 'liszt:updated' );
-    }
-
-    var core_selector = $( '#core-selector' );
-
-    if( has_cores )
-    {
-      var cores_element = core_selector.find( '#has-cores' );
-      var selector_width = cores_element.width();
-
-      cores_element.find( '.chzn-container' )
-        .css( 'width', selector_width + 'px' );
-
-      cores_element.find( '.chzn-drop' )
-        .css( 'width', ( selector_width - 2 ) + 'px' );
-    }
-  };
-
-  this.run = function()
-  {
-    $.ajax
-    (
-      {
-        // load cores (indexInfo = false
-        success : function( response )
-        {
-
-          var system_url = config.solr_path + '/admin/info/system?wt=json';
-          $.ajax
-          (
-            {
-              url : system_url,
-              dataType : 'json',
-              beforeSend : function( arr, form, options )
-              {
-              },
-              success : function( response )
-              {
-                that.dashboard_values = response;
-
-                var environment_args = null;
-                var cloud_args = null;
-
-                if( response.jvm && response.jvm.jmx && response.jvm.jmx.commandLineArgs )
-                {
-                  var command_line_args = response.jvm.jmx.commandLineArgs.join( ' | ' );
-
-                  environment_args = command_line_args.match( /-Dsolr.environment=((dev|test|prod)?[\w\d]*)/i );
-                }
-
-// @todo detect $scope.isCloud = response.mode.match( /solrcloud/i );
-
-                // environment
-
-                var wrapper = $( '#wrapper' );
-                var environment_element = $( '#environment' );
-                if( environment_args )
-                {
-                  wrapper
-                    .addClass( 'has-environment' );
-
-                  if( environment_args[1] )
-                  {
-                    environment_element
-                      .html( environment_args[1] );
-                  }
-
-                  if( environment_args[2] )
-                  {
-                    environment_element
-                      .addClass( environment_args[2] );
-                  }
-                }
-                else
-                {
-                  wrapper
-                    .removeClass( 'has-environment' );
-                }
-
-                // cloud
-
-                var cloud_nav_element = $( '#menu #cloud' );
-                if( cloud_args )
-                {
-                  cloud_nav_element
-                    .show();
-                }
-
-                // sammy
-
-                sammy.run( location.hash );
-              },
-              error : function()
-              {
-  };
-*/

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/467af790/solr/webapp/web/js/angular/controllers/analysis.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/controllers/analysis.js b/solr/webapp/web/js/angular/controllers/analysis.js
index 48ec369..5fff59c 100644
--- a/solr/webapp/web/js/angular/controllers/analysis.js
+++ b/solr/webapp/web/js/angular/controllers/analysis.js
@@ -199,13 +199,3 @@ solrAdminApp.controller('AnalysisController',
       $scope.refresh();
     }
 );
-
-/***************
-
-function(error) {
-  if (error.status == 404) {
-    $scope.isHandlerMissing = true;
-  } else {
-    $scope.analysisError = error.error.msg;
-  }
-****/
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/467af790/solr/webapp/web/js/angular/controllers/core-overview.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/controllers/core-overview.js b/solr/webapp/web/js/angular/controllers/core-overview.js
index 20f30e1..7aa9685 100644
--- a/solr/webapp/web/js/angular/controllers/core-overview.js
+++ b/solr/webapp/web/js/angular/controllers/core-overview.js
@@ -52,38 +52,6 @@ function($scope, $rootScope, $routeParams, Luke, CoreSystem, Update, Replication
       function(error) {
         $scope.replicationMessage = "Replication is not configured";
       });
-  /*
-      /replication?command=details&wt=json
-
-              if( is_slave )
-              {
-
-                // warnings if slave version|gen doesn't match what's replicable
-                if( data.indexVersion !== master_data.master.replicableVersion )
-                {
-                  $( '.version', details_element )
-                    .addClass( 'diff' );
-                }
-                else
-                {
-                  $( '.version', details_element )
-                    .removeClass( 'diff' );
-                }
-
-                if( data.generation !== master_data.master.replicableGeneration )
-                {
-                  $( '.generation', details_element )
-                    .addClass( 'diff' );
-                }
-                else
-                {
-                  $( '.generation', details_element )
-                    .removeClass( 'diff' );
-                }
-              }
-            },
-
-*/
   };
 
   $scope.refreshAdminExtra = function() {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/467af790/solr/webapp/web/js/angular/controllers/cores.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/controllers/cores.js b/solr/webapp/web/js/angular/controllers/cores.js
index d135395..0188617 100644
--- a/solr/webapp/web/js/angular/controllers/cores.js
+++ b/solr/webapp/web/js/angular/controllers/cores.js
@@ -193,286 +193,3 @@ solrAdminApp.controller('CoreAdminController',
       $scope.refresh();
     }
 );
-
-/**************
-  'cores_load_data',
-  function( event, params )
-  {
-    $.ajax
-    (
-      {
-        url : app.config.solr_path + app.config.core_admin_path + '?wt=json',
-        dataType : 'json',
-        success : function( response, text_status, xhr )
-        {
-          if( params.only_failures )
-          {
-            app.check_for_init_failures( response );
-            return true;
-          }
-
-
-=========== NO CORES
-        error : function()
-        {
-          sammy.trigger
-          (
-            'cores_load_template',
-            {
-              content_element : content_element,
-              callback : function()
-              {
-                var cores_element = $( '#cores', content_element );
-                var navigation_element = $( '#navigation', cores_element );
-                var data_element = $( '#data', cores_element );
-                var core_data_element = $( '#core-data', data_element );
-                var index_data_element = $( '#index-data', data_element );
-
-                // layout
-
-                var ui_block = $( '#ui-block' );
-                var actions_element = $( '.actions', cores_element );
-                var div_action = $( 'div.action', actions_element );
-
-                ui_block
-                  .css( 'opacity', 0.7 )
-                  .width( cores_element.width() + 10 )
-                  .height( cores_element.height() );
-
-                if( $( '#cloud.global' ).is( ':visible' ) )
-                {
-                  $( '.cloud', div_action )
-                    .show();
-                }
-
-                $( 'button.action', actions_element )
-                  .die( 'click' )
-                  .live
-                  (
-                    'click',
-                    function( event )
-                    {
-                      var self = $( this );
-
-                      self
-                        .toggleClass( 'open' );
-
-                      $( '.action.' + self.attr( 'id' ), actions_element )
-                        .trigger( 'open' );
-
-                      return false;
-                    }
-                  );
-
-                div_action
-                  .die( 'close' )
-                  .live
-                  (
-                    'close',
-                    function( event )
-                    {
-                      div_action.hide();
-                      ui_block.hide();
-                    }
-                  )
-                  .die( 'open' )
-                  .live
-                  (
-                    'open',
-                    function( event )
-                    {
-                      var self = $( this );
-                      var rel = $( '#' + self.data( 'rel' ) );
-
-                      self
-                        .trigger( 'close' )
-                        .show()
-                        .css( 'left', rel.position().left );
-
-                      ui_block
-                        .show();
-                    }
-                  );
-
-                $( 'form button.reset', actions_element )
-                  .die( 'click' )
-                  .live
-                  (
-                    'click',
-                    function( event )
-                    {
-                      $( this ).closest( 'div.action' )
-                        .trigger( 'close' );
-                    }
-                  );
-
-                $( 'form', div_action )
-                  .ajaxForm
-                  (
-                    {
-                      url : app.config.solr_path + app.config.core_admin_path + '?wt=json&indexInfo=false',
-                      dataType : 'json',
-                      beforeSubmit : function( array, form, options )
-                      {
-                        $( 'button[type="submit"] span', form )
-                          .addClass( 'loader' );
-                      },
-                      success : function( response, status_text, xhr, form )
-                      {
-                        delete app.cores_data;
-                        sammy.refresh();
-
-                        $( 'button.reset', form )
-                          .trigger( 'click' );
-                      },
-                      error : function( xhr, text_status, error_thrown )
-                      {
-                        var response = null;
-                        eval( 'response = ' + xhr.responseText + ';' );
-
-                        var error_elem = $( '.error', div_action.filter( ':visible' ) );
-                        error_elem.show();
-                        $( 'span', error_elem ).text( response.error.msg );
-                      },
-                      complete : function()
-                      {
-                        $( 'button span.loader', actions_element )
-                          .removeClass( 'loader' );
-                      }
-                    }
-                  );
-
-                // --
-
-                $( '#add', content_element )
-                  .trigger( 'click' );
-
-                $( '[data-rel="add"] input[type="text"]:first', content_element )
-                  .focus();
-              }
-            }
-          );
-        }
-      }
-    );
-  }
-);
-
-// #/~cores
-sammy.get
-(
-  /^#\/(~cores)\//,
-  function( context )
-  {
-    var content_element = $( '#content' );
-
-    var path_parts = this.path.match( /^(.+\/~cores\/)(.*)$/ );
-    var current_core = path_parts[2];
-
-    sammy.trigger
-    (
-      'cores_load_data',
-      {
-        error : function()
-        {
-          context.redirect( '#/' + context.params.splat[0] );
-        },
-        success : function( cores )
-        {
-          sammy.trigger
-          (
-            'cores_load_template',
-            {
-              content_element : content_element,
-              callback : function()
-              {
-                var cores_element = $( '#cores', content_element );
-                var navigation_element = $( '#navigation', cores_element );
-                var data_element = $( '#data', cores_element );
-                var core_data_element = $( '#core-data', data_element );
-                var index_data_element = $( '#index-data', data_element );
-
-                cores_element
-                  .removeClass( 'empty' );
-
-                var core_data = cores[current_core];
-                var core_basepath = $( '#' + current_core, app.menu_element ).attr( 'data-basepath' );
-
-                var core_names = [];
-                var core_selects = $( '#actions select', cores_element );
-
-                $( 'option[value="' + current_core + '"]', core_selects.filter( '.other' ) )
-                  .remove();
-
-                $( 'input[data-core="current"]', cores_element )
-                  .val( current_core );
-
-                // layout
-
-                var ui_block = $( '#ui-block' );
-                var actions_element = $( '.actions', cores_element );
-                var div_action = $( 'div.action', actions_element );
-
-                ui_block
-                  .css( 'opacity', 0.7 )
-                  .width( cores_element.width() + 10 )
-                  .height( cores_element.height() );
-
-                if( $( '#cloud.global' ).is( ':visible' ) )
-                {
-                  $( '.cloud', div_action )
-                    .show();
-                }
-
-                var form_callback = {
-
-                  rename : function( form, response )
-                  {
-                    var url = path_parts[1] + $( 'input[name="other"]', form ).val();
-                    context.redirect( url );
-                  }
-
-                };
-
-                $( 'form', div_action )
-                  .ajaxForm
-                  (
-                    {
-                      url : app.config.solr_path + app.config.core_admin_path + '?wt=json&indexInfo=false',
-                      success : function( response, status_text, xhr, form )
-                      {
-                        var action = $( 'input[name="action"]', form ).val().toLowerCase();
-
-                        delete app.cores_data;
-
-                        if( form_callback[action] )
-                        {
-                         form_callback[action]( form, response );
-                        }
-                        else
-                        {
-                          sammy.refresh();
-                        }
-
-                        $( 'button.reset', form )
-                          .trigger( 'click' );
-                      },
-                  );
-
-                $( '#actions #unload', cores_element )
-                      var ret = confirm( 'Do you really want to unload Core "' + current_core + '"?' );
-                      if( !ret )
-                        return false;
-
-                          url : app.config.solr_path + app.config.core_admin_path + '?wt=json&action=UNLOAD&core=' + current_core,
-                          success : function( response, text_status, xhr )
-                          {
-                            delete app.cores_data;
-                            context.redirect( path_parts[1].substr( 0, path_parts[1].length - 1 ) );
-                          },
-
-                optimize_button
-                          url : core_basepath + '/update?optimize=true&waitFlush=true&wt=json',
-                          success : function( response, text_status, xhr )
-
-******/

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/467af790/solr/webapp/web/js/angular/controllers/schema.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/controllers/schema.js b/solr/webapp/web/js/angular/controllers/schema.js
index 94dd93e..a6f184c 100644
--- a/solr/webapp/web/js/angular/controllers/schema.js
+++ b/solr/webapp/web/js/angular/controllers/schema.js
@@ -612,20 +612,3 @@ var sortedObjectArray = function(list) {
 var shortenPackages = function(className) {
     return className.replace("org.apache.solr", "o.a.s").replace("org.apache.lucene", "o.a.l");
 };
-
-/*
-        var get_width = function get_width()
-        {
-          return $( this ).width();
-        }
-
-  var max_width = 10 + Math.max.apply( Math, $( 'p', topterms_table_element ).map( get_width ).get() );
-  topterms:
-    p { width: {{maxWidth}}px !important; }
-    ul { margin-left: {{max_width + 5 }}px !important; }
-
-  var max_width = 10 + Math.max.apply( Math, $( 'dt', histogram_holder_element ).map( get_width ).get() );
-  histogram_holder:
-    ul { margin-left: {{maxWidth}}px !important; }
-    li dt { left: {{-maxWidth}}px !important; width: {{maxWidth}}px !important; }
-*/


[02/27] lucene-solr:jira/solr-10233: SOLR-10413: Fix test failure (with better json validators we can capture invalid input)

Posted by tf...@apache.org.
SOLR-10413: Fix test failure (with better json validators we can capture invalid input)


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

Branch: refs/heads/jira/solr-10233
Commit: 9e3c710d0c7d8d82468c4e6a99717b08655db486
Parents: d30d012
Author: Cao Manh Dat <da...@apache.org>
Authored: Fri May 19 09:35:43 2017 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Fri May 19 09:35:43 2017 +0700

----------------------------------------------------------------------
 .../test/org/apache/solr/handler/admin/TestCollectionAPIs.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9e3c710d/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java b/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
index dec1e04..7b79443 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
@@ -27,6 +27,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.solr.SolrTestCaseJ4;
+import org.apache.solr.api.ApiException;
 import org.apache.solr.client.solrj.SolrRequest;
 import org.apache.solr.common.cloud.ZkNodeProps;
 import org.apache.solr.common.params.CollectionParams;
@@ -118,7 +119,7 @@ public class TestCollectionAPIs extends SolrTestCaseJ4 {
     );
 
     compareOutput(apiBag, "/collections/collName", POST,
-        "{modify : {rule : 'replica:*,cores:<5', autoAddReplicas : false} }", null,
+        "{modify : {rule : ['replica:*, cores:<5'], autoAddReplicas : false} }", null,
         "{collection: collName, operation : modifycollection , autoAddReplicas : 'false', rule : [{replica: '*', cores : '<5' }]}"
     );
     compareOutput(apiBag, "/cluster", POST,
@@ -185,7 +186,7 @@ public class TestCollectionAPIs extends SolrTestCaseJ4 {
     };
     try {
       api.call(req, rsp);
-    } catch (ApiBag.ExceptionWithErrObject e) {
+    } catch (ApiException e) {
       throw new RuntimeException(e.getMessage() + Utils.toJSONString(e.getErrs()), e);
 
     }


[26/27] lucene-solr:jira/solr-10233: Fix issue with test tlog replica

Posted by tf...@apache.org.
Fix issue with test tlog replica


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

Branch: refs/heads/jira/solr-10233
Commit: 7382b65644a9d704f44039063947dc8583f6135e
Parents: 70bd593
Author: Tomas Fernandez Lobbe <tf...@apache.org>
Authored: Mon May 22 16:26:37 2017 -0700
Committer: Tomas Fernandez Lobbe <tf...@apache.org>
Committed: Mon May 22 16:26:37 2017 -0700

----------------------------------------------------------------------
 .../test/org/apache/solr/cloud/TestTlogReplica.java   | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/7382b656/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 a4070b3..b778789 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestTlogReplica.java
@@ -466,8 +466,8 @@ public class TestTlogReplica extends SolrCloudTestCase {
     ChaosMonkey.start(solrRunner);
     waitForState("Replica didn't recover", collectionName, activeReplicaCount(0,2,0));
     // We skip peerSync, so replica will always trigger commit on leader
-//    waitForNumDocsInAllActiveReplicas(4);
-    waitForNumDocsInAllReplicas(4, getCollectionState(collectionName).getReplicas(), 0);// Should be immediate
+    // We query only the non-leader replicas, since we haven't opened a new searcher on the leader yet
+    waitForNumDocsInAllReplicas(4, getNonLeaderReplias(collectionName), 0);// Should be immediate
     
     // If I add the doc immediately, the leader fails to communicate with the follower with broken pipe.
     // Options are, wait or retry...
@@ -489,7 +489,8 @@ public class TestTlogReplica extends SolrCloudTestCase {
     ChaosMonkey.start(solrRunner);
     waitForState("Replica didn't recover", collectionName, activeReplicaCount(0,2,0));
     checkRTG(3,7, cluster.getJettySolrRunners());
-    waitForNumDocsInAllReplicas(5, getCollectionState(collectionName).getReplicas(), 0);// Should be immediate
+    waitForNumDocsInAllReplicas(5, getNonLeaderReplias(collectionName), 0);// Should be immediate
+    cluster.getSolrClient().commit(collectionName);
 
     // Test replica recovery apply buffer updates
     Semaphore waitingForBufferUpdates = new Semaphore(0);
@@ -526,6 +527,11 @@ public class TestTlogReplica extends SolrCloudTestCase {
     }
   }
   
+  private List<Replica> getNonLeaderReplias(String collectionName) {
+    return getCollectionState(collectionName).getReplicas().stream().filter(
+        (r)-> !r.getBool("leader", false)).collect(Collectors.toList());
+  }
+  
   public void testDeleteById() throws Exception{
     createAndWaitForCollection(1,0,2,0);
     CloudSolrClient cloudClient = cluster.getSolrClient();
@@ -667,7 +673,7 @@ public class TestTlogReplica extends SolrCloudTestCase {
       try (HttpSolrClient replicaClient = getHttpSolrClient(r.getCoreUrl())) {
         while (true) {
           try {
-            assertEquals("Replica " + r.getName() + " not up to date after " + REPLICATION_TIMEOUT_SECS + " seconds",
+            assertEquals("Replica " + r.getName() + " not up to date after " + timeout + " seconds",
                 numDocs, replicaClient.query(new SolrQuery(query)).getResults().getNumFound());
             break;
           } catch (AssertionError e) {


[13/27] lucene-solr:jira/solr-10233: SOLR-10292: Moves new feature description in solr/CHANGES.txt to the correct version

Posted by tf...@apache.org.
SOLR-10292: Moves new feature description in solr/CHANGES.txt to the correct version


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

Branch: refs/heads/jira/solr-10233
Commit: a622568979ed0b84fe40174fe8b219599c15b72c
Parents: bc89757
Author: Dennis Gove <dp...@gmail.com>
Authored: Fri May 19 21:10:25 2017 -0400
Committer: Dennis Gove <dp...@gmail.com>
Committed: Fri May 19 21:10:25 2017 -0400

----------------------------------------------------------------------
 solr/CHANGES.txt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/a6225689/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index b7f349b..1a8bc6b 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -82,9 +82,6 @@ New Features
 
 * SOLR-9835: Create another replication mode for SolrCloud
 
-* SOLR-10292: Adds CartesianProductStream which turns a single tuple with a multi-valued field into N 
-  tuples, one for each value in the multi-valued field. (Dennis Gove)
-
 * SOLR-10356: Adds basic math Streaming Evaluators (Dennis Gove)
 
 * SOLR-10393: Adds UUID Streaming Evaluator (Dennis Gove)
@@ -312,6 +309,9 @@ New Features
 * SOLR-8440: Support for enabling basic authentication using bin/solr|bin/solr.cmd. (Ishan Chattopadhyaya, janhoy,
   Noble Paul, Hrishikesh Gadre)
 
+* SOLR-10292: Adds CartesianProductStream which turns a single tuple with a multi-valued field into N
+  tuples, one for each value in the multi-valued field. (Dennis Gove)
+
 Optimizations
 ----------------------
 


[21/27] lucene-solr:jira/solr-10233: SOLR-10725: ASL header in all *.adoc files

Posted by tf...@apache.org.
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 ae77179..75f023c 100644
--- a/solr/solr-ref-guide/src/distributed-requests.adoc
+++ b/solr/solr-ref-guide/src/distributed-requests.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 When a Solr node receives a search request, the request is routed behind the scenes to a replica of a shard that is part of the collection being searched.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 7c7ede8..9b2ca46 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,22 @@
 = 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
+// 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.
 
 When using traditional index sharding, you will need to consider how to query your documents.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 15b2164..608fafe 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
@@ -2,6 +2,22 @@
 :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
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section discusses how Solr organizes its data into documents and fields, as well as how to work with a schema in Solr.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 a885e97..4605dd7 100644
--- a/solr/solr-ref-guide/src/documents-screen.adoc
+++ b/solr/solr-ref-guide/src/documents-screen.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Documents screen provides a simple form allowing you to execute various Solr indexing commands in a variety of formats directly from the browser.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 d7ff9ad..b2debda 100644
--- a/solr/solr-ref-guide/src/docvalues.adoc
+++ b/solr/solr-ref-guide/src/docvalues.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 DocValues are a way of recording field values internally that is more efficient for some purposes, such as sorting and faceting, than traditional indexing.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 32888cc..d135dde 100644
--- a/solr/solr-ref-guide/src/dynamic-fields.adoc
+++ b/solr/solr-ref-guide/src/dynamic-fields.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 _Dynamic fields_ allow Solr to index fields that you did not explicitly define in your schema.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 122f104..87394ee 100644
--- a/solr/solr-ref-guide/src/enabling-ssl.adoc
+++ b/solr/solr-ref-guide/src/enabling-ssl.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Solr can encrypt communications to and from clients, and between nodes in SolrCloud mode, with SSL.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 4608992..9030ee3 100644
--- a/solr/solr-ref-guide/src/errata.adoc
+++ b/solr/solr-ref-guide/src/errata.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 [[Errata-ErrataForThisDocumentation]]
 == Errata For This Documentation

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 51639f5..37401a5 100644
--- a/solr/solr-ref-guide/src/exporting-result-sets.adoc
+++ b/solr/solr-ref-guide/src/exporting-result-sets.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 
 It's possible to export fully sorted result sets using a special <<query-re-ranking.adoc#query-re-ranking,rank query parser>> and <<response-writers.adoc#response-writers,response writer>> specifically designed to work together to handle scenarios that involve sorting and exporting millions of records.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 26bfbe2..909fffe 100644
--- a/solr/solr-ref-guide/src/faceting.adoc
+++ b/solr/solr-ref-guide/src/faceting.adoc
@@ -2,6 +2,22 @@
 :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
+// 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.
 
 Faceting is the arrangement of search results into categories based on indexed terms.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 bd014b9..c3fb020 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,22 @@
 = 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
+// 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.
 
 Here is a summary of common use cases, and the attributes the fields or field types should have to support the case. An entry of true or false in the table indicates that the option must be set to the given value for the use case to function correctly. If no entry is provided, the setting of that attribute has no impact on the case.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 df06657..92b32a3 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,22 @@
 = 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
+// 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.
 
 A field type defines the analysis that will occur on a field when documents are indexed or queries are sent to the index.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 8aaef00..88af33b 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,22 @@
 = 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
+// 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.
 
 The following table lists the field types that are available in Solr. The `org.apache.solr.schema` package includes all the classes listed in this table.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 4d134e6..394c489 100644
--- a/solr/solr-ref-guide/src/files-screen.adoc
+++ b/solr/solr-ref-guide/src/files-screen.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Files screen lets you browse & view the various configuration files (such `solrconfig.xml` and the schema file) for the collection you selected.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 f4c8e25..4550685 100644
--- a/solr/solr-ref-guide/src/filter-descriptions.adoc
+++ b/solr/solr-ref-guide/src/filter-descriptions.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Filters examine a stream of tokens and keep them, transform them or discard them, depending on the filter type being used.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 6483ce1..97d6f36 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,22 @@
 = 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
+// 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.
 
 The `solr.xml` file defines some global configuration options that apply to all or many cores.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 99a704a..0a628c1 100644
--- a/solr/solr-ref-guide/src/function-queries.adoc
+++ b/solr/solr-ref-guide/src/function-queries.adoc
@@ -1,6 +1,22 @@
 = Function Queries
 :page-shortname: function-queries
 :page-permalink: function-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
+// 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.
 
 Function queries enable you to generate a relevancy score using the actual value of one or more numeric fields.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 8cbeedc..f8de457 100644
--- a/solr/solr-ref-guide/src/further-assistance.adoc
+++ b/solr/solr-ref-guide/src/further-assistance.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 There is a very active user community around Solr and Lucene. The solr-user mailing list, and #solr IRC channel are both great resources for asking questions.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 85f9cec..d92e49d 100644
--- a/solr/solr-ref-guide/src/getting-assistance.adoc
+++ b/solr/solr-ref-guide/src/getting-assistance.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 At the bottom of each screen of the Admin UI is a set of links that can be used to get more assistance with configuring and using Solr.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 3f7eb65..b07901d 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,22 @@
 = 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
+// 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.
 
 SolrCloud is designed to provide a highly available, fault tolerant environment for distributing your indexed content and query requests across multiple servers.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 3fd7c76..e82e691 100644
--- a/solr/solr-ref-guide/src/getting-started.adoc
+++ b/solr/solr-ref-guide/src/getting-started.adoc
@@ -2,6 +2,22 @@
 :page-shortname: getting-started
 :page-permalink: getting-started.html
 :page-children: installing-solr, running-solr, a-quick-overview, a-step-closer, solr-control-script-reference
+// 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.
 
 Solr makes it easy for programmers to develop sophisticated, high-performance search applications with advanced features such as faceting (arranging search results in columns with numerical counts of key terms).
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 66e55d2..003a94a 100644
--- a/solr/solr-ref-guide/src/graph-traversal.adoc
+++ b/solr/solr-ref-guide/src/graph-traversal.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Graph traversal with streaming expressions uses the `gatherNodes` function to perform a breadth-first graph traversal.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 cbbb3a1..cafab92 100644
--- a/solr/solr-ref-guide/src/hadoop-authentication-plugin.adoc
+++ b/solr/solr-ref-guide/src/hadoop-authentication-plugin.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Hadoop authentication plugin enables Solr to use the https://hadoop.apache.org/docs/stable/hadoop-auth/index.html[Hadoop authentication library] for securing Solr nodes.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 b0e0cb2..5a55fd2 100644
--- a/solr/solr-ref-guide/src/highlighting.adoc
+++ b/solr/solr-ref-guide/src/highlighting.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Highlighting in Solr allows fragments of documents that match the user's query to be included with the query response.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 ac02870..519a888 100644
--- a/solr/solr-ref-guide/src/how-solrcloud-works.adoc
+++ b/solr/solr-ref-guide/src/how-solrcloud-works.adoc
@@ -2,6 +2,22 @@
 :page-shortname: how-solrcloud-works
 :page-permalink: how-solrcloud-works.html
 :page-children: shards-and-indexing-data-in-solrcloud, distributed-requests, read-and-write-side-fault-tolerance
+// 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.
 
 The following sections cover provide general information about how various SolrCloud features work. To understand these features, it's important to first understand a few key concepts that relate to SolrCloud.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 46e339a..7e5163d 100644
--- a/solr/solr-ref-guide/src/implicit-requesthandlers.adoc
+++ b/solr/solr-ref-guide/src/implicit-requesthandlers.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Solr ships with many out-of-the-box RequestHandlers, which are called implicit because they are not configured in `solrconfig.xml`.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 b606b00..90fa470 100644
--- a/solr/solr-ref-guide/src/index-replication.adoc
+++ b/solr/solr-ref-guide/src/index-replication.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Index Replication distributes complete copies of a master index to one or more slave servers. The master server continues to manage updates to the index. All querying is handled by the slaves. This division of labor enables Solr to scale to provide adequate responsiveness to queries against large search volumes.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 d1f0a84..cc6e7ce 100644
--- a/solr/solr-ref-guide/src/index.adoc
+++ b/solr/solr-ref-guide/src/index.adoc
@@ -2,6 +2,22 @@
 :page-shortname: index
 :page-permalink: index.html
 :page-children: about-this-guide, getting-started, upgrading-solr, using-the-solr-administration-user-interface, documents-fields-and-schema-design, understanding-analyzers-tokenizers-and-filters, indexing-and-basic-data-operations, searching, the-well-configured-solr-instance, managing-solr, solrcloud, legacy-scaling-and-distribution, client-apis, major-changes-from-solr-5-to-solr-6, upgrading-a-solr-cluster, further-assistance, solr-glossary, errata
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This reference guide describes Apache Solr, the open source solution for search. You can download Apache Solr from the Solr website at http://lucene.apache.org/solr/.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 97fe220..74d5f97 100644
--- a/solr/solr-ref-guide/src/indexconfig-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/indexconfig-in-solrconfig.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The `<indexConfig>` section of `solrconfig.xml` defines low-level behavior of the Lucene index writers.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 ebd35e1..932ac8e 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
@@ -2,6 +2,22 @@
 :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
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section describes how Solr adds data to its index. It covers the following topics:
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 1c3db45..48683a2 100644
--- a/solr/solr-ref-guide/src/indexupgrader-tool.adoc
+++ b/solr/solr-ref-guide/src/indexupgrader-tool.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Lucene distribution includes {lucene-javadocs}/core/org/apache/lucene/index/IndexUpgrader.html[a tool that upgrades] an index from previous Lucene versions to the current file format.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 5423801..126e96b 100644
--- a/solr/solr-ref-guide/src/initparams-in-solrconfig.adoc
+++ b/solr/solr-ref-guide/src/initparams-in-solrconfig.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The `<initParams>` section of `solrconfig.xml` allows you to define request handler parameters outside of the handler configuration.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 ab3fe5b..9e12bb6 100644
--- a/solr/solr-ref-guide/src/installing-solr.adoc
+++ b/solr/solr-ref-guide/src/installing-solr.adoc
@@ -1,6 +1,22 @@
 = Installing Solr
 :page-shortname: installing-solr
 :page-permalink: installing-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
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section describes how to install Solr.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 c32f3e2..8430f53 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,22 @@
 = 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
+// 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.
 
 At its heart, Solr is a Web application, but because it is built on open protocols, any type of client application can use Solr.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 9eb4313..1bca385 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,22 @@
 = 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
+// 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.
 
 Both Lucene and Solr were designed to scale to support large implementations with minimal custom coding.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 80f4cfd..2412f01 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,22 @@
 = 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
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section describes the process of indexing: adding content to a Solr index and, if necessary, modifying that content or deleting it.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 7b6553c..45f111b 100644
--- a/solr/solr-ref-guide/src/java-properties.adoc
+++ b/solr/solr-ref-guide/src/java-properties.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Java Properties screen provides easy access to one of the most essential components of a top-performing Solr systems. With the Java Properties screen, you can see all the properties of the JVM running Solr, including the class paths, file encodings, JVM memory settings, operating system, and more.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 dbb0640..4f2c1e0 100644
--- a/solr/solr-ref-guide/src/jvm-settings.adoc
+++ b/solr/solr-ref-guide/src/jvm-settings.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Optimizing the JVM can be a key factor in getting the most from your Solr installation.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 7bf3060..5c95f6c 100644
--- a/solr/solr-ref-guide/src/kerberos-authentication-plugin.adoc
+++ b/solr/solr-ref-guide/src/kerberos-authentication-plugin.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 If you are using Kerberos to secure your network environment, the Kerberos authentication plugin can be used to secure a Solr cluster.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 ea12424..25124e5 100644
--- a/solr/solr-ref-guide/src/language-analysis.adoc
+++ b/solr/solr-ref-guide/src/language-analysis.adoc
@@ -1,6 +1,22 @@
 = 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
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section contains information about tokenizers and filters related to character set conversion or for use with specific languages.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 e6dbe0a..3eb077e 100644
--- a/solr/solr-ref-guide/src/learning-to-rank.adoc
+++ b/solr/solr-ref-guide/src/learning-to-rank.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 With the *Learning To Rank* (or *LTR* for short) contrib module you can configure and run machine learned ranking models in Solr.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 3499387..722ee62 100644
--- a/solr/solr-ref-guide/src/legacy-scaling-and-distribution.adoc
+++ b/solr/solr-ref-guide/src/legacy-scaling-and-distribution.adoc
@@ -2,6 +2,22 @@
 :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
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section describes how to set up distribution and replication in Solr. It is considered "legacy" behavior, since while it is still supported in Solr, the SolrCloud functionality described in the previous chapter is where the current development is headed. However, if you don't need all that SolrCloud delivers, search distribution and index replication may be sufficient.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 036e00a..78c7ee4 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,22 @@
 = 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
+// 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.
 
 Solr allows loading plugins by defining `<lib/>` directives in `solrconfig.xml`.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 1d24b61..4618ec3 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,22 @@
 = 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
+// 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.
 
 Local parameters are arguments in a Solr request that are specific to a query parameter.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 a048b24..d44dcad 100644
--- a/solr/solr-ref-guide/src/logging.adoc
+++ b/solr/solr-ref-guide/src/logging.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The Logging page shows recent messages logged by this Solr node.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 671e5b4..7c2f7d6 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,22 @@
 = 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
+// 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.
 
 There are some major changes in Solr 6 to consider before starting to migrate your configurations and indexes. There are many hundreds of changes, so a thorough review of the <<upgrading-solr.adoc#upgrading-solr,Upgrading Solr>> section as well as the {solr-javadocs}/changes/Changes.html[CHANGES.txt] file in your Solr instance will help you plan your migration to Solr 6. This section attempts to highlight some of the major changes you should be aware of.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 a1fdaba..55c08d4 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,22 @@
 = 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
+// 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.
 
 If you are worried about data loss, and of course you _should_ be, you need a way to back up your Solr indexes so that you can recover quickly in case of catastrophic failure.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 7e91ee3..f7d062d 100644
--- a/solr/solr-ref-guide/src/managed-resources.adoc
+++ b/solr/solr-ref-guide/src/managed-resources.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Managed resources expose a REST API endpoint for performing Create-Read-Update-Delete (CRUD) operations on a Solr object.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/solr/solr-ref-guide/src/managing-solr.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/managing-solr.adoc b/solr/solr-ref-guide/src/managing-solr.adoc
index ad13113..abb2526 100644
--- a/solr/solr-ref-guide/src/managing-solr.adoc
+++ b/solr/solr-ref-guide/src/managing-solr.adoc
@@ -2,6 +2,22 @@
 :page-shortname: managing-solr
 :page-permalink: managing-solr.html
 :page-children: taking-solr-to-production, securing-solr, running-solr-on-hdfs, making-and-restoring-backups, configuring-logging, using-jmx-with-solr, mbean-request-handler, performance-statistics-reference, metrics-reporting, 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
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section describes how to run Solr and how to look at Solr when it is running. It contains the following sections:
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 0582b82..6900cf0 100644
--- a/solr/solr-ref-guide/src/mbean-request-handler.adoc
+++ b/solr/solr-ref-guide/src/mbean-request-handler.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The MBean Request Handler offers programmatic access to the information provided on the <<plugins-stats-screen.adoc#plugins-stats-screen,Plugin/Stats>> page of the Admin UI.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 bf554aa..e57e3ab 100644
--- a/solr/solr-ref-guide/src/merging-indexes.adoc
+++ b/solr/solr-ref-guide/src/merging-indexes.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 If you need to combine indexes from two different projects or from multiple servers previously used in a distributed configuration, you can use either the IndexMergeTool included in `lucene-misc` or the `CoreAdminHandler`.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 24a4ee1..6da87b5 100644
--- a/solr/solr-ref-guide/src/metrics-reporting.adoc
+++ b/solr/solr-ref-guide/src/metrics-reporting.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 Solr includes a developer API and instrumentation for the collection of detailed performance-oriented metrics throughout the life-cycle of Solr service and its various components.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 a99cc03..aa3ccc3 100644
--- a/solr/solr-ref-guide/src/morelikethis.adoc
+++ b/solr/solr-ref-guide/src/morelikethis.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 The `MoreLikeThis` search component enables users to query for documents similar to a document in their result list.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 f4396f3..8751a49 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,22 @@
 = 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
+// 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.
 
 Near Real Time (NRT) search means that documents are available for search almost immediately after being indexed.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 290c5b8..54b5464 100644
--- a/solr/solr-ref-guide/src/other-parsers.adoc
+++ b/solr/solr-ref-guide/src/other-parsers.adoc
@@ -1,6 +1,22 @@
 = 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
+// 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.
 
 In addition to the main query parsers discussed earlier, there are several other query parsers that can be used instead of or in conjunction with the main parsers for specific purposes.
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/94011393/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 c76d6c3..029cd64 100644
--- a/solr/solr-ref-guide/src/other-schema-elements.adoc
+++ b/solr/solr-ref-guide/src/other-schema-elements.adoc
@@ -1,6 +1,22 @@
 = 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
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 
 This section describes several other important elements of `schema.xml` not covered in earlier sections.
 


[08/27] lucene-solr:jira/solr-10233: SOLR-10612: add jekyll support for page-toclevels, page-tocclass, and a new {section-toc} macro

Posted by tf...@apache.org.
SOLR-10612: add jekyll support for page-toclevels, page-tocclass, and a new {section-toc} macro


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

Branch: refs/heads/jira/solr-10233
Commit: 3392a128667f927783199fe3d9f0c6a17f0a787f
Parents: 4a57fb4
Author: Chris Hostetter <ho...@apache.org>
Authored: Fri May 19 10:47:37 2017 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Fri May 19 10:47:37 2017 -0700

----------------------------------------------------------------------
 solr/solr-ref-guide/build.xml                |  1 +
 solr/solr-ref-guide/meta-docs/jekyll.adoc    | 16 +++++++--
 solr/solr-ref-guide/src/_config.yml.template |  2 ++
 solr/solr-ref-guide/src/_includes/toc.html   | 22 +++---------
 solr/solr-ref-guide/src/css/ref-guide.css    | 44 +++++++++++++++--------
 solr/solr-ref-guide/src/js/ref-guide-toc.js  | 36 +++++++++++++++++++
 6 files changed, 87 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3392a128/solr/solr-ref-guide/build.xml
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/build.xml b/solr/solr-ref-guide/build.xml
index 74e6dee..4e00992 100644
--- a/solr/solr-ref-guide/build.xml
+++ b/solr/solr-ref-guide/build.xml
@@ -177,6 +177,7 @@
                  imagesDir="${build.content.dir}"
                  doctype="book"
                  safemode="unsafe">
+      <attribute key="section-toc" value='' /><!-- we don't use these in the pdf -->
       <attribute key="icons" value="font" />
       <attribute key="icon-set" value="fa" />
       <attribute key="pdf-stylesDir" value="./pdf/themes"/>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3392a128/solr/solr-ref-guide/meta-docs/jekyll.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/meta-docs/jekyll.adoc b/solr/solr-ref-guide/meta-docs/jekyll.adoc
index e1ba129..8d3f2fc 100644
--- a/solr/solr-ref-guide/meta-docs/jekyll.adoc
+++ b/solr/solr-ref-guide/meta-docs/jekyll.adoc
@@ -30,10 +30,22 @@ Front matter for Jekyll is like a header that defines the title of the page, and
 
 Every document that will be converted to HTML *must* include at least the page title at the top of the page.
 
-The Solr Ref Guide uses the front matter to define the "short name" and permanent URL of a page, and to define the children of a page. The list of children is used to build the site navigation menu that appears to the left of each page's content.
-
 Many guides to Jekyll also say that defining the layout in the front matter is required. However, since we only have one layout for all pages, we have defined this as a default.
 
+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:
+
+* `page-toclevels` - changes how "deep" the TOC will be in terms of nested section/sub-section titles (default = 2
+* `page-tocclass` - changes the CSS class applied to the TOC, default = "normal", resulting in the class name `toc-normal`
+* `page-toc` - if this is false, then no TOCs will be generated for the page at all.
+
+NOTE: The special macro `{section-toc}` can be used anywhere in a page to create an "In this Section" TOC covering only the sub-headings in the same secion.  `:page-toc: false` will also prevent this macro from working, so if you want no "top level" TOC, but you do want section TOCs, use `:page-toclevels: 0`
+
 === Layouts
 
 Layouts define the "look and feel" of each page.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3392a128/solr/solr-ref-guide/src/_config.yml.template
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/_config.yml.template b/solr/solr-ref-guide/src/_config.yml.template
index e10eeb7..eac2d28 100755
--- a/solr/solr-ref-guide/src/_config.yml.template
+++ b/solr/solr-ref-guide/src/_config.yml.template
@@ -87,3 +87,5 @@ asciidoctor:
     icons: "font"
     source-highlighter: "pygments"
     pygments-css: "style"
+    # NOTE: do *NOT* use an self-empty div tag (ie: <div/>) here - it will break jquery
+    section-toc: "<div class=\"toc section-toc\"></div>"

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3392a128/solr/solr-ref-guide/src/_includes/toc.html
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/_includes/toc.html b/solr/solr-ref-guide/src/_includes/toc.html
index 14f74e0..faa4701 100755
--- a/solr/solr-ref-guide/src/_includes/toc.html
+++ b/solr/solr-ref-guide/src/_includes/toc.html
@@ -1,21 +1,9 @@
 
 <!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. -->
-<script>
-$( document ).ready(function() {
-  // Handler for .ready() called.
 
-$('#toc').toc({ minimumHeaders: 2, listType: 'ul', showSpeed: 0, headers: 'h2,h3' });
-
-/* this offset helps account for the space taken up by the floating toolbar. */
-$('#toc').on('click', 'a', function() {
-  var target = $(this.getAttribute('href'))
-    , scroll_target = target.offset().top
-
-  $(window).scrollTop(scroll_target - 10);
-  return false
-})
-
-});
+<script src="{{ "js/ref-guide-toc.js" }}" type="text/javascript"></script>
+<script type="text/javascript">
+  // based on page variables, build up the list of headers for the top level toc (and any sub-section tocs)
+  do_tocs({{ page.toclevels | default:2 }})
 </script>
-
-<div id="toc"></div>
+<div id="toc" class="toc toc-{{ page.tocclass | default:'normal' }}"></div>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3392a128/solr/solr-ref-guide/src/css/ref-guide.css
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/css/ref-guide.css b/solr/solr-ref-guide/src/css/ref-guide.css
index 7443c56..8cbe0f2 100644
--- a/solr/solr-ref-guide/src/css/ref-guide.css
+++ b/solr/solr-ref-guide/src/css/ref-guide.css
@@ -1098,50 +1098,60 @@ body.toc2 #header > h1:nth-last-child(2)
     border-bottom: 1px solid #efefed;
 }
 
-#toc > ul
+@media only screen
+       and (min-width : 768px)
+{
+    #toc.toc-right
+    {   
+	float: right;
+	margin-left: 1em;
+	border: none;
+    }
+}
+.toc > ul
 {
     margin-left: .125em;
 }
 
-#toc ul.sectlevel0 > li > a
+.toc ul.sectlevel0 > li > a
 {
     font-weight: bold;
 }
 
-#toc ul.sectlevel0 ul.sectlevel1
+.toc ul.sectlevel0 ul.sectlevel1
 {
     margin: .5em 0;
 }
 
-#toc ul
+.toc ul
 {
     list-style-type: none;
     font-family: 'Noto Sans', sans-serif;
 }
 
-#toc a
+.toc a
 {
     text-decoration: none;
 }
 
-#toc a:active
+.toc a:active
 {
     text-decoration: underline;
 }
 
-#toctitle
+.toctitle
 {
     color: #7a2518;
     font-size: 1.2em;
 }
 
-div#toc ul li {
+div.toc ul li {
     margin: 8px 0 8px 22px;
     list-style: square;
     line-height: 1.25;
 }
 
-div#toc ul {
+div.toc ul {
     background-color: whitesmoke;
     padding: 5px;
     border-radius: 5px;
@@ -1149,16 +1159,19 @@ div#toc ul {
     color: gray;
 }
 
-div#toc ul li ul {
+div.toc ul li ul {
     padding-left:8px;
 
 }
 
-div#toc ul li ul li::before {
+div.toc ul li ul li::before {
     content: "–  ";
 }
 
-div#toc >ul::before {
+div.toc.section-toc >ul::before {
+    content: "In this section";
+}
+div.toc >ul::before {
     content: "On this Page";
     font-weight: bold;
     color: #555;
@@ -1290,12 +1303,12 @@ div#toc >ul::before {
     background: #f8f8f7;
 }
 
-#content #toc > :first-child
+#content .toc > :first-child
 {
     margin-top: 0;
 }
 
-#content #toc > :last-child
+#content .toc > :last-child
 {
     margin-bottom: 0;
 }
@@ -1421,6 +1434,7 @@ h6 > a.link:hover
 .videoblock
 {
     margin-bottom: 1.25em;
+    overflow: auto;
 }
 
 
@@ -1445,7 +1459,7 @@ table.tableblock #preamble > .sectionbody > .paragraph:first-of-type p
 
 .admonitionblock > table
 {
-    width: 100%;
+    width: auto;
     border: 0;
     border-collapse: separate;
     background: none;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3392a128/solr/solr-ref-guide/src/js/ref-guide-toc.js
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/js/ref-guide-toc.js b/solr/solr-ref-guide/src/js/ref-guide-toc.js
new file mode 100644
index 0000000..3acd191
--- /dev/null
+++ b/solr/solr-ref-guide/src/js/ref-guide-toc.js
@@ -0,0 +1,36 @@
+// see toc.js and toc.html
+
+// NOTE: toc.html is only include if :page-toc: is true, so it's safe to do this document.ready unconditionally
+function do_tocs(page_toc_levels) {
+    $( document ).ready(function() {
+
+	// headers used - start at 2, and we have to be careful about trailing comma
+	toc_headers = 0 < page_toc_levels ? 'h2' : '';
+	
+	for (i = 1; i < page_toc_levels; i++) {
+	    toc_headers += ",h" + (2 + i);
+	}
+	// top level TOC
+	$('#toc').toc({ minimumHeaders: 2, listType: 'ul', showSpeed: 0, headers: toc_headers });
+	
+	// any subsection TOCs
+	$('.section-toc').each(function() {
+            // toc() needs a selector string, so we'll build one by fetching the id of the nearest header
+	    // that comes before us, then use to make a selector for all sub headers in the same section
+	    // NOTE: this depends a lot of the particular structure of HTML asciidoctor generates
+	    header = $(this).closest("div:has(:header:first-child)").children(":header").first();
+            selector = "#" + header.attr("id") + " ~ * :header";
+            $(this).toc({ minimumHeaders: 2, listType: 'ul', showSpeed: 0, headers: selector });
+	});
+	
+	/* this offset helps account for the space taken up by the floating toolbar. */
+	$('.toc').on('click', 'a', function() {
+	    var target = $(this.getAttribute('href'))
+	    , scroll_target = target.offset().top
+	    
+	    $(window).scrollTop(scroll_target - 10);
+	    return false
+	})
+	
+    });
+}


[23/27] lucene-solr:jira/solr-10233: SOLR-10725: add license links to NOTICE.txt and remove solr-ref-guide license directory

Posted by tf...@apache.org.
SOLR-10725: add license links to NOTICE.txt and remove solr-ref-guide license directory


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

Branch: refs/heads/jira/solr-10233
Commit: 0aea8cbc72859f49edabc410a1061911362592be
Parents: 9401139
Author: Cassandra Targett <ct...@apache.org>
Authored: Mon May 22 14:53:49 2017 -0500
Committer: Cassandra Targett <ct...@apache.org>
Committed: Mon May 22 14:54:23 2017 -0500

----------------------------------------------------------------------
 solr/NOTICE.txt                                 | 18 +++++++++----
 solr/solr-ref-guide/src/licenses/LICENSE        | 21 ---------------
 .../src/licenses/LICENSE-BSD-NAVGOCO.txt        | 27 --------------------
 3 files changed, 13 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0aea8cbc/solr/NOTICE.txt
----------------------------------------------------------------------
diff --git a/solr/NOTICE.txt b/solr/NOTICE.txt
index d1f4e2f..214a2f8 100644
--- a/solr/NOTICE.txt
+++ b/solr/NOTICE.txt
@@ -70,6 +70,14 @@ the Apache Blur incubating project and are Apache License 2.0.
 ASM (Java bytecode manipulation and analysis framework): http://asm.ow2.org/
 Copyright (c) 2000-2005 INRIA, France Telecom
 
+This project includes portions of the Jekyll Documentation Theme
+Copyright (c) 2016 Tom Johnson
+License: MIT https://github.com/tomjohnson1492/documentation-theme-jekyll/blob/gh-pages/licenses/LICENSE
+
+This project includes the Navgoco JQuery plugin
+Copyright (c) 2013 Christopher Tsoulloftas, http://www.komposta.net
+License: BSD https://github.com/tefra/navgoco/blob/master/LICENSE-BSD
+
 =========================================================================
 ==  Antlr2 Notice                                                       ==
 =========================================================================
@@ -130,13 +138,13 @@ Some data files (under analysis/icu/src/data) are derived from Unicode data such
 as the Unicode Character Database. See http://unicode.org/copyright.html for more
 details.
 
-Brics Automaton (under core/src/java/org/apache/lucene/util/automaton) is 
+Brics Automaton (under core/src/java/org/apache/lucene/util/automaton) is
 BSD-licensed, created by Anders Møller. See http://www.brics.dk/automaton/
 
 The levenshtein automata tables (under core/src/java/org/apache/lucene/util/automaton) were
 automatically generated with the moman/finenight FSA library, created by
 Jean-Philippe Barrette-LaPierre. This library is available under an MIT license,
-see http://sites.google.com/site/rrettesite/moman and 
+see http://sites.google.com/site/rrettesite/moman and
 http://bitbucket.org/jpbarrette/moman/overview/
 
 The class org.apache.lucene.util.WeakIdentityMap was derived from
@@ -190,7 +198,7 @@ analysis/common/src/java/org/apache/lucene/analysis/pt/PortugueseLightStemmer.ja
 analysis/common/src/java/org/apache/lucene/analysis/ru/RussianLightStemmer.java
 analysis/common/src/java/org/apache/lucene/analysis/sv/SwedishLightStemmer.java
 
-The Stempel analyzer (stempel) includes BSD-licensed software developed 
+The Stempel analyzer (stempel) includes BSD-licensed software developed
 by the Egothor project http://egothor.sf.net/, created by Leo Galambos, Martin Kvapil,
 and Edmond Nolan.
 
@@ -202,8 +210,8 @@ See http://project.carrot2.org/license.html.
 The SmartChineseAnalyzer source code (smartcn) was
 provided by Xiaoping Gao and copyright 2009 by www.imdict.net.
 
-WordBreakTestUnicode_*.java (under modules/analysis/common/src/test/) 
-is derived from Unicode data such as the Unicode Character Database. 
+WordBreakTestUnicode_*.java (under modules/analysis/common/src/test/)
+is derived from Unicode data such as the Unicode Character Database.
 See http://unicode.org/copyright.html for more details.
 
 The Morfologik analyzer (morfologik) includes BSD-licensed software

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0aea8cbc/solr/solr-ref-guide/src/licenses/LICENSE
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/licenses/LICENSE b/solr/solr-ref-guide/src/licenses/LICENSE
deleted file mode 100755
index e04b3d0..0000000
--- a/solr/solr-ref-guide/src/licenses/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2016 Tom Johnson
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/0aea8cbc/solr/solr-ref-guide/src/licenses/LICENSE-BSD-NAVGOCO.txt
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/licenses/LICENSE-BSD-NAVGOCO.txt b/solr/solr-ref-guide/src/licenses/LICENSE-BSD-NAVGOCO.txt
deleted file mode 100755
index 7fdefc3..0000000
--- a/solr/solr-ref-guide/src/licenses/LICENSE-BSD-NAVGOCO.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-/* This license pertains to the Navgoco jQuery component used for the sidebar. */
-
-Copyright (c) 2013, Christodoulos Tsoulloftas, http://www.komposta.net
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-   * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-   * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-   * Neither the name of the <Christodoulos Tsoulloftas> nor the names of its
-      contributors may be used to endorse or promote products derived from this
-      software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file


[07/27] lucene-solr:jira/solr-10233: SOLR-10585: Remove defaultSearchField completely in 7.0

Posted by tf...@apache.org.
SOLR-10585: Remove defaultSearchField completely in 7.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/4a57fb4d
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4a57fb4d
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4a57fb4d

Branch: refs/heads/jira/solr-10233
Commit: 4a57fb4d888f83457ea774a7e03c998eb2da59ba
Parents: 467af79
Author: Jan Høydahl <ja...@apache.org>
Authored: Fri May 19 15:25:40 2017 +0200
Committer: Jan Høydahl <ja...@apache.org>
Committed: Fri May 19 15:27:28 2017 +0200

----------------------------------------------------------------------
 solr/CHANGES.txt                                |  6 ++++
 .../handler/FieldAnalysisRequestHandler.java    | 11 +++++--
 .../org/apache/solr/handler/SchemaHandler.java  |  9 ------
 .../solr/handler/admin/LukeRequestHandler.java  |  1 -
 .../handler/component/HighlightComponent.java   |  9 ++----
 .../apache/solr/highlight/SolrHighlighter.java  |  5 ++--
 .../apache/solr/response/SchemaXmlWriter.java   |  5 ----
 .../org/apache/solr/schema/IndexSchema.java     | 31 ++------------------
 .../apache/solr/schema/ManagedIndexSchema.java  |  1 -
 .../solr/search/ComplexPhraseQParserPlugin.java |  3 --
 .../org/apache/solr/search/DisMaxQParser.java   |  5 ++--
 .../org/apache/solr/search/LuceneQParser.java   |  3 --
 .../org/apache/solr/search/QueryParsing.java    | 13 ++++----
 .../apache/solr/search/SimpleQParserPlugin.java |  6 ++--
 .../solr/search/SurroundQParserPlugin.java      |  2 +-
 .../apache/solr/search/XmlQParserPlugin.java    |  2 +-
 .../conf/bad-schema-defaultsearchfield.xml      | 26 ++++++++++++++++
 .../test/org/apache/solr/MinimalSchemaTest.java |  1 -
 .../FieldAnalysisRequestHandlerTest.java        |  8 +++++
 .../apache/solr/schema/BadIndexSchemaTest.java  |  4 +++
 .../apache/solr/util/SolrPluginUtilsTest.java   |  3 +-
 .../example-DIH/solr/tika/conf/managed-schema   |  2 +-
 .../src/other-schema-elements.adoc              |  7 -----
 .../src/putting-the-pieces-together.adoc        |  2 --
 .../response/schema/SchemaRepresentation.java   | 10 -------
 .../solrj/response/schema/SchemaResponse.java   |  5 ----
 .../webapp/web/js/angular/controllers/schema.js |  4 ---
 solr/webapp/web/partials/schema.html            |  3 --
 28 files changed, 77 insertions(+), 110 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index ccc8f4f..b7f349b 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -73,6 +73,9 @@ Upgrading from Solr 6.x
 * Setting <solrQueryParser defaultOperator="..."/> in schema is no longer allowed and will cause an exception.
   Please use "q.op" parameter on the request instead. For more details, see SOLR-10584.
 
+* Setting <defaultSearchField> in schema is no longer allowed and will cause an exception.
+  Please use "df" parameter on the request instead. For more details, see SOLR-10585.
+
 New Features
 ----------------------
 * SOLR-9857, SOLR-9858: Collect aggregated metrics from nodes and shard leaders in overseer. (ab)
@@ -159,6 +162,9 @@ Other Changes
 * SOLR-10584: We'll now always throw an exception if defaultOperator is found in schema. This config has
   been deprecated since 3.6, and enforced for new configs since 6.6 (janhoy)
 
+* SOLR-10585: We'll now always throw an exception if defaultSearchField is found in schema. This config has
+  been deprecated since 3.6, and enforced for new configs since 6.6 (janhoy, David Smiley)
+
 * SOLR-10414: RecoveryStrategy is now a Runnable instead of a Thread. (Tomás Fernández Löbbe)
 
 * SOLR-10042: Delete old deprecated Admin UI, leaving the AngularJS UI the only one supported (janhoy)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/handler/FieldAnalysisRequestHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/FieldAnalysisRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/FieldAnalysisRequestHandler.java
index 7198b59..7c16606 100644
--- a/solr/core/src/java/org/apache/solr/handler/FieldAnalysisRequestHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/FieldAnalysisRequestHandler.java
@@ -116,7 +116,7 @@ public class FieldAnalysisRequestHandler extends AnalysisRequestHandlerBase {
    * @return AnalysisRequest containing all the information about what needs to be analyzed, and using what
    *         fields/types
    */
-  FieldAnalysisRequest resolveAnalysisRequest(SolrQueryRequest req) {
+  FieldAnalysisRequest resolveAnalysisRequest(SolrQueryRequest req) throws SolrException {
     SolrParams solrParams = req.getParams();
     FieldAnalysisRequest analysisRequest = new FieldAnalysisRequest();
 
@@ -129,8 +129,13 @@ public class FieldAnalysisRequestHandler extends AnalysisRequestHandlerBase {
       analysisRequest.setFieldNames(Arrays.asList(solrParams.get(AnalysisParams.FIELD_NAME).split(",")));
       useDefaultSearchField = false;
     }
-    if (useDefaultSearchField)  {
-      analysisRequest.addFieldName(req.getSchema().getDefaultSearchFieldName());
+    if (useDefaultSearchField) {
+      if (solrParams.get(CommonParams.DF) != null) {
+        analysisRequest.addFieldName(solrParams.get(CommonParams.DF));
+      } else {
+        throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,
+            "Field analysis request must contain one of analysis.fieldtype, analysis.fieldname or df.");
+      }
     }
     analysisRequest.setQuery(solrParams.get(AnalysisParams.QUERY, solrParams.get(CommonParams.Q)));
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/handler/SchemaHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/SchemaHandler.java b/solr/core/src/java/org/apache/solr/handler/SchemaHandler.java
index 38f29a7..41285be 100644
--- a/solr/core/src/java/org/apache/solr/handler/SchemaHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/SchemaHandler.java
@@ -137,15 +137,6 @@ public class SchemaHandler extends RequestHandlerBase implements SolrCoreAware,
           rsp.add(IndexSchema.NAME, schemaName);
           break;
         }
-        case "/schema/defaultsearchfield": {
-          final String defaultSearchFieldName = req.getSchema().getDefaultSearchFieldName();
-          if (null == defaultSearchFieldName) {
-            final String message = "undefined " + IndexSchema.DEFAULT_SEARCH_FIELD;
-            throw new SolrException(SolrException.ErrorCode.NOT_FOUND, message);
-          }
-          rsp.add(IndexSchema.DEFAULT_SEARCH_FIELD, defaultSearchFieldName);
-          break;
-        }
         case "/schema/zkversion": {
           int refreshIfBelowVersion = -1;
           Object refreshParam = req.getParams().get("refreshIfBelowVersion");

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
index 2db04d9..9864016 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
@@ -472,7 +472,6 @@ public class LukeRequestHandler extends RequestHandlerBase
 
     finfo.add("uniqueKeyField",
         null == uniqueField ? null : uniqueField.getName());
-    finfo.add("defaultSearchField", schema.getDefaultSearchFieldName());
     finfo.add("similarity", getSimilarityInfo(schema.getSimilarity()));
     finfo.add("types", types);
     return finfo;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.java b/solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.java
index cc5211b..f1c9680 100644
--- a/solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.java
+++ b/solr/core/src/java/org/apache/solr/handler/component/HighlightComponent.java
@@ -26,7 +26,6 @@ import java.util.stream.Stream;
 import com.google.common.base.Objects;
 import org.apache.lucene.search.Query;
 import org.apache.solr.common.SolrException;
-import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.HighlightParams;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.NamedList;
@@ -154,12 +153,8 @@ public class HighlightComponent extends SearchComponent implements PluginInfoIni
 
       SolrHighlighter highlighter = getHighlighter(params);
 
-      String[] defaultHighlightFields;  //TODO: get from builder by default?
-      if (rb.getQparser() != null) {
-        defaultHighlightFields = rb.getQparser().getDefaultHighlightFields();
-      } else {
-        defaultHighlightFields = params.getParams(CommonParams.DF);
-      }
+      //TODO: get from builder by default?
+      String[] defaultHighlightFields = rb.getQparser() != null ? rb.getQparser().getDefaultHighlightFields() : null;
       
       Query highlightQuery = rb.getHighlightQuery();
       if(highlightQuery==null) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/highlight/SolrHighlighter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/highlight/SolrHighlighter.java b/solr/core/src/java/org/apache/solr/highlight/SolrHighlighter.java
index ade4c6b..f906a69 100644
--- a/solr/core/src/java/org/apache/solr/highlight/SolrHighlighter.java
+++ b/solr/core/src/java/org/apache/solr/highlight/SolrHighlighter.java
@@ -16,6 +16,7 @@
  */
 package org.apache.solr.highlight;
 import org.apache.lucene.search.Query;
+import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.HighlightParams;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.NamedList;
@@ -56,9 +57,9 @@ public abstract class SolrHighlighter
 
     // if no fields specified in the request, or the handler, fall back to programmatic default, or default search field.
     if(emptyArray(fields)) {
-      // use default search field if highlight fieldlist not specified.
+      // use default search field from request if highlight fieldlist not specified.
       if (emptyArray(defaultFields)) {
-        String defaultSearchField = request.getSchema().getDefaultSearchFieldName();
+        String defaultSearchField = request.getParams().get(CommonParams.DF);
         fields = null == defaultSearchField ? new String[]{} : new String[]{defaultSearchField};
       } else {
         fields = defaultFields;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/response/SchemaXmlWriter.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/response/SchemaXmlWriter.java b/solr/core/src/java/org/apache/solr/response/SchemaXmlWriter.java
index 5801575..1af6634 100644
--- a/solr/core/src/java/org/apache/solr/response/SchemaXmlWriter.java
+++ b/solr/core/src/java/org/apache/solr/response/SchemaXmlWriter.java
@@ -98,11 +98,6 @@ public class SchemaXmlWriter extends TextResponseWriter {
         closeStartTag(false);
         writer.write(val.toString());
         endTag(IndexSchema.UNIQUE_KEY, false);
-      } else if (schemaPropName.equals(IndexSchema.DEFAULT_SEARCH_FIELD)) {
-        openStartTag(IndexSchema.DEFAULT_SEARCH_FIELD);
-        closeStartTag(false);
-        writer.write(val.toString());
-        endTag(IndexSchema.DEFAULT_SEARCH_FIELD, false);
       } else if (schemaPropName.equals(IndexSchema.SIMILARITY)) {
         writeSimilarity((SimpleOrderedMap<Object>) val);
       } else if (schemaPropName.equals(IndexSchema.FIELD_TYPES)) {

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/schema/IndexSchema.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/schema/IndexSchema.java b/solr/core/src/java/org/apache/solr/schema/IndexSchema.java
index 9a69ec5..13385b7 100644
--- a/solr/core/src/java/org/apache/solr/schema/IndexSchema.java
+++ b/solr/core/src/java/org/apache/solr/schema/IndexSchema.java
@@ -95,7 +95,6 @@ public class IndexSchema {
   public static final String COPY_FIELD = "copyField";
   public static final String COPY_FIELDS = COPY_FIELD + "s";
   public static final String DEFAULT_SCHEMA_FILE = "schema.xml";
-  public static final String DEFAULT_SEARCH_FIELD = "defaultSearchField";
   public static final String DESTINATION = "dest";
   public static final String DYNAMIC_FIELD = "dynamicField";
   public static final String DYNAMIC_FIELDS = DYNAMIC_FIELD + "s";
@@ -145,8 +144,6 @@ public class IndexSchema {
 
   protected List<SchemaAware> schemaAware = new ArrayList<>();
 
-  protected String defaultSearchFieldName=null;
-
   protected Map<String, List<CopyField>> copyFieldsMap = new HashMap<>();
   public Map<String,List<CopyField>> getCopyFieldsMap() { return Collections.unmodifiableMap(copyFieldsMap); }
   
@@ -298,15 +295,6 @@ public class IndexSchema {
   public Analyzer getQueryAnalyzer() { return queryAnalyzer; }
 
   
-  /**
-   * Name of the default search field specified in the schema file.
-   * <br><b>Note:</b>Avoid calling this, try to use this method so that the 'df' param is consulted as an override:
-   * {@link org.apache.solr.search.QueryParsing#getDefaultField(IndexSchema, String)}
-   */
-  public String getDefaultSearchFieldName() {
-    return defaultSearchFieldName;
-  }
-
   protected SchemaField uniqueKeyField;
 
   /**
@@ -509,22 +497,10 @@ public class IndexSchema {
       }
 
       //                      /schema/defaultSearchField/text()
-      expression = stepsToPath(SCHEMA, DEFAULT_SEARCH_FIELD, TEXT_FUNCTION);
+      expression = stepsToPath(SCHEMA, "defaultSearchField", TEXT_FUNCTION);
       node = (Node) xpath.evaluate(expression, document, XPathConstants.NODE);
-      if (node==null) {
-        log.debug("no default search field specified in schema.");
-      } else {
-        defaultSearchFieldName=node.getNodeValue().trim();
-        // throw exception if specified, but not found or not indexed
-        if (defaultSearchFieldName!=null) {
-          SchemaField defaultSearchField = getFields().get(defaultSearchFieldName);
-          if ((defaultSearchField == null) || !defaultSearchField.indexed()) {
-            String msg =  "default search field '" + defaultSearchFieldName + "' not defined or not indexed" ;
-            throw new SolrException(ErrorCode.SERVER_ERROR, msg);
-          }
-        }
-        log.warn("[{}] default search field in schema is {}. WARNING: Deprecated, please use 'df' on request instead.",
-            coreName, defaultSearchFieldName);
+      if (node != null) {
+        throw new SolrException(ErrorCode.SERVER_ERROR, "Setting defaultSearchField in schema not supported since Solr 7");
       }
 
       //                      /schema/solrQueryParser/@defaultOperator
@@ -1384,7 +1360,6 @@ public class IndexSchema {
       NAME(IndexSchema.NAME, sp -> sp.schema.getSchemaName()),
       VERSION(IndexSchema.VERSION, sp -> sp.schema.getVersion()),
       UNIQUE_KEY(IndexSchema.UNIQUE_KEY, sp -> sp.schema.uniqueKeyFieldName),
-      DEFAULT_SEARCH_FIELD(IndexSchema.DEFAULT_SEARCH_FIELD, sp -> sp.schema.defaultSearchFieldName),
       SIMILARITY(IndexSchema.SIMILARITY, sp -> sp.schema.isExplicitSimilarity ?
           sp.schema.similarityFactory.getNamedPropertyValues() :
           null),

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java b/solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java
index de292fd..3806dd3 100644
--- a/solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java
+++ b/solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java
@@ -1357,7 +1357,6 @@ public final class ManagedIndexSchema extends IndexSchema {
     
     newSchema.name = name;
     newSchema.version = version;
-    newSchema.defaultSearchFieldName = defaultSearchFieldName;
     newSchema.similarity = similarity;
     newSchema.similarityFactory = similarityFactory;
     newSchema.isExplicitSimilarity = isExplicitSimilarity;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/search/ComplexPhraseQParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/ComplexPhraseQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/ComplexPhraseQParserPlugin.java
index 1ce7aed..85b40cd 100644
--- a/solr/core/src/java/org/apache/solr/search/ComplexPhraseQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/ComplexPhraseQParserPlugin.java
@@ -110,9 +110,6 @@ public class ComplexPhraseQParserPlugin extends QParserPlugin {
       String qstr = getString();
 
       String defaultField = getParam(CommonParams.DF);
-      if (defaultField == null) {
-        defaultField = getReq().getSchema().getDefaultSearchFieldName();
-      }
 
       SolrQueryParserDelegate reverseAwareParser = new SolrQueryParserDelegate(this, defaultField);
       

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/search/DisMaxQParser.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/DisMaxQParser.java b/solr/core/src/java/org/apache/solr/search/DisMaxQParser.java
index 28c80b0..2af5def 100644
--- a/solr/core/src/java/org/apache/solr/search/DisMaxQParser.java
+++ b/solr/core/src/java/org/apache/solr/search/DisMaxQParser.java
@@ -65,15 +65,14 @@ public class DisMaxQParser extends QParser {
 
   /**
    * Uses {@link SolrPluginUtils#parseFieldBoosts(String)} with the 'qf' parameter. Falls back to the 'df' parameter
-   * or {@link org.apache.solr.schema.IndexSchema#getDefaultSearchFieldName()}.
    */
   public static Map<String, Float> parseQueryFields(final IndexSchema indexSchema, final SolrParams solrParams)
       throws SyntaxError {
     Map<String, Float> queryFields = SolrPluginUtils.parseFieldBoosts(solrParams.getParams(DisMaxParams.QF));
     if (queryFields.isEmpty()) {
-      String df = QueryParsing.getDefaultField(indexSchema, solrParams.get(CommonParams.DF));
+      String df = solrParams.get(CommonParams.DF);
       if (df == null) {
-        throw new SyntaxError("Neither "+DisMaxParams.QF+", "+CommonParams.DF +", nor the default search field are present.");
+        throw new SyntaxError("Neither "+DisMaxParams.QF+" nor "+CommonParams.DF +" are present.");
       }
       queryFields.put(df, 1.0f);
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/search/LuceneQParser.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/LuceneQParser.java b/solr/core/src/java/org/apache/solr/search/LuceneQParser.java
index 16b29d3..753b36b 100644
--- a/solr/core/src/java/org/apache/solr/search/LuceneQParser.java
+++ b/solr/core/src/java/org/apache/solr/search/LuceneQParser.java
@@ -39,9 +39,6 @@ public class LuceneQParser extends QParser {
     if (qstr == null || qstr.length()==0) return null;
 
     String defaultField = getParam(CommonParams.DF);
-    if (defaultField==null) {
-      defaultField = getReq().getSchema().getDefaultSearchFieldName();
-    }
     lparser = new SolrQueryParser(this, defaultField);
 
     lparser.setDefaultOperator(QueryParsing.parseOP(getParam(QueryParsing.OP)));

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/search/QueryParsing.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/QueryParsing.java b/solr/core/src/java/org/apache/solr/search/QueryParsing.java
index 4398ac4..381276c 100644
--- a/solr/core/src/java/org/apache/solr/search/QueryParsing.java
+++ b/solr/core/src/java/org/apache/solr/search/QueryParsing.java
@@ -71,13 +71,16 @@ public class QueryParsing {
   }
 
   /**
-   * Returns the effective default field based on the 'df' param or
-   * hardcoded schema default.  May be null if either exists specified.
+   * Returns the effective default field based on the 'df' param.
+   * TODO: This is kept for 3rd party QParser compat in 7.x. Remove this method in Solr 8.0
+   * @param ignored Not in use
+   * @param df the default field, which will be returned as-is
    * @see org.apache.solr.common.params.CommonParams#DF
-   * @see org.apache.solr.schema.IndexSchema#getDefaultSearchFieldName
+   * @deprecated IndexScema does not contain defaultField anymore, you must rely on df alone
    */
-  public static String getDefaultField(final IndexSchema s, final String df) {
-    return df != null ? df : s.getDefaultSearchFieldName();
+  @Deprecated
+  public static String getDefaultField(final IndexSchema ignored, final String df) {
+    return df;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/search/SimpleQParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/SimpleQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/SimpleQParserPlugin.java
index f265d93..47e88ce 100644
--- a/solr/core/src/java/org/apache/solr/search/SimpleQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/SimpleQParserPlugin.java
@@ -109,12 +109,12 @@ public class SimpleQParserPlugin extends QParserPlugin {
 
       if (queryFields.isEmpty()) {
         // It qf is not specified setup up the queryFields map to use the defaultField.
-        String defaultField = QueryParsing.getDefaultField(req.getSchema(), defaultParams.get(CommonParams.DF));
+        String defaultField = defaultParams.get(CommonParams.DF);
 
         if (defaultField == null) {
           // A query cannot be run without having a field or set of fields to run against.
-          throw new IllegalStateException("Neither " + SimpleParams.QF + ", " + CommonParams.DF
-              + ", nor the default search field are present.");
+          throw new IllegalStateException("Neither " + SimpleParams.QF + " nor " + CommonParams.DF
+              + " are present.");
         }
 
         queryFields.put(defaultField, 1.0F);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/search/SurroundQParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/SurroundQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/SurroundQParserPlugin.java
index a90cb25..4654a5c 100644
--- a/solr/core/src/java/org/apache/solr/search/SurroundQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/SurroundQParserPlugin.java
@@ -95,7 +95,7 @@ public class SurroundQParserPlugin extends QParserPlugin {
       // processing based on example in LIA Ch 9
 
       BasicQueryFactory bqFactory = new BasicQueryFactory(this.maxBasicQueries);
-      String defaultField = QueryParsing.getDefaultField(getReq().getSchema(),getParam(CommonParams.DF));
+      String defaultField = getParam(CommonParams.DF);
       Query lquery = sq.makeLuceneQueryField(defaultField, bqFactory);
       return lquery;
     }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/java/org/apache/solr/search/XmlQParserPlugin.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/search/XmlQParserPlugin.java b/solr/core/src/java/org/apache/solr/search/XmlQParserPlugin.java
index ee8e062..f71d7eb 100755
--- a/solr/core/src/java/org/apache/solr/search/XmlQParserPlugin.java
+++ b/solr/core/src/java/org/apache/solr/search/XmlQParserPlugin.java
@@ -53,7 +53,7 @@ public class XmlQParserPlugin extends QParserPlugin {
         return null;
       }
       final IndexSchema schema = req.getSchema();
-      final String defaultField = QueryParsing.getDefaultField(schema, getParam(CommonParams.DF));
+      final String defaultField = getParam(CommonParams.DF);
       final Analyzer analyzer = schema.getQueryAnalyzer();
 
       final SolrCoreParser solrParser = new SolrCoreParser(defaultField, analyzer, req);

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/test-files/solr/collection1/conf/bad-schema-defaultsearchfield.xml
----------------------------------------------------------------------
diff --git a/solr/core/src/test-files/solr/collection1/conf/bad-schema-defaultsearchfield.xml b/solr/core/src/test-files/solr/collection1/conf/bad-schema-defaultsearchfield.xml
new file mode 100644
index 0000000..9567e30
--- /dev/null
+++ b/solr/core/src/test-files/solr/collection1/conf/bad-schema-defaultsearchfield.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" ?>
+<!--
+ 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.
+-->
+
+<schema name="bad-schema-defaultsearchfield" version="1.6">
+  <fieldType name="string" class="solr.StrField"/>
+  <field name="id" type="string" indexed="true" stored="true" multiValued="false" required="false"/>
+  <uniqueKey>id</uniqueKey>
+  <!-- BEGIN BAD STUFF: not allowed anymore -->
+  <defaultSearchField>id</defaultSearchField>
+  <!-- END BAD STUFF -->
+</schema>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/test/org/apache/solr/MinimalSchemaTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/MinimalSchemaTest.java b/solr/core/src/test/org/apache/solr/MinimalSchemaTest.java
index df8b552..4c06438 100644
--- a/solr/core/src/test/org/apache/solr/MinimalSchemaTest.java
+++ b/solr/core/src/test/org/apache/solr/MinimalSchemaTest.java
@@ -88,7 +88,6 @@ public class MinimalSchemaTest extends SolrTestCaseJ4 {
                 "show","schema")
             ,"//int[@name='numDocs'][.='2']"
             ,"//null[@name='uniqueKeyField']"
-            ,"//null[@name='defaultSearchField']"
             );
 
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java
index fc0f6be..2b2fba9 100644
--- a/solr/core/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java
@@ -479,6 +479,14 @@ public class FieldAnalysisRequestHandlerTest extends AnalysisRequestHandlerTestB
     assertEquals(901, tokenInfoList.get(0).get("org.apache.lucene.analysis.tokenattributes.FlagsAttribute#flags"));
   }
 
+  @Test(expected = Exception.class)
+  public void testNoDefaultField() throws Exception {
+    ModifiableSolrParams params = new ModifiableSolrParams();
+    params.add(CommonParams.Q, "fox brown");
+    SolrQueryRequest req = new LocalSolrQueryRequest(h.getCore(), params);
+    handler.resolveAnalysisRequest(req);
+  }
+
   /** A custom impl of a standard attribute impl; test this instance is used. */
   public class CustomFlagsAttributeImpl extends FlagsAttributeImpl {
     @Override

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/test/org/apache/solr/schema/BadIndexSchemaTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/schema/BadIndexSchemaTest.java b/solr/core/src/test/org/apache/solr/schema/BadIndexSchemaTest.java
index e24386b..2d5adf9 100644
--- a/solr/core/src/test/org/apache/solr/schema/BadIndexSchemaTest.java
+++ b/solr/core/src/test/org/apache/solr/schema/BadIndexSchemaTest.java
@@ -132,4 +132,8 @@ public class BadIndexSchemaTest extends AbstractBadConfigTestBase {
     doTest("bad-schema-default-operator.xml",
            "default operator in schema (solrQueryParser/@defaultOperator) not supported");
   }
+
+  public void testSchemaWithDefaultSearchField() throws Exception {
+    doTest("bad-schema-defaultsearchfield.xml", "Setting defaultSearchField in schema not supported since Solr 7");
+  }
 }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/core/src/test/org/apache/solr/util/SolrPluginUtilsTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/util/SolrPluginUtilsTest.java b/solr/core/src/test/org/apache/solr/util/SolrPluginUtilsTest.java
index 59795d8..0ffb206 100644
--- a/solr/core/src/test/org/apache/solr/util/SolrPluginUtilsTest.java
+++ b/solr/core/src/test/org/apache/solr/util/SolrPluginUtilsTest.java
@@ -35,7 +35,6 @@ import org.apache.lucene.search.TermQuery;
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.search.QParser;
-import org.apache.solr.search.QueryParsing;
 import org.apache.solr.util.SolrPluginUtils.DisjunctionMaxQueryParser;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -131,7 +130,7 @@ public class SolrPluginUtilsTest extends SolrTestCaseJ4 {
     QParser qparser = QParser.getParser("hi", "dismax", req);
 
     DisjunctionMaxQueryParser qp =
-      new SolrPluginUtils.DisjunctionMaxQueryParser(qparser, QueryParsing.getDefaultField(req.getSchema(), req.getParams().get("df")));
+      new SolrPluginUtils.DisjunctionMaxQueryParser(qparser, req.getParams().get("df"));
 
     qp.addAlias("hoss", 0.01f, SolrPluginUtils.parseFieldBoosts
                 ("title^2.0 title_stemmed name^1.2 subject^0.5"));

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/example/example-DIH/solr/tika/conf/managed-schema
----------------------------------------------------------------------
diff --git a/solr/example/example-DIH/solr/tika/conf/managed-schema b/solr/example/example-DIH/solr/tika/conf/managed-schema
index 6d506f7..b90f314 100644
--- a/solr/example/example-DIH/solr/tika/conf/managed-schema
+++ b/solr/example/example-DIH/solr/tika/conf/managed-schema
@@ -25,7 +25,7 @@
   <field name="title" type="text_simple" indexed="true" stored="true" multiValued="true"/>
   <field name="format" type="string" indexed="true" stored="true"/>
 
-  <!-- field "text" is searchable (it is the default search field) but it is not stored to save space -->
+  <!-- field "text" is searchable but it is not stored to save space -->
   <field name="text" type="text_simple" indexed="true" stored="false" multiValued="true"/>
 
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/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 e36c093..c76d6c3 100644
--- a/solr/solr-ref-guide/src/other-schema-elements.adoc
+++ b/solr/solr-ref-guide/src/other-schema-elements.adoc
@@ -21,13 +21,6 @@ Schema defaults and `copyFields` cannot be used to populate the `uniqueKey` fiel
 Further, the operation will fail if the `uniqueKey` field is used, but is multivalued (or inherits the multivalue-ness from the `fieldtype`). However, `uniqueKey` will continue to work, as long as the field is properly used.
 
 
-[[OtherSchemaElements-DefaultSearchField]]
-== Default Search Field
-
-Although it has been deprecated for quite some time, Solr still has support for Schema based configuration of a `<defaultSearchField/>` (which is superseded by the <<the-standard-query-parser.adoc#the-standard-query-parser,`df parameter`>>).
-
-If you have this option specified in your Schema, you are strongly encouraged to replace it with request parameters (or <<request-parameters-api.adoc#request-parameters-api,request parameter defaults>>) as support for it will be removed from future Solr release.
-
 [[OtherSchemaElements-Similarity]]
 == Similarity
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/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 eac49b2..73b37d7 100644
--- a/solr/solr-ref-guide/src/putting-the-pieces-together.adoc
+++ b/solr/solr-ref-guide/src/putting-the-pieces-together.adoc
@@ -22,8 +22,6 @@ These are supplemented by `copyFields`.
 
 The `uniqueKey` must always be defined.
 
-In older Solr versions you would find `defaultSearchField` and `solrQueryParser` tags as well, but although these still work they are deprecated and discouraged, see <<other-schema-elements.adoc#other-schema-elements,Other Schema Elements>>.
-
 .Types and fields are optional tags
 [NOTE]
 ====

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/solrj/src/java/org/apache/solr/client/solrj/response/schema/SchemaRepresentation.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/schema/SchemaRepresentation.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/schema/SchemaRepresentation.java
index 68441bc..f9c1cf4 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/schema/SchemaRepresentation.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/schema/SchemaRepresentation.java
@@ -29,8 +29,6 @@ public class SchemaRepresentation {
 
   private String uniqueKey;
 
-  private String defaultSearchField;
-
   private Map<String, Object> similarity;
 
   private List<Map<String, Object>> fields;
@@ -66,14 +64,6 @@ public class SchemaRepresentation {
     this.uniqueKey = uniqueKey;
   }
 
-  public String getDefaultSearchField() {
-    return defaultSearchField;
-  }
-
-  public void setDefaultSearchField(String defaultSearchField) {
-    this.defaultSearchField = defaultSearchField;
-  }
-
   public Map<String, Object> getSimilarity() {
     return similarity;
   }

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/solrj/src/java/org/apache/solr/client/solrj/response/schema/SchemaResponse.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/schema/SchemaResponse.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/schema/SchemaResponse.java
index e45d023..d0ec5f7 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/schema/SchemaResponse.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/schema/SchemaResponse.java
@@ -137,7 +137,6 @@ public class SchemaResponse extends SolrResponseBase {
     schemaRepresentation.setName(getSchemaName(schemaObj));
     schemaRepresentation.setVersion(getSchemaVersion(schemaObj));
     schemaRepresentation.setUniqueKey(getSchemaUniqueKey(schemaObj));
-    schemaRepresentation.setDefaultSearchField(getDefaultSearchField(schemaObj));
     schemaRepresentation.setSimilarity(getSimilarity(schemaObj));
     schemaRepresentation.setFields(getFields(schemaObj));
     schemaRepresentation.setDynamicFields(getDynamicFields(schemaObj));
@@ -158,10 +157,6 @@ public class SchemaResponse extends SolrResponseBase {
     return (String) schemaNamedList.get("uniqueKey");
   }
 
-  private static String getDefaultSearchField(Map schemaNamedList) {
-    return (String) schemaNamedList.get("defaultSearchField");
-  }
-
   private static Map<String, Object> getSimilarity(Map schemaNamedList) {
     NamedList<Object> similarityNamedList = (NamedList<Object>) schemaNamedList.get("similarity");
     Map<String, Object> similarity = null;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/webapp/web/js/angular/controllers/schema.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/controllers/schema.js b/solr/webapp/web/js/angular/controllers/schema.js
index a6f184c..1eefb75 100644
--- a/solr/webapp/web/js/angular/controllers/schema.js
+++ b/solr/webapp/web/js/angular/controllers/schema.js
@@ -68,13 +68,11 @@ solrAdminApp.controller('SchemaController',
                     }
                     $scope.leftbar = leftbar;
                     $scope.core = $routeParams.core;
-                    $scope.defaultSearchField = data.default_search_field;
                     $scope.uniqueKeyField = data.unique_key_field;
                     $scope.similarity = data.similarity; 
                     if ($scope.similarity && $scope.similarity.className) {
                         $scope.similarity.className = shortenPackages($scope.similarity.className); 
                     }
-                    $scope.isDefaultSearchField = ($scope.selectedType == "Field" && $scope.name == $scope.defaultSearchField);
                     $scope.isUniqueKeyField = ($scope.selectedType == "Field" && $scope.name == $scope.uniqueKeyField);
 
                     $scope.display = getFieldProperties(data, $routeParams.core, $scope.is, $scope.name);
@@ -336,7 +334,6 @@ var filterFields = function(type, data, name) {
 var mergeIndexAndSchemaData = function(index, schema) {
 
     var data = {
-        default_search_field: null,
         unique_key_field: null,
         similarity: null,
         key: {},
@@ -357,7 +354,6 @@ var mergeIndexAndSchemaData = function(index, schema) {
 
     data.key = index.info.key;
 
-    data.default_search_field = schema.defaultSearchField;
     data.unique_key_field = schema.uniqueKeyField;
     data.similarity = schema.similarity;
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4a57fb4d/solr/webapp/web/partials/schema.html
----------------------------------------------------------------------
diff --git a/solr/webapp/web/partials/schema.html b/solr/webapp/web/partials/schema.html
index 1c0347f..0c6ba20 100644
--- a/solr/webapp/web/partials/schema.html
+++ b/solr/webapp/web/partials/schema.html
@@ -435,9 +435,6 @@ limitations under the License.
         <dt class="unique-key-field" ng-class="{active: isUniqueKeyField}" ng-show="uniqueKeyField">Unique Key Field</dt>
         <dd class="unique-key-field" ng-class="{active: isUniqueKeyField}"><a ng-href="#/{{core}}/schema?field={{uniqueKeyField}}">{{uniqueKeyField}}</a></dd>
 
-        <dt class="default-search-field" ng-class="{active: isDefaultSearchField}" ng-show="defaultSearchField">Default Search Field</dt>
-        <dd class="default-search-field" ng-class="{active: isDefaultSearchField}"><a ng-href="#/{{core}}/schema?field={{defaultSearchField}}">{{defaultSearchField}}</a></dd>
-
         <dt class="similarity" ng-class="{active: similarity.className}">Global Similarity:</dt>
         <dd class="similarity" ng-class="{active: similarity.className}" data-tip="{{ similarity.className }}">{{ similarity.details }}</dd>
 


[05/27] lucene-solr:jira/solr-10233: Avoid creating too many fs directories.

Posted by tf...@apache.org.
Avoid creating too many fs directories.


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

Branch: refs/heads/jira/solr-10233
Commit: 629624d5df123e2621403d057daf67b8e01c2073
Parents: 3bb4662
Author: Adrien Grand <jp...@gmail.com>
Authored: Fri May 19 08:44:13 2017 +0200
Committer: Adrien Grand <jp...@gmail.com>
Committed: Fri May 19 08:44:13 2017 +0200

----------------------------------------------------------------------
 .../src/test/org/apache/lucene/misc/SweetSpotSimilarityTest.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/629624d5/lucene/misc/src/test/org/apache/lucene/misc/SweetSpotSimilarityTest.java
----------------------------------------------------------------------
diff --git a/lucene/misc/src/test/org/apache/lucene/misc/SweetSpotSimilarityTest.java b/lucene/misc/src/test/org/apache/lucene/misc/SweetSpotSimilarityTest.java
index d21a3ea..a2b324e 100644
--- a/lucene/misc/src/test/org/apache/lucene/misc/SweetSpotSimilarityTest.java
+++ b/lucene/misc/src/test/org/apache/lucene/misc/SweetSpotSimilarityTest.java
@@ -33,6 +33,7 @@ import org.apache.lucene.search.similarities.PerFieldSimilarityWrapper;
 import org.apache.lucene.search.similarities.Similarity;
 import org.apache.lucene.search.similarities.TFIDFSimilarity;
 import org.apache.lucene.store.Directory;
+import org.apache.lucene.store.RAMDirectory;
 import org.apache.lucene.util.LuceneTestCase;
 
 /**
@@ -42,7 +43,7 @@ public class SweetSpotSimilarityTest extends LuceneTestCase {
   
   private static float computeNorm(Similarity sim, String field, int length) throws IOException {
     String value = IntStream.range(0, length).mapToObj(i -> "a").collect(Collectors.joining(" "));
-    Directory dir = newDirectory();
+    Directory dir = new RAMDirectory();
     IndexWriter w = new IndexWriter(dir, newIndexWriterConfig().setSimilarity(sim));
     w.addDocument(Collections.singleton(newTextField(field, value, Store.NO)));
     DirectoryReader reader = DirectoryReader.open(w);


[12/27] lucene-solr:jira/solr-10233: SOLR-10692: Split streaming-expressions.adoc into 4 total files; fix section titles

Posted by tf...@apache.org.
SOLR-10692: Split streaming-expressions.adoc into 4 total files; fix section titles


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

Branch: refs/heads/jira/solr-10233
Commit: bc89757acc696f4b001b6b79af43141647650d85
Parents: b179249
Author: Cassandra Targett <ca...@lucidworks.com>
Authored: Fri May 19 14:34:23 2017 -0500
Committer: Cassandra Targett <ca...@lucidworks.com>
Committed: Fri May 19 14:34:23 2017 -0500

----------------------------------------------------------------------
 solr/solr-ref-guide/src/solr-glossary.adoc      |    4 +-
 solr/solr-ref-guide/src/stream-decorators.adoc  |  832 ++++++++
 solr/solr-ref-guide/src/stream-evaluators.adoc  |  445 +++++
 solr/solr-ref-guide/src/stream-sources.adoc     |  405 ++++
 .../src/streaming-expressions.adoc              | 1863 +-----------------
 5 files changed, 1695 insertions(+), 1854 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bc89757a/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 829293a..d5c0ca2 100644
--- a/solr/solr-ref-guide/src/solr-glossary.adoc
+++ b/solr/solr-ref-guide/src/solr-glossary.adoc
@@ -38,7 +38,7 @@ In Solr, one or more <<document,Documents>> grouped together in a single logical
 +
 In <<solrclouddef,SolrCloud>> a collection may be divided up into multiple logical shards, which may in turn be distributed across many nodes, or in a Single node Solr installation, a collection may be a single <<core,Core>>.
 
-[[commit]]Commit::
+[[defcommit]]Commit::
 To make document changes permanent in the index. In the case of added documents, they would be searchable after a _commit_.
 
 [[core]]Core::
@@ -65,7 +65,7 @@ A <<zookeeper,ZooKeeper>> term to indicate multiple ZooKeeper instances running
 [[SolrGlossary-F]]
 === F
 
-[[facet]]Facet::
+[[deffacet]]Facet::
 The arrangement of search results into categories based on indexed terms.
 
 [[field]]Field::

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bc89757a/solr/solr-ref-guide/src/stream-decorators.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-decorators.adoc b/solr/solr-ref-guide/src/stream-decorators.adoc
new file mode 100644
index 0000000..08282c1
--- /dev/null
+++ b/solr/solr-ref-guide/src/stream-decorators.adoc
@@ -0,0 +1,832 @@
+= Stream Decorator Reference
+:page-shortname: stream-decorators
+:page-permalink: stream-decorators.html
+:page-tocclass: right
+:page-toclevels: 1
+
+== cartesianProduct
+//TODO
+
+== cell
+//TODO
+
+== classify
+
+The `classify` function classifies tuples using a logistic regression text classification model. It was designed specifically to work with models trained using the <<stream-sources.adoc#train,train function>>. The `classify` function uses the <<stream-sources.adoc#model,model function>> to retrieve a stored model and then scores a stream of tuples using the model. The tuples read by the classifier must contain a text field that can be used for classification. The classify function uses a Lucene analyzer to extract the features from the text so the model can be applied. By default the `classify` function looks for the analyzer using the name of text field in the tuple. If the Solr schema on the worker node does not contain this field, the analyzer can be looked up in another field by specifying the `analyzerField` parameter.
+
+Each tuple that is classified is assigned two scores:
+
+* probability_d* : A float between 0 and 1 which describes the probability that the tuple belongs to the class. This is useful in the classification use case.
+
+* score_d* : The score of the document that has not be squashed between 0 and 1. The score may be positive or negative. The higher the score the better the document fits the class. This un-squashed score will be useful in query re-ranking and recommendation use cases. This score is particularly useful when multiple high ranking documents have a probability_d score of 1, which won't provide a meaningful ranking between documents.
+
+=== classify Parameters
+
+* `model expression`: (Mandatory) Retrieves the stored logistic regression model.
+* `field`: (Mandatory) The field in the tuples to apply the classifier to. By default the analyzer for this field in the schema will be used extract the features.
+* `analyzerField`: (Optional) Specifies a different field to find the analyzer from in the schema.
+
+=== classify Syntax
+
+[source,text]
+----
+classify(model(modelCollection,
+             id="model1",
+             cacheMillis=5000),
+         search(contentCollection,
+             q="id:(a b c)",
+             fl="text_t, id",
+             sort="id asc"),
+             field="text_t")
+----
+
+In the example above the `classify expression` is retrieving the model using the `model` function. It is then classifying tuples returned by the `search` function. The `text_t` field is used for the text classification and the analyzer for the `text_t` field in the Solr schema is used to analyze the text and extract the features.
+
+== commit
+
+The `commit` function wraps a single stream (A) and given a collection and batch size will send commit messages to the collection when the batch size is fulfilled or the end of stream is reached. A commit stream is used most frequently with an update stream and as such the commit will take into account possible summary tuples coming from the update stream. All tuples coming into the commit stream will be returned out of the commit stream - no tuples will be dropped and no tuples will be added.
+
+=== commit Parameters
+
+* `collection`: The collection to send commit messages to (required)
+* `batchSize`: The commit batch size, sends commit message when batch size is hit. If not provided (or provided as value 0) then a commit is only sent at the end of the incoming stream.
+* `waitFlush`: The value passed directly to the commit handler (true/false, default: false)
+* `waitSearcher`: The value passed directly to the commit handler (true/false, default: false)
+* `softCommit`: The value passed directly to the commit handler (true/false, default: false)
+* `StreamExpression for StreamA` (required)
+
+=== commit Syntax
+
+[source,text]
+----
+commit(
+    destinationCollection,
+    batchSize=2,
+    update(
+        destinationCollection,
+        batchSize=5,
+        search(collection1, q=*:*, fl="id,a_s,a_i,a_f,s_multi,i_multi", sort="a_f asc, a_i asc")
+    )
+)
+----
+
+== complement
+
+The `complement` function wraps two streams (A and B) and emits tuples from A which do not exist in B. The tuples are emitted in the order in which they appear in stream A. Both streams must be sorted by the fields being used to determine equality (using the `on` parameter).
+
+=== complement Parameters
+
+* `StreamExpression for StreamA`
+* `StreamExpression for StreamB`
+* `on`: Fields to be used for checking equality of tuples between A and B. Can be of the format `on="fieldName"`, `on="fieldNameInLeft=fieldNameInRight"`, or `on="fieldName, otherFieldName=rightOtherFieldName"`.
+
+=== complement Syntax
+
+[source,text]
+----
+complement(
+  search(collection1, q=a_s:(setA || setAB), fl="id,a_s,a_i", sort="a_i asc, a_s asc"),
+  search(collection1, q=a_s:(setB || setAB), fl="id,a_s,a_i", sort="a_i asc"),
+  on="a_i"
+)
+
+complement(
+  search(collection1, q=a_s:(setA || setAB), fl="id,a_s,a_i", sort="a_i asc, a_s asc"),
+  search(collection1, q=a_s:(setB || setAB), fl="id,a_s,a_i", sort="a_i asc, a_s asc"),
+  on="a_i,a_s"
+)
+----
+
+== daemon
+
+The `daemon` function wraps another function and runs it at intervals using an internal thread. The `daemon` function can be used to provide both continuous push and pull streaming.
+
+=== Continuous Push Streaming
+
+With continuous push streaming the `daemon` function wraps another function and is then sent to the `/stream` handler for execution. The `/stream` handler recognizes the `daemon` function and keeps it resident in memory, so it can run its internal function at intervals.
+
+In order to facilitate the pushing of tuples, the `daemon` function must wrap another stream decorator that pushes the tuples somewhere. One example of this is the `update` function, which wraps a stream and sends the tuples to another SolrCloud collection for indexing.
+
+=== daemon Syntax
+
+[source,text]
+----
+daemon(id="uniqueId",
+       runInterval="1000",
+       terminate="true",
+       update(destinationCollection,
+              batchSize=100,
+              topic(checkpointCollection,
+                    topicCollection,
+                    q="topic query",
+                    fl="id, title, abstract, text",
+                    id="topicId",
+                    initialCheckpoint=0)
+               )
+        )
+----
+
+The sample code above shows a `daemon` function wrapping an `update` function, which is wrapping a `topic` function. When this expression is sent to the `/stream` handler, the `/stream` hander sees the `daemon` function and keeps it in memory where it will run at intervals. In this particular example, the `daemon` function will run the `update` function every second. The `update` function is wrapping a <<stream-sources.adoc#topic,`topic` function>>, which will stream tuples that match the `topic` function query in batches. Each subsequent call to the topic will return the next batch of tuples for the topic. The `update` function will send all the tuples matching the topic to another collection to be indexed. The `terminate` parameter tells the daemon to terminate when the `topic` function stops sending tuples.
+
+The effect of this is to push documents that match a specific query into another collection. Custom push functions can be plugged in that push documents out of Solr and into other systems, such as Kafka or an email system.
+
+Push streaming can also be used for continuous background aggregation scenarios where aggregates are rolled up in the background at intervals and pushed to other Solr collections. Another use case is continuous background machine learning model optimization, where the optimized model is pushed to another Solr collection where it can be integrated into queries.
+
+The `/stream` handler supports a small set commands for listing and controlling daemon functions:
+
+[source,text]
+----
+http://localhost:8983/collection/stream?action=list
+----
+
+This command will provide a listing of the current daemon's running on the specific node along with there current state.
+
+[source,text]
+----
+http://localhost:8983/collection/stream?action=stop&id=daemonId
+----
+
+This command will stop a specific daemon function but leave it resident in memory.
+
+[source,text]
+----
+http://localhost:8983/collection/stream?action=start&id=daemonId
+----
+
+This command will start a specific daemon function that has been stopped.
+
+[source,text]
+----
+http://localhost:8983/collection/stream?action=kill&id=daemonId
+----
+
+This command will stop a specific daemon function and remove it from memory.
+
+=== Continuous Pull Streaming
+
+The {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/io/stream/DaemonStream.html[DaemonStream] java class (part of the SolrJ libraries) can also be embedded in a java application to provide continuous pull streaming. Sample code:
+
+[source,java]
+----
+StreamContext context = new StreamContext()
+SolrClientCache cache = new SolrClientCache();
+context.setSolrClientCache(cache);
+
+Map topicQueryParams = new HashMap();
+topicQueryParams.put("q","hello");  // The query for the topic
+topicQueryparams.put("rows", "500"); // How many rows to fetch during each run
+topicQueryparams.put("fl", "id", "title"); // The field list to return with the documents
+
+TopicStream topicStream = new TopicStream(zkHost,        // Host address for the zookeeper service housing the collections
+                                         "checkpoints",  // The collection to store the topic checkpoints
+                                         "topicData",    // The collection to query for the topic records
+                                         "topicId",      // The id of the topic
+                                         -1,             // checkpoint every X tuples, if set -1 it will checkpoint after each run.
+                                          topicQueryParams); // The query parameters for the TopicStream
+
+DaemonStream daemonStream = new DaemonStream(topicStream,             // The underlying stream to run.
+                                             "daemonId",              // The id of the daemon
+                                             1000,                    // The interval at which to run the internal stream
+                                             500);                    // The internal queue size for the daemon stream. Tuples will be placed in the queue
+                                                                      // as they are read by the internal internal thread.
+                                                                      // Calling read() on the daemon stream reads records from the internal queue.
+
+daemonStream.setStreamContext(context);
+
+daemonStream.open();
+
+//Read until it's time to shutdown the DaemonStream. You can define the shutdown criteria.
+while(!shutdown()) {
+    Tuple tuple = daemonStream.read() // This will block until tuples become available from the underlying stream (TopicStream)
+                                      // The EOF tuple (signaling the end of the stream) will never occur until the DaemonStream has been shutdown.
+    //Do something with the tuples
+}
+
+// Shutdown the DaemonStream.
+daemonStream.shutdown();
+
+//Read the DaemonStream until the EOF Tuple is found.
+//This allows the underlying stream to perform an orderly shutdown.
+
+while(true) {
+    Tuple tuple = daemonStream.read();
+    if(tuple.EOF) {
+        break;
+    } else {
+        //Do something with the tuples.
+    }
+}
+//Finally close the stream
+daemonStream.close();
+----
+
+== eval
+//todo
+
+[[StreamingExpressions-executor]]
+== executor
+
+The `executor` function wraps a stream source that contains streaming expressions, and executes the expressions in parallel. The `executor` function looks for the expression in the `expr_s` field in each tuple. The `executor` function has an internal thread pool that runs tasks that compile and run expressions in parallel on the same worker node. This function can also be parallelized across worker nodes by wrapping it in the <<parallel,`parallel`>> function to provide parallel execution of expressions across a cluster.
+
+The `executor` function does not do anything specific with the output of the expressions that it runs. Therefore the expressions that are executed must contain the logic for pushing tuples to their destination. The <<update,update function>> can be included in the expression being executed to send the tuples to a SolrCloud collection for storage.
+
+This model allows for asynchronous execution of jobs where the output is stored in a SolrCloud collection where it can be accessed as the job progresses.
+
+=== executor Parameters
+
+* `threads`: (Optional) The number of threads in the executors thread pool for executing expressions.
+* `StreamExpression`: (Mandatory) The stream source which contains the Streaming Expressions to execute.
+
+=== executor Syntax
+
+[source,text]
+----
+daemon(id="myDaemon",
+       terminate="true",
+       executor(threads=10,
+                topic(checkpointCollection
+                      storedExpressions,
+                      q="*:*",
+                      fl="id, expr_s",
+                      initialCheckPoint=0,
+                      id="myTopic")))
+----
+
+In the example above a <<daemon,daemon>> wraps an executor**,** which wraps a <<stream-sources.adoc#topic,topic>> that is returning tuples with expressions to execute. When sent to the stream handler, the daemon will call the executor at intervals which will cause the executor to read from the topic and execute the expressions found in the `expr_s` field. The daemon will repeatedly call the executor until all the tuples that match the topic have been iterated, then it will terminate. This is the approach for executing batches of streaming expressions from a `topic` queue.
+
+== fetch
+
+The `fetch` function iterates a stream and fetches additional fields and adds them to the tuples. The `fetch` function fetches in batches to limit the number of calls back to Solr. Tuples streamed from the `fetch` function will contain the original fields and the additional fields that were fetched. The `fetch` function supports one-to-one fetches. Many-to-one fetches, where the stream source contains duplicate keys, will also work, but one-to-many fetches are currently not supported by this function.
+
+=== fetch Parameters
+
+* `Collection`: (Mandatory) The collection to fetch the fields from.
+* `StreamExpression`: (Mandatory) The stream source for the fetch function.
+* `fl`: (Mandatory) The fields to be fetched.
+* `on`: Fields to be used for checking equality of tuples between stream source and fetched records. Formatted as `on="fieldNameInTuple=fieldNameInCollection"`.
+* `batchSize`: (Optional) The batch fetch size.
+
+=== fetch Syntax
+
+[source,text]
+----
+fetch(addresses,
+      search(people, q="*:*", fl="username, firstName, lastName", sort="username asc"),
+      fl="streetAddress, city, state, country, zip",
+      on="username=userId")
+----
+
+The example above fetches addresses for users by matching the username in the tuple with the userId field in the addresses collection.
+
+== having
+
+The `having` expression wraps a stream and applies a boolean operation to each tuple. It emits only tuples for which the boolean operation returns *true*.
+
+=== having Parameters
+
+* `StreamExpression`: (Mandatory) The stream source for the having function.
+* `booleanEvaluator`: (Madatory) The following boolean operations are supported: *eq* (equals), *gt* (greater than), *lt* (less than), *gteq* (greater than or equal to), *lteq* (less than or equal to), *and*, *or, eor* (exclusive or), and *not*. Boolean evaluators can be nested with other evaluators to form complex boolean logic.
+
+The comparison evaluators compare the value in a specific field with a value, whether a string, number, or boolean. For example: *eq*(field1, 10), returns true if *field1* is equal to 10.
+
+=== having Syntax
+
+[source,text]
+----
+having(rollup(over=a_s,
+              sum(a_i),
+              search(collection1,
+                     q=*:*,
+                     fl="id,a_s,a_i,a_f",
+                     sort="a_s asc")),
+       and(gt(sum(a_i), 100), lt(sum(a_i), 110)))
+
+----
+
+In this example, the `having` expression iterates the aggregated tuples from the `rollup` expression and emits all tuples where the field `sum(a_i)` is greater then 100 and less then 110.
+
+== leftOuterJoin
+
+The `leftOuterJoin` function wraps two streams, Left and Right, and emits tuples from Left. If there is a tuple in Right equal (as defined by `on`) then the values in that tuple will be included in the emitted tuple. An equal tuple in Right *need not* exist for the Left tuple to be emitted. This supports one-to-one, one-to-many, many-to-one, and many-to-many left outer join scenarios. The tuples are emitted in the order in which they appear in the Left stream. Both streams must be sorted by the fields being used to determine equality (using the `on` parameter). If both tuples contain a field of the same name then the value from the Right stream will be used in the emitted tuple.
+
+You can wrap the incoming streams with a `select` function to be specific about which field values are included in the emitted tuple.
+
+=== leftOuterJoin Parameters
+
+* `StreamExpression for StreamLeft`
+* `StreamExpression for StreamRight`
+* `on`: Fields to be used for checking equality of tuples between Left and Right. Can be of the format `on="fieldName"`, `on="fieldNameInLeft=fieldNameInRight"`, or `on="fieldName, otherFieldName=rightOtherFieldName"`.
+
+=== leftOuterJoin Syntax
+
+[source,text]
+----
+leftOuterJoin(
+  search(people, q=*:*, fl="personId,name", sort="personId asc"),
+  search(pets, q=type:cat, fl="personId,petName", sort="personId asc"),
+  on="personId"
+)
+
+leftOuterJoin(
+  search(people, q=*:*, fl="personId,name", sort="personId asc"),
+  search(pets, q=type:cat, fl="ownerId,petName", sort="ownerId asc"),
+  on="personId=ownerId"
+)
+
+leftOuterJoin(
+  search(people, q=*:*, fl="personId,name", sort="personId asc"),
+  select(
+    search(pets, q=type:cat, fl="ownerId,name", sort="ownerId asc"),
+    ownerId,
+    name as petName
+  ),
+  on="personId=ownerId"
+)
+----
+
+== hashJoin
+
+The `hashJoin` function wraps two streams, Left and Right, and for every tuple in Left which exists in Right will emit a tuple containing the fields of both tuples. This supports one-to-one, one-to-many, many-to-one, and many-to-many inner join scenarios. The tuples are emitted in the order in which they appear in the Left stream. The order of the streams does not matter. If both tuples contain a field of the same name then the value from the Right stream will be used in the emitted tuple.
+
+You can wrap the incoming streams with a `select` function to be specific about which field values are included in the emitted tuple.
+
+The hashJoin function can be used when the tuples of Left and Right cannot be put in the same order. Because the tuples are out of order this stream functions by reading all values from the Right stream during the open operation and will store all tuples in memory. The result of this is a memory footprint equal to the size of the Right stream.
+
+=== hashJoin Parameters
+
+* `StreamExpression for StreamLeft`
+* `hashed=StreamExpression for StreamRight`
+* `on`: Fields to be used for checking equality of tuples between Left and Right. Can be of the format `on="fieldName"`, `on="fieldNameInLeft=fieldNameInRight"`, or `on="fieldName, otherFieldName=rightOtherFieldName"`.
+
+=== hashJoin Syntax
+
+[source,text]
+----
+hashJoin(
+  search(people, q=*:*, fl="personId,name", sort="personId asc"),
+  hashed=search(pets, q=type:cat, fl="personId,petName", sort="personId asc"),
+  on="personId"
+)
+
+hashJoin(
+  search(people, q=*:*, fl="personId,name", sort="personId asc"),
+  hashed=search(pets, q=type:cat, fl="ownerId,petName", sort="ownerId asc"),
+  on="personId=ownerId"
+)
+
+hashJoin(
+  search(people, q=*:*, fl="personId,name", sort="personId asc"),
+  hashed=select(
+    search(pets, q=type:cat, fl="ownerId,name", sort="ownerId asc"),
+    ownerId,
+    name as petName
+  ),
+  on="personId=ownerId"
+)
+----
+
+== innerJoin
+
+Wraps two streams Left and Right and for every tuple in Left which exists in Right will emit a tuple containing the fields of both tuples. This supports one-one, one-many, many-one, and many-many inner join scenarios. The tuples are emitted in the order in which they appear in the Left stream. Both streams must be sorted by the fields being used to determine equality (the 'on' parameter). If both tuples contain a field of the same name then the value from the Right stream will be used in the emitted tuple. You can wrap the incoming streams with a select(...) to be specific about which field values are included in the emitted tuple.
+
+=== innerJoin Parameters
+
+* `StreamExpression for StreamLeft`
+* `StreamExpression for StreamRight`
+* `on`: Fields to be used for checking equality of tuples between Left and Right. Can be of the format `on="fieldName"`, `on="fieldNameInLeft=fieldNameInRight"`, or `on="fieldName, otherFieldName=rightOtherFieldName"`.
+
+=== innerJoin Syntax
+
+[source,text]
+----
+innerJoin(
+  search(people, q=*:*, fl="personId,name", sort="personId asc"),
+  search(pets, q=type:cat, fl="personId,petName", sort="personId asc"),
+  on="personId"
+)
+
+innerJoin(
+  search(people, q=*:*, fl="personId,name", sort="personId asc"),
+  search(pets, q=type:cat, fl="ownerId,petName", sort="ownerId asc"),
+  on="personId=ownerId"
+)
+
+innerJoin(
+  search(people, q=*:*, fl="personId,name", sort="personId asc"),
+  select(
+    search(pets, q=type:cat, fl="ownerId,name", sort="ownerId asc"),
+    ownerId,
+    name as petName
+  ),
+  on="personId=ownerId"
+)
+----
+
+== intersect
+
+The `intersect` function wraps two streams, A and B, and emits tuples from A which *DO* exist in B. The tuples are emitted in the order in which they appear in stream A. Both streams must be sorted by the fields being used to determine equality (the `on` parameter). Only tuples from A are emitted.
+
+=== intersect Parameters
+
+* `StreamExpression for StreamA`
+* `StreamExpression for StreamB`
+* `on`: Fields to be used for checking equality of tuples between A and B. Can be of the format `on="fieldName"`, `on="fieldNameInLeft=fieldNameInRight"`, or `on="fieldName, otherFieldName=rightOtherFieldName"`.
+
+=== intersect Syntax
+
+[source,text]
+----
+intersect(
+  search(collection1, q=a_s:(setA || setAB), fl="id,a_s,a_i", sort="a_i asc, a_s asc"),
+  search(collection1, q=a_s:(setB || setAB), fl="id,a_s,a_i", sort="a_i asc"),
+  on="a_i"
+)
+
+intersect(
+  search(collection1, q=a_s:(setA || setAB), fl="id,a_s,a_i", sort="a_i asc, a_s asc"),
+  search(collection1, q=a_s:(setB || setAB), fl="id,a_s,a_i", sort="a_i asc, a_s asc"),
+  on="a_i,a_s"
+)
+----
+
+== merge
+
+The `merge` function merges two or more streaming expressions and maintains the ordering of the underlying streams. Because the order is maintained, the sorts of the underlying streams must line up with the on parameter provided to the merge function.
+
+=== merge Parameters
+
+* `StreamExpression A`
+* `StreamExpression B`
+* `Optional StreamExpression C,D,....Z`
+* `on`: Sort criteria for performing the merge. Of the form `fieldName order` where order is `asc` or `desc`. Multiple fields can be provided in the form `fieldA order, fieldB order`.
+
+=== merge Syntax
+
+[source,text]
+----
+# Merging two stream expressions together
+merge(
+      search(collection1,
+             q="id:(0 3 4)",
+             fl="id,a_s,a_i,a_f",
+             sort="a_f asc"),
+      search(collection1,
+             q="id:(1)",
+             fl="id,a_s,a_i,a_f",
+             sort="a_f asc"),
+      on="a_f asc")
+----
+
+[source,text]
+----
+# Merging four stream expressions together. Notice that while the sorts of each stream are not identical they are
+# comparable. That is to say the first N fields in each stream's sort matches the N fields in the merge's on clause.
+merge(
+      search(collection1,
+             q="id:(0 3 4)",
+             fl="id,fieldA,fieldB,fieldC",
+             sort="fieldA asc, fieldB desc"),
+      search(collection1,
+             q="id:(1)",
+             fl="id,fieldA",
+             sort="fieldA asc"),
+      search(collection2,
+             q="id:(10 11 13)",
+             fl="id,fieldA,fieldC",
+             sort="fieldA asc"),
+      search(collection3,
+             q="id:(987)",
+             fl="id,fieldA,fieldC",
+             sort="fieldA asc"),
+      on="fieldA asc")
+----
+
+== list
+// TODO
+
+== null
+
+The null expression is a useful utility function for understanding bottlenecks when performing parallel relational algebra (joins, intersections, rollups etc.). The null function reads all the tuples from an underlying stream and returns a single tuple with the count and processing time. Because the null stream adds minimal overhead of it's own, it can be used to isolate the performance of Solr's /export handler. If the /export handlers performance is not the bottleneck, then the bottleneck is likely occurring in the workers where the stream decorators are running.
+
+The null expression can be wrapped by the parallel function and sent to worker nodes. In this scenario each worker will return one tuple with the count of tuples processed on the worker and the timing information for that worker. This gives valuable information such as:
+
+1.  As more workers are added does the performance of the /export handler improve or not.
+2.  Are tuples being evenly distributed across the workers, or is the hash partitioning sending more documents to a single worker.
+3.  Are all workers processing data at the same speed, or is one of the workers the source of the bottleneck.
+
+=== null Parameters
+
+* `StreamExpression`: (Mandatory) The expression read by the null function.
+
+=== null Syntax
+
+[source,text]
+----
+ parallel(workerCollection,
+          null(search(collection1, q=*:*, fl="id,a_s,a_i,a_f", sort="a_s desc", qt="/export", partitionKeys="a_s")),
+          workers="20",
+          zkHost="localhost:9983",
+          sort="a_s desc")
+----
+
+The expression above shows a parallel function wrapping a null function. This will cause the null function to be run in parallel across 20 worker nodes. Each worker will return a single tuple with number of tuples processed and time it took to iterate the tuples.
+
+== outerHashJoin
+
+The `outerHashJoin` function wraps two streams, Left and Right, and emits tuples from Left. If there is a tuple in Right equal (as defined by the `on` parameter) then the values in that tuple will be included in the emitted tuple. An equal tuple in Right *need not* exist for the Left tuple to be emitted. This supports one-to-one, one-to-many, many-to-one, and many-to-many left outer join scenarios. The tuples are emitted in the order in which they appear in the Left stream. The order of the streams does not matter. If both tuples contain a field of the same name then the value from the Right stream will be used in the emitted tuple.
+
+You can wrap the incoming streams with a `select` function to be specific about which field values are included in the emitted tuple.
+
+The outerHashJoin stream can be used when the tuples of Left and Right cannot be put in the same order. Because the tuples are out of order, this stream functions by reading all values from the Right stream during the open operation and will store all tuples in memory. The result of this is a memory footprint equal to the size of the Right stream.
+
+=== outerHashJoin Parameters
+
+* `StreamExpression for StreamLeft`
+* `hashed=StreamExpression for StreamRight`
+* `on`: Fields to be used for checking equality of tuples between Left and Right. Can be of the format `on="fieldName"`, `on="fieldNameInLeft=fieldNameInRight"`, or `on="fieldName, otherFieldName=rightOtherFieldName"`.
+
+=== outerHashJoin Syntax
+
+[source,text]
+----
+outerHashJoin(
+  search(people, q=*:*, fl="personId,name", sort="personId asc"),
+  hashed=search(pets, q=type:cat, fl="personId,petName", sort="personId asc"),
+  on="personId"
+)
+
+outerHashJoin(
+  search(people, q=*:*, fl="personId,name", sort="personId asc"),
+  hashed=search(pets, q=type:cat, fl="ownerId,petName", sort="ownerId asc"),
+  on="personId=ownerId"
+)
+
+outerHashJoin(
+  search(people, q=*:*, fl="personId,name", sort="personId asc"),
+  hashed=select(
+    search(pets, q=type:cat, fl="ownerId,name", sort="ownerId asc"),
+    ownerId,
+    name as petName
+  ),
+  on="personId=ownerId"
+)
+----
+
+== parallel
+
+The `parallel` function wraps a streaming expression and sends it to N worker nodes to be processed in parallel.
+
+The parallel function requires that the `partitionKeys` parameter be provided to the underlying searches. The `partitionKeys` parameter will partition the search results (tuples) across the worker nodes. Tuples with the same values in the partitionKeys field will be shuffled to the same worker nodes.
+
+The parallel function maintains the sort order of the tuples returned by the worker nodes, so the sort criteria of the parallel function must match up with the sort order of the tuples returned by the workers.
+
+.Worker Collections
+[TIP]
+====
+The worker nodes can be from the same collection as the data, or they can be a different collection entirely, even one that only exists for parallel streaming expressions. A worker collection can be any SolrCloud collection that has the `/stream` handler configured. Unlike normal SolrCloud collections, worker collections don't have to hold any data. Worker collections can be empty collections that exist only to execute streaming expressions.
+====
+
+=== parallel Parameters
+
+* `collection`: Name of the worker collection to send the StreamExpression to.
+* `StreamExpression`: Expression to send to the worker collection.
+* `workers`: Number of workers in the worker collection to send the expression to.
+* `zkHost`: (Optional) The ZooKeeper connect string where the worker collection resides.
+* `sort`: The sort criteria for ordering tuples returned by the worker nodes.
+
+[[StreamingExpressions-Syntax.25]]
+=== parallel Syntax
+
+[source,text]
+----
+ parallel(workerCollection,
+          reduce(search(collection1, q=*:*, fl="id,a_s,a_i,a_f", sort="a_s desc", partitionKeys="a_s"),
+                 by="a_s",
+                 group(sort="a_f desc", n="4")),
+          workers="20",
+          zkHost="localhost:9983",
+          sort="a_s desc")
+----
+
+The expression above shows a `parallel` function wrapping a `reduce` function. This will cause the `reduce` function to be run in parallel across 20 worker nodes.
+
+[[StreamingExpressions-priority]]
+== priority
+
+The `priority` function is a simple priority scheduler for the <<StreamingExpressions-executor,executor>> function. The executor function doesn't directly have a concept of task prioritization; instead it simply executes tasks in the order that they are read from it's underlying stream. The `priority` function provides the ability to schedule a higher priority task ahead of lower priority tasks that were submitted earlier.
+
+The `priority` function wraps two <<stream-sources.adoc#topic,topics>> that are both emitting tuples that contain streaming expressions to execute. The first topic is considered the higher priority task queue.
+
+Each time the `priority` function is called, it checks the higher priority task queue to see if there are any tasks to execute. If tasks are waiting in the higher priority queue then the priority function will emit the higher priority tasks. If there are no high priority tasks to run, the lower priority queue tasks are emitted.
+
+The `priority` function will only emit a batch of tasks from one of the queues each time it is called. This ensures that no lower priority tasks are executed until the higher priority queue has no tasks to run.
+
+[[StreamingExpressions-Parameters.25]]
+=== Parameters
+
+* `topic expression`: (Mandatory) the high priority task queue
+* `topic expression`: (Mandatory) the lower priority task queue
+
+[[StreamingExpressions-Syntax.26]]
+=== Syntax
+
+[source,text]
+----
+daemon(id="myDaemon",
+       executor(threads=10,
+                priority(topic(checkpointCollection, storedExpressions, q="priority:high", fl="id, expr_s", initialCheckPoint=0,id="highPriorityTasks"),
+                         topic(checkpointCollection, storedExpressions, q="priority:low", fl="id, expr_s", initialCheckPoint=0,id="lowPriorityTasks"))))
+----
+
+In the example above the `daemon` function is calling the executor iteratively. Each time it's called, the `executor` function will execute the tasks emitted by the `priority` function. The `priority` function wraps two topics. The first topic is the higher priority task queue, the second topics is the lower priority topic.
+
+== reduce
+
+The `reduce` function wraps an internal stream and groups tuples by common fields.
+
+Each tuple group is operated on as a single block by a pluggable reduce operation. The group operation provided with Solr implements distributed grouping functionality. The group operation also serves as an example reduce operation that can be referred to when building custom reduce operations.
+
+[IMPORTANT]
+====
+The reduce function relies on the sort order of the underlying stream. Accordingly the sort order of the underlying stream must be aligned with the group by field.
+====
+
+=== reduce Parameters
+
+* `StreamExpression`: (Mandatory)
+* `by`: (Mandatory) A comma separated list of fields to group by.
+* `Reduce Operation`: (Mandatory)
+
+=== reduce Syntax
+
+[source,text]
+----
+reduce(search(collection1, q=*:*, fl="id,a_s,a_i,a_f", sort="a_s asc, a_f asc"),
+       by="a_s",
+       group(sort="a_f desc", n="4")
+)
+----
+
+== rollup
+
+The `rollup` function wraps another stream function and rolls up aggregates over bucket fields. The rollup function relies on the sort order of the underlying stream to rollup aggregates one grouping at a time. Accordingly, the sort order of the underlying stream must match the fields in the `over` parameter of the rollup function.
+
+The rollup function also needs to process entire result sets in order to perform its aggregations. When the underlying stream is the `search` function, the `/export` handler can be used to provide full sorted result sets to the rollup function. This sorted approach allows the rollup function to perform aggregations over very high cardinality fields. The disadvantage of this approach is that the tuples must be sorted and streamed across the network to a worker node to be aggregated. For faster aggregation over low to moderate cardinality fields, the `facet` function can be used.
+
+=== rollup Parameters
+
+* `StreamExpression` (Mandatory)
+* `over`: (Mandatory) A list of fields to group by.
+* `metrics`: (Mandatory) The list of metrics to compute. Currently supported metrics are `sum(col)`, `avg(col)`, `min(col)`, `max(col)`, `count(*)`.
+
+=== rollup Syntax
+
+[source,text]
+----
+rollup(
+   search(collection1, q=*:*, fl="a_s,a_i,a_f", qt="/export", sort="a_s asc"),
+   over="a_s",
+   sum(a_i),
+   sum(a_f),
+   min(a_i),
+   min(a_f),
+   max(a_i),
+   max(a_f),
+   avg(a_i),
+   avg(a_f),
+   count(*)
+)
+----
+
+The example about shows the rollup function wrapping the search function. Notice that search function is using the `/export` handler to provide the entire result set to the rollup stream. Also notice that the search function's *sort param* matches up with the rollup's `over` parameter. This allows the rollup function to rollup the over the `a_s` field, one group at a time.
+
+== scoreNodes
+
+See section in <<graph-traversal.adoc#GraphTraversal-UsingthescoreNodesFunctiontoMakeaRecommendation,graph traversal>>.
+
+== select
+
+The `select` function wraps a streaming expression and outputs tuples containing a subset or modified set of fields from the incoming tuples. The list of fields included in the output tuple can contain aliases to effectively rename fields. The select stream supports both operations and evaluators. One can provide a list of operations and evaluators to perform on any fields, such as `replace, add, if`, etc....
+
+=== select Parameters
+
+* `StreamExpression`
+* `fieldName`: name of field to include in the output tuple (can include multiple of these), such as `outputTuple[fieldName] = inputTuple[fieldName]`
+* `fieldName as aliasFieldName`: aliased field name to include in the output tuple (can include multiple of these), such as `outputTuple[aliasFieldName] = incomingTuple[fieldName]`
+* `replace(fieldName, value, withValue=replacementValue)`: if `incomingTuple[fieldName] == value` then `outgoingTuple[fieldName]` will be set to `replacementValue`. `value` can be the string "null" to replace a null value with some other value.
+* `replace(fieldName, value, withField=otherFieldName)`: if `incomingTuple[fieldName] == value` then `outgoingTuple[fieldName]` will be set to the value of `incomingTuple[otherFieldName]`. `value` can be the string "null" to replace a null value with some other value.
+
+=== select Syntax
+
+[source,text]
+----
+// output tuples with fields teamName, wins, losses, and winPercentages where a null value for wins or losses is translated to the value of 0
+select(
+  search(collection1, fl="id,teamName_s,wins,losses", q="*:*", sort="id asc"),
+  teamName_s as teamName,
+  wins,
+  losses,
+  replace(wins,null,withValue=0),
+  replace(losses,null,withValue=0),
+  if(eq(0,wins), 0, div(add(wins,losses), wins)) as winPercentage
+)
+----
+
+== sort
+
+The `sort` function wraps a streaming expression and re-orders the tuples. The sort function emits all incoming tuples in the new sort order. The sort function reads all tuples from the incoming stream, re-orders them using an algorithm with `O(nlog(n))` performance characteristics, where n is the total number of tuples in the incoming stream, and then outputs the tuples in the new sort order. Because all tuples are read into memory, the memory consumption of this function grows linearly with the number of tuples in the incoming stream.
+
+=== sort Parameters
+
+* `StreamExpression`
+* `by`: Sort criteria for re-ordering the tuples
+
+=== sort Syntax
+
+The expression below finds dog owners and orders the results by owner and pet name. Notice that it uses an efficient innerJoin by first ordering by the person/owner id and then re-orders the final output by the owner and pet names.
+
+[source,text]
+----
+sort(
+  innerJoin(
+    search(people, q=*:*, fl="id,name", sort="id asc"),
+    search(pets, q=type:dog, fl="owner,petName", sort="owner asc"),
+    on="id=owner"
+  ),
+  by="name asc, petName asc"
+)
+----
+
+== top
+
+The `top` function wraps a streaming expression and re-orders the tuples. The top function emits only the top N tuples in the new sort order. The top function re-orders the underlying stream so the sort criteria *does not* have to match up with the underlying stream.
+
+=== top Parameters
+
+* `n`: Number of top tuples to return.
+* `StreamExpression`
+* `sort`: Sort criteria for selecting the top N tuples.
+
+=== top Syntax
+
+The expression below finds the top 3 results of the underlying search. Notice that it reverses the sort order. The top function re-orders the results of the underlying stream.
+
+[source,text]
+----
+top(n=3,
+     search(collection1,
+            q="*:*",
+            qt="/export",
+            fl="id,a_s,a_i,a_f",
+            sort="a_f desc, a_i desc"),
+      sort="a_f asc, a_i asc")
+----
+
+== unique
+
+The `unique` function wraps a streaming expression and emits a unique stream of tuples based on the `over` parameter. The unique function relies on the sort order of the underlying stream. The `over` parameter must match up with the sort order of the underlying stream.
+
+The unique function implements a non-co-located unique algorithm. This means that records with the same unique `over` field do not need to be co-located on the same shard. When executed in the parallel, the `partitionKeys` parameter must be the same as the unique `over` field so that records with the same keys will be shuffled to the same worker.
+
+=== unique Parameters
+
+* `StreamExpression`
+* `over`: The unique criteria.
+
+=== unique Syntax
+
+[source,text]
+----
+unique(
+  search(collection1,
+         q="*:*",
+         qt="/export",
+         fl="id,a_s,a_i,a_f",
+         sort="a_f asc, a_i asc"),
+  over="a_f")
+----
+
+== update
+
+The `update` function wraps another functions and sends the tuples to a SolrCloud collection for indexing.
+
+=== update Parameters
+
+* `destinationCollection`: (Mandatory) The collection where the tuples will indexed.
+* `batchSize`: (Mandatory) The indexing batch size.
+* `StreamExpression`: (Mandatory)
+
+=== update Syntax
+
+[source,text]
+----
+ update(destinationCollection,
+        batchSize=500,
+        search(collection1,
+               q=*:*,
+               fl="id,a_s,a_i,a_f,s_multi,i_multi",
+               sort="a_f asc, a_i asc"))
+
+----
+
+The example above sends the tuples returned by the `search` function to the `destinationCollection` to be indexed.

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bc89757a/solr/solr-ref-guide/src/stream-evaluators.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-evaluators.adoc b/solr/solr-ref-guide/src/stream-evaluators.adoc
new file mode 100644
index 0000000..0337d70
--- /dev/null
+++ b/solr/solr-ref-guide/src/stream-evaluators.adoc
@@ -0,0 +1,445 @@
+= Stream Evaluator Reference
+:page-shortname: stream-evaluators
+:page-permalink: stream-evaluators.html
+:page-tocclass: right
+:page-toclevels: 1
+
+== analyze
+
+// TODO
+
+== abs
+
+The `abs` function will return the absolute value of the provided single parameter. The `abs` function will fail to execute if the value is non-numeric. If a null value is found then null will be returned as the result.
+
+=== abs Parameters
+
+* `Field Name | Raw Number | Number Evaluator`
+
+=== abs Syntax
+
+The expressions below show the various ways in which you can use the `abs` evaluator. Only one parameter is accepted. Returns a numeric value.
+
+[source,text]
+----
+abs(1) // 1, not really a good use case for it
+abs(-1) // 1, not really a good use case for it
+abs(add(fieldA,fieldB)) // absolute value of fieldA + fieldB
+abs(fieldA) // absolute value of fieldA
+----
+
+== add
+
+The `add` function will take 2 or more numeric values and add them together. The `add` function will fail to execute if any of the values are non-numeric. If a null value is found then null will be returned as the result.
+
+=== add Parameters
+
+* `Field Name | Raw Number | Number Evaluator`
+* `Field Name | Raw Number | Number Evaluator`
+* `......`
+* `Field Name | Raw Number | Number Evaluator`
+
+=== add Syntax
+
+The expressions below show the various ways in which you can use the `add` evaluator. The number and order of these parameters do not matter and is not limited except that at least two parameters are required. Returns a numeric value.
+
+[source,text]
+----
+add(1,2,3,4) // 1 + 2 + 3 + 4 == 10
+add(1,fieldA) // 1 + value of fieldA
+add(fieldA,1.4) // value of fieldA + 1.4
+add(fieldA,fieldB,fieldC) // value of fieldA + value of fieldB + value of fieldC
+add(fieldA,div(fieldA,fieldB)) // value of fieldA + (value of fieldA / value of fieldB)
+add(fieldA,if(gt(fieldA,fieldB),fieldA,fieldB)) // if fieldA > fieldB then fieldA + fieldA, else fieldA + fieldB
+----
+
+== div
+
+The `div` function will take two numeric values and divide them. The function will fail to execute if any of the values are non-numeric or null, or the 2nd value is 0. Returns a numeric value.
+
+=== div Parameters
+
+* `Field Name | Raw Number | Number Evaluator`
+* `Field Name | Raw Number | Number Evaluator`
+
+=== div Syntax
+
+The expressions below show the various ways in which you can use the `div` evaluator. The first value will be divided by the second and as such the second cannot be 0.
+
+[source,text]
+----
+div(1,2) // 1 / 2
+div(1,fieldA) // 1 / fieldA
+div(fieldA,1.4) // fieldA / 1.4
+div(fieldA,add(fieldA,fieldB)) // fieldA / (fieldA + fieldB)
+----
+
+== log
+
+The `log` function will return the natural log of the provided single parameter. The `log` function will fail to execute if the value is non-numeric. If a null value is found, then null will be returned as the result.
+
+=== log Parameters
+
+* `Field Name | Raw Number | Number Evaluator`
+
+=== log Syntax
+
+The expressions below show the various ways in which you can use the `log` evaluator. Only one parameter is accepted. Returns a numeric value.
+
+[source,text]
+----
+log(100)
+log(add(fieldA,fieldB))
+log(fieldA)
+----
+
+== mult
+
+The `mult` function will take two or more numeric values and multiply them together. The `mult` function will fail to execute if any of the values are non-numeric. If a null value is found then null will be returned as the result.
+
+=== mult Parameters
+
+* `Field Name | Raw Number | Number Evaluator`
+* `Field Name | Raw Number | Number Evaluator`
+* `......`
+* `Field Name | Raw Number | Number Evaluator`
+
+=== mult Syntax
+
+The expressions below show the various ways in which you can use the `mult` evaluator. The number and order of these parameters do not matter and is not limited except that at least two parameters are required. Returns a numeric value.
+
+[source,text]
+----
+mult(1,2,3,4) // 1 * 2 * 3 * 4
+mult(1,fieldA) // 1 * value of fieldA
+mult(fieldA,1.4) // value of fieldA * 1.4
+mult(fieldA,fieldB,fieldC) // value of fieldA * value of fieldB * value of fieldC
+mult(fieldA,div(fieldA,fieldB)) // value of fieldA * (value of fieldA / value of fieldB)
+mult(fieldA,if(gt(fieldA,fieldB),fieldA,fieldB)) // if fieldA > fieldB then fieldA * fieldA, else fieldA * fieldB
+----
+
+== sub
+
+The `sub` function will take 2 or more numeric values and subtract them, from left to right. The sub function will fail to execute if any of the values are non-numeric. If a null value is found then null will be returned as the result.
+
+=== sub Parameters
+
+* `Field Name | Raw Number | Number Evaluator`
+* `Field Name | Raw Number | Number Evaluator`
+* `......`
+* `Field Name | Raw Number | Number Evaluator`
+
+=== sub Syntax
+
+The expressions below show the various ways in which you can use the `sub` evaluator. The number of these parameters does not matter and is not limited except that at least two parameters are required. Returns a numeric value.
+
+[source,text]
+----
+sub(1,2,3,4) // 1 - 2 - 3 - 4
+sub(1,fieldA) // 1 - value of fieldA
+sub(fieldA,1.4) // value of fieldA - 1.4
+sub(fieldA,fieldB,fieldC) // value of fieldA - value of fieldB - value of fieldC
+sub(fieldA,div(fieldA,fieldB)) // value of fieldA - (value of fieldA / value of fieldB)
+if(gt(fieldA,fieldB),sub(fieldA,fieldB),sub(fieldB,fieldA)) // if fieldA > fieldB then fieldA - fieldB, else fieldB - field
+----
+
+== pow
+//TODO
+
+== mod
+//TODO
+
+=== ceil
+//TODO
+
+== floor
+//TODO
+
+== sin
+//TODO
+
+== asin
+//TODO
+
+== sinh
+//TODO
+
+== cos
+//TODO
+
+== acos
+//TODO
+
+== atan
+//TODO
+
+== round
+//TODO
+
+== sqrt
+//TODO
+
+== cbrt
+
+== and
+
+The `and` function will return the logical AND of at least 2 boolean parameters. The function will fail to execute if any parameters are non-boolean or null. Returns a boolean value.
+
+=== and Parameters
+
+* `Field Name | Raw Boolean | Boolean Evaluator`
+* `Field Name | Raw Boolean | Boolean Evaluator`
+* `......`
+* `Field Name | Raw Boolean | Boolean Evaluator`
+
+=== and Syntax
+
+The expressions below show the various ways in which you can use the `and` evaluator. At least two parameters are required, but there is no limit to how many you can use.
+
+[source,text]
+----
+and(true,fieldA) // true && fieldA
+and(fieldA,fieldB) // fieldA && fieldB
+and(or(fieldA,fieldB),fieldC) // (fieldA || fieldB) && fieldC
+and(fieldA,fieldB,fieldC,or(fieldD,fieldE),fieldF)
+----
+
+== eq
+
+The `eq` function will return whether all the parameters are equal, as per Java's standard `equals(...)` function. The function accepts parameters of any type, but will fail to execute if all the parameters are not of the same type. That is, all are Boolean, all are String, all are Numeric. If any any parameters are null and there is at least one parameter that is not null then false will be returned. Returns a boolean value.
+
+=== eq Parameters
+
+* `Field Name | Raw Value | Evaluator`
+* `Field Name | Raw Value | Evaluator`
+* `......`
+* `Field Name | Raw Value | Evaluator`
+
+=== eq Syntax
+
+The expressions below show the various ways in which you can use the `eq` evaluator.
+
+[source,text]
+----
+eq(1,2) // 1 == 2
+eq(1,fieldA) // 1 == fieldA
+eq(fieldA,val(foo)) fieldA == "foo"
+eq(add(fieldA,fieldB),6) // fieldA + fieldB == 6
+----
+
+== eor
+
+The `eor` function will return the logical exclusive or of at least two boolean parameters. The function will fail to execute if any parameters are non-boolean or null. Returns a boolean value.
+
+=== eor Parameters
+
+* `Field Name | Raw Boolean | Boolean Evaluator`
+* `Field Name | Raw Boolean | Boolean Evaluator`
+* `......`
+* `Field Name | Raw Boolean | Boolean Evaluator`
+
+=== eor Syntax
+
+The expressions below show the various ways in which you can use the `eor` evaluator. At least two parameters are required, but there is no limit to how many you can use.
+
+[source,text]
+----
+eor(true,fieldA) // true iff fieldA is false
+eor(fieldA,fieldB) // true iff either fieldA or fieldB is true but not both
+eor(eq(fieldA,fieldB),eq(fieldC,fieldD)) // true iff either fieldA == fieldB or fieldC == fieldD but not both
+----
+
+== gteq
+
+The `gteq` function will return whether the first parameter is greater than or equal to the second parameter. The function accepts numeric and string parameters, but will fail to execute if all the parameters are not of the same type. That is, all are String or all are Numeric. If any any parameters are null then an error will be raised. Returns a boolean value.
+
+=== gteq Parameters
+
+* `Field Name | Raw Value | Evaluator`
+* `Field Name | Raw Value | Evaluator`
+
+=== gteq Syntax
+
+The expressions below show the various ways in which you can use the `gteq` evaluator.
+
+[source,text]
+----
+gteq(1,2) // 1 >= 2
+gteq(1,fieldA) // 1 >= fieldA
+gteq(fieldA,val(foo)) fieldA >= "foo"
+gteq(add(fieldA,fieldB),6) // fieldA + fieldB >= 6
+----
+
+== gt
+
+The `gt` function will return whether the first parameter is greater than the second parameter. The function accepts numeric or string parameters, but will fail to execute if all the parameters are not of the same type. That is, all are String or all are Numeric. If any any parameters are null then an error will be raised. Returns a boolean value.
+
+=== gt Parameters
+
+* `Field Name | Raw Value | Evaluator`
+* `Field Name | Raw Value | Evaluator`
+
+=== gt Syntax
+
+The expressions below show the various ways in which you can use the `gt` evaluator.
+
+[source,text]
+----
+gt(1,2) // 1 > 2
+gt(1,fieldA) // 1 > fieldA
+gt(fieldA,val(foo)) fieldA > "foo"
+gt(add(fieldA,fieldB),6) // fieldA + fieldB > 6
+----
+
+== if
+
+The `if` function works like a standard conditional if/then statement. If the first parameter is true, then the second parameter will be returned, else the third parameter will be returned. The function accepts a boolean as the first parameter and anything as the second and third parameters. An error will occur if the first parameter is not a boolean or is null.
+
+=== if Parameters
+
+* `Field Name | Raw Value | Boolean Evaluator`
+* `Field Name | Raw Value | Evaluator`
+* `Field Name | Raw Value | Evaluator`
+
+=== if Syntax
+
+The expressions below show the various ways in which you can use the `if` evaluator.
+
+[source,text]
+----
+if(fieldA,fieldB,fieldC) // if fieldA is true then fieldB else fieldC
+if(gt(fieldA,5), fieldA, 5) // if fieldA > 5 then fieldA else 5
+if(eq(fieldB,null), null, div(fieldA,fieldB)) // if fieldB is null then null else fieldA / fieldB
+----
+
+== lteq
+
+The `lteq` function will return whether the first parameter is less than or equal to the second parameter. The function accepts numeric and string parameters, but will fail to execute if all the parameters are not of the same type. That is, all are String or all are Numeric. If any any parameters are null then an error will be raised. Returns a boolean value.
+
+=== lteq Parameters
+
+* `Field Name | Raw Value | Evaluator`
+* `Field Name | Raw Value | Evaluator`
+
+=== lteq Syntax
+
+The expressions below show the various ways in which you can use the `lteq` evaluator.
+
+[source,text]
+----
+lteq(1,2) // 1 <= 2
+lteq(1,fieldA) // 1 <= fieldA
+lteq(fieldA,val(foo)) fieldA <= "foo"
+lteq(add(fieldA,fieldB),6) // fieldA + fieldB <= 6
+----
+
+== lt
+
+The `lt` function will return whether the first parameter is less than the second parameter. The function accepts numeric or string parameters, but will fail to execute if all the parameters are not of the same type. That is, all are String or all are Numeric. If any any parameters are null then an error will be raised. Returns a boolean value.
+
+=== lt Parameters
+
+* `Field Name | Raw Value | Evaluator`
+* `Field Name | Raw Value | Evaluator`
+
+=== lt Syntax
+
+The expressions below show the various ways in which you can use the `lt` evaluator.
+
+[source,text]
+----
+lt(1,2) // 1 < 2
+lt(1,fieldA) // 1 < fieldA
+lt(fieldA,val(foo)) fieldA < "foo"
+lt(add(fieldA,fieldB),6) // fieldA + fieldB < 6
+----
+
+== not
+
+The `not` function will return the logical NOT of a single boolean parameter. The function will fail to execute if the parameter is non-boolean or null. Returns a boolean value.
+
+=== not Parameters
+
+* `Field Name | Raw Boolean | Boolean Evaluator`
+
+=== not Syntax
+
+The expressions below show the various ways in which you can use the `not` evaluator. Only one parameter is allowed.
+
+[source,text]
+----
+not(true) // false
+not(fieldA) // true if fieldA is false else false
+not(eq(fieldA,fieldB)) // true if fieldA != fieldB
+----
+
+== or
+
+The `or` function will return the logical OR of at least 2 boolean parameters. The function will fail to execute if any parameters are non-boolean or null. Returns a boolean value.
+
+=== or Parameters
+
+* `Field Name | Raw Boolean | Boolean Evaluator`
+* `Field Name | Raw Boolean | Boolean Evaluator`
+* `......`
+* `Field Name | Raw Boolean | Boolean Evaluator`
+
+=== or Syntax
+
+The expressions below show the various ways in which you can use the `or` evaluator. At least two parameters are required, but there is no limit to how many you can use.
+
+[source,text]
+----
+or(true,fieldA) // true || fieldA
+or(fieldA,fieldB) // fieldA || fieldB
+or(and(fieldA,fieldB),fieldC) // (fieldA && fieldB) || fieldC
+or(fieldA,fieldB,fieldC,and(fieldD,fieldE),fieldF)
+----
+
+== analyze
+//TODO
+
+== second
+//TODO
+
+== minute
+//TODO
+
+== hour
+//TODO
+
+== day
+//TODO
+
+== month
+//TODO
+
+== year
+//TODO
+
+== convert
+//TODO
+
+== raw
+
+The `raw` function will return whatever raw value is the parameter. This is useful for cases where you want to use a string as part of another evaluator.
+
+=== raw Parameters
+
+* `Raw Value`
+
+=== raw Syntax
+
+The expressions below show the various ways in which you can use the `raw` evaluator. Whatever is inside will be returned as-is. Internal evaluators are considered strings and are not evaluated.
+
+[source,text]
+----
+raw(foo) // "foo"
+raw(count(*)) // "count(*)"
+raw(45) // 45
+raw(true) // "true" (note: this returns the string "true" and not the boolean true)
+eq(raw(fieldA), fieldA) // true if the value of fieldA equals the string "fieldA"
+----
+
+== UUID
+//TODO

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/bc89757a/solr/solr-ref-guide/src/stream-sources.adoc
----------------------------------------------------------------------
diff --git a/solr/solr-ref-guide/src/stream-sources.adoc b/solr/solr-ref-guide/src/stream-sources.adoc
new file mode 100644
index 0000000..33e050a
--- /dev/null
+++ b/solr/solr-ref-guide/src/stream-sources.adoc
@@ -0,0 +1,405 @@
+= Stream Source Reference
+:page-shortname: stream-sources
+:page-permalink: stream-sources.html
+:page-tocclass: right
+:page-toclevels: 1
+
+
+== search
+
+The `search` function searches a SolrCloud collection and emits a stream of tuples that match the query. This is very similar to a standard Solr query, and uses many of the same parameters.
+
+This expression allows you to specify a request hander using the `qt` parameter. By default, the `/select` handler is used. The `/select` handler can be used for simple rapid prototyping of expressions. For production, however, you will most likely want to use the `/export` handler which is designed to `sort` and `export` entire result sets. The `/export` handler is not used by default because it has stricter requirements then the `/select` handler so it's not as easy to get started working with. To read more about the `/export` handler requirements review the section <<exporting-result-sets.adoc#exporting-result-sets,Exporting Result Sets>>.
+
+=== search Parameters
+
+* `collection`: (Mandatory) the collection being searched.
+* `q`: (Mandatory) The query to perform on the Solr index.
+* `fl`: (Mandatory) The list of fields to return.
+* `sort`: (Mandatory) The sort criteria.
+* `zkHost`: Only needs to be defined if the collection being searched is found in a different zkHost than the local stream handler.
+* `qt`: Specifies the query type, or request handler, to use. Set this to `/export` to work with large result sets. The default is `/select`.
+* `rows`: (Mandatory with the `/select` handler) The rows parameter specifies how many rows to return. This parameter is only needed with the `/select` handler (which is the default) since the `/export` handler always returns all rows.
+* `partitionKeys`: Comma delimited list of keys to partition the search results by. To be used with the parallel function for parallelizing operations across worker nodes. See the <<stream-decorators.adoc#parallel,parallel>> function for details.
+
+=== search Syntax
+
+[source,text]
+----
+expr=search(collection1,
+       zkHost="localhost:9983",
+       qt="/export",
+       q="*:*",
+       fl="id,a_s,a_i,a_f",
+       sort="a_f asc, a_i asc")
+----
+
+== jdbc
+
+The `jdbc` function searches a JDBC datasource and emits a stream of tuples representing the JDBC result set. Each row in the result set is translated into a tuple and each tuple contains all the cell values for that row.
+
+=== jdbc Parameters
+
+* `connection`: (Mandatory) JDBC formatted connection string to whatever driver you are using.
+* `sql`: (Mandatory) query to pass off to the JDBC endpoint
+* `sort`: (Mandatory) The sort criteria indicating how the data coming out of the JDBC stream is sorted
+* `driver`: The name of the JDBC driver used for the connection. If provided then the driver class will attempt to be loaded into the JVM. If not provided then it is assumed that the driver is already loaded into the JVM. Some drivers require explicit loading so this option is provided.
+* `[driverProperty]`: One or more properties to pass to the JDBC driver during connection. The format is `propertyName="propertyValue"`. You can provide as many of these properties as you'd like and they will all be passed to the connection.
+
+=== Connections and Drivers
+
+Because some JDBC drivers require explicit loading the `driver` parameter can be used to provide the driver class name. If provided, then during stream construction the driver will be loaded. If the driver cannot be loaded because the class is not found on the classpath, then stream construction will fail.
+
+When the JDBC stream is opened it will validate that a driver can be found for the provided connection string. If a driver cannot be found (because it hasn't been loaded) then the open will fail.
+
+=== Datatypes
+
+Due to the inherent differences in datatypes across JDBC sources the following datatypes are supported. The table indicates what Java type will be used for a given JDBC type. Types marked as requiring conversion will go through a conversion for each value of that type. For performance reasons the cell data types are only considered when the stream is opened as this is when the converters are created.
+
+[width="100%",options="header",]
+|===
+|JDBC Type |Java Type |Requires Conversion
+|String |String |No
+|Short |Long |Yes
+|Integer |Long |Yes
+|Long |Long |No
+|Float |Double |Yes
+|Double |Double |No
+|Boolean |Boolean |No
+|===
+
+=== jdbc Syntax
+
+A basic `jdbc` expression:
+
+[source,text]
+----
+jdbc(
+    connection="jdbc:hsqldb:mem:.",
+    sql="select NAME, ADDRESS, EMAIL, AGE from PEOPLE where AGE > 25 order by AGE, NAME DESC",
+    sort="AGE asc, NAME desc",
+    driver="org.hsqldb.jdbcDriver"
+)
+----
+
+A `jdbc` expression that passes a property to the driver:
+
+[source,text]
+----
+// get_column_name is a property to pass to the hsqldb driver
+jdbc(
+    connection="jdbc:hsqldb:mem:.",
+    sql="select NAME as FIRST_NAME, ADDRESS, EMAIL, AGE from PEOPLE where AGE > 25 order by AGE, NAME DESC",
+    sort="AGE asc, NAME desc",
+    driver="org.hsqldb.jdbcDriver",
+    get_column_name="false"
+)
+----
+
+== echo
+//TODO
+
+== facet
+
+The `facet` function provides aggregations that are rolled up over buckets. Under the covers the facet function pushes down the aggregation into the search engine using Solr's JSON Facet API. This provides sub-second performance for many use cases. The facet function is appropriate for use with a low to moderate number of distinct values in the bucket fields. To support high cardinality aggregations see the rollup function.
+
+=== facet Parameters
+
+* `collection`: (Mandatory) Collection the facets will be aggregated from.
+* `q`: (Mandatory) The query to build the aggregations from.
+* `buckets`: (Mandatory) Comma separated list of fields to rollup over. The comma separated list represents the dimensions in a multi-dimensional rollup.
+* `bucketSorts`: Comma separated list of sorts to apply to each dimension in the buckets parameters. Sorts can be on the computed metrics or on the bucket values.
+* `bucketSizeLimit`: The number of buckets to include. This value is applied to each dimension.
+* `metrics`: List of metrics to compute for the buckets. Currently supported metrics are `sum(col)`, `avg(col)`, `min(col)`, `max(col)`, `count(*)`.
+
+=== facet Syntax
+
+Example 1:
+
+[source,text]
+----
+facet(collection1,
+      q="*:*",
+      buckets="a_s",
+      bucketSorts="sum(a_i) desc",
+      bucketSizeLimit=100,
+      sum(a_i),
+      sum(a_f),
+      min(a_i),
+      min(a_f),
+      max(a_i),
+      max(a_f),
+      avg(a_i),
+      avg(a_f),
+      count(*))
+----
+
+The example above shows a facet function with rollups over a single bucket, where the buckets are returned in descending order by the calculated value of the `sum(a_i)` metric.
+
+Example 2:
+
+[source,text]
+----
+facet(collection1,
+      q="*:*",
+      buckets="year_i, month_i, day_i",
+      bucketSorts="year_i desc, month_i desc, day_i desc",
+      bucketSizeLimit=100,
+      sum(a_i),
+      sum(a_f),
+      min(a_i),
+      min(a_f),
+      max(a_i),
+      max(a_f),
+      avg(a_i),
+      avg(a_f),
+      count(*))
+----
+
+The example above shows a facet function with rollups over three buckets, where the buckets are returned in descending order by bucket value.
+
+== features
+
+The `features` function extracts the key terms from a text field in a classification training set stored in a SolrCloud collection. It uses an algorithm known as * Information Gain* , to select the important terms from the training set. The `features` function was designed to work specifically with the <<train,train>> function, which uses the extracted features to train a text classifier.
+
+The `features` function is designed to work with a training set that provides both positive and negative examples of a class. It emits a tuple for each feature term that is extracted along with the inverse document frequency (IDF) for the term in the training set.
+
+The `features` function uses a query to select the training set from a collection. The IDF for each selected feature is calculated relative to the training set matching the query. This allows multiple training sets to be stored in the same SolrCloud collection without polluting the IDF across training sets.
+
+=== features Parameters
+
+* `collection`: (Mandatory) The collection that holds the training set
+* `q`: (Mandatory) The query that defines the training set. The IDF for the features will be generated specific to the result set matching the query.
+* `featureSet`: (Mandatory) The name of the feature set. This can be used to retrieve the features if they are stored in a SolrCloud collection.
+* `field`: (Mandatory) The text field to extract the features from.
+* `outcome`: (Mandatory) The field that defines the class, positive or negative
+* `numTerms`: (Mandatory) How many feature terms to extract.
+* `positiveLabel`: (defaults to 1) The value in the outcome field that defines a postive outcome.
+
+=== features Syntax
+
+[source,text]
+----
+features(collection1,
+         q="*:*",
+         featureSet="features1",
+         field="body",
+         outcome="out_i",
+         numTerms=250)
+----
+
+== gatherNodes
+
+The `gatherNodes` function provides breadth-first graph traversal. For details, see the section <<graph-traversal.adoc#graph-traversal,Graph Traversal>>.
+
+== model
+
+The `model` function retrieves and caches logistic regression text classification models that are stored in a SolrCloud collection. The `model` function is designed to work with models that are created by the <<train,train function>>, but can also be used to retrieve text classification models trained outside of Solr, as long as they conform to the specified format. After the model is retrieved it can be used by the <<stream-decorators.adoc#classify,classify function>> to classify documents.
+
+A single model tuple is fetched and returned based on the *id* parameter. The model is retrieved by matching the *id* parameter with a model name in the index. If more then one iteration of the named model is stored in the index, the highest iteration is selected.
+
+=== Caching with model
+
+The `model` function has an internal LRU (least-recently-used) cache so models do not have to be retrieved with each invocation of the `model` function. The time to cache for each model ID can be passed as a parameter to the function call. Retrieving a cached model does not reset the time for expiring the model ID in the cache.
+
+=== Model Storage
+
+The storage format of the models in Solr is below. The `train` function outputs the format below so you only need to know schema details if you plan to use the `model` function with logistic regression models trained outside of Solr.
+
+* `name_s` (Single value, String, Stored): The name of the model.
+* `iteration_i` (Single value, Integer, Stored): The iteration number of the model. Solr can store all iterations of the models generated by the train function.
+* `terms_ss` (Multi value, String, Stored: The array of terms/features of the model.
+* `weights_ds` (Multi value, double, Stored): The array of term weights. Each weight corresponds by array index to a term.
+* `idfs_ds` (Multi value, double, Stored): The array of term IDFs (Inverse document frequency). Each IDF corresponds by array index to a term.
+
+=== model Parameters
+
+* `collection`: (Mandatory) The collection where the model is stored.
+* `id`: (Mandatory) The id/name of the model. The model function always returns one model. If there are multiple iterations of the name, the highest iteration is returned.
+* `cacheMillis`: (Optional) The amount of time to cache the model in the LRU cache.
+
+=== model Syntax
+
+[source,text]
+----
+model(modelCollection,
+      id="myModel"
+      cacheMillis="200000")
+----
+
+== random
+
+The `random` function searches a SolrCloud collection and emits a pseudo-random set of results that match the query. Each invocation of random will return a different pseudo-random result set.
+
+=== random Parameters
+
+* `collection`: (Mandatory) The collection the stats will be aggregated from.
+* `q`: (Mandatory) The query to build the aggregations from.
+* `rows`: (Mandatory) The number of pseudo-random results to return.
+* fl: (Mandatory) The field list to return.
+* `fq`: (Optional) Filter query
+
+=== random Syntax
+
+[source,text]
+----
+random(baskets,
+       q="productID:productX",
+       rows="100",
+       fl="basketID")
+----
+
+In the example above the `random` function is searching the baskets collections for all rows where "productID:productX". It will return 100 pseudo-random results. The field list returned is the basketID.
+
+== significantTerms
+
+The `significantTerms` function queries a SolrCloud collection, but instead of returning documents, it returns significant terms found in documents in the result set. The `significantTerms` function scores terms based on how frequently they appear in the result set and how rarely they appear in the entire corpus. The `significantTerms` function emits a tuple for each term which contains the term, the score, the foreground count and the background count. The foreground count is how many documents the term appears in in the result set. The background count is how many documents the term appears in in the entire corpus. The foreground and background counts are global for the collection.
+
+=== significantTerms Parameters
+
+* `collection`: (Mandatory) The collection that the function is run on.
+* `q`: (Mandatory) The query that describes the foreground document set.
+* `limit`: (Optional, Default 20) The max number of terms to return.
+* `minDocFreq`: (Optional, Defaults to 5 documents) The minimum number of documents the term must appear in on a shard. This is a float value. If greater then 1.0 then it's considered the absolute number of documents. If less then 1.0 it's treated as a percentage of documents.
+* `maxDocFreq`: (Optional, Defaults to 30% of documents) The maximum number of documents the term can appear in on a shard. This is a float value. If greater then 1.0 then it's considered the absolute number of documents. If less then 1.0 it's treated as a percentage of documents.
+* `minTermLength`: (Optional, Default 4) The minimum length of the term to be considered significant.
+
+=== significantTerms Syntax
+
+[source,text]
+----
+significantTerms(collection1,
+                 q="body:Solr",
+                 minDocFreq="10",
+                 maxDocFreq=".20",
+                 minTermLength="5")
+----
+
+In the example above the `significantTerms` function is querying `collection1` and returning at most 50 significant terms that appear in 10 or more documents but not more then 20% of the corpus.
+
+== shortestPath
+
+The `shortestPath` function is an implementation of a shortest path graph traversal. The `shortestPath` function performs an iterative breadth-first search through an unweighted graph to find the shortest paths between two nodes in a graph. The `shortestPath` function emits a tuple for each path found. Each tuple emitted will contain a `path` key which points to a `List` of nodeIDs comprising the path.
+
+=== shortestPath Parameters
+
+* `collection`: (Mandatory) The collection that the topic query will be run on.
+* `from`: (Mandatory) The nodeID to start the search from
+* `to`: (Mandatory) The nodeID to end the search at
+* `edge`: (Mandatory) Syntax: `from_field=to_field`. The `from_field` defines which field to search from. The `to_field` defines which field to search to. See example below for a detailed explanation.
+* `threads`: (Optional : Default 6) The number of threads used to perform the partitioned join in the traversal.
+* `partitionSize`: (Optional : Default 250) The number of nodes in each partition of the join.
+* `fq`: (Optional) Filter query
+* `maxDepth`: (Mandatory) Limits to the search to a maximum depth in the graph.
+
+=== shortestPath Syntax
+
+[source,text]
+----
+shortestPath(collection,
+             from="john@company.com",
+             to="jane@company.com",
+             edge="from_address=to_address",
+             threads="6",
+             partitionSize="300",
+             fq="limiting query",
+             maxDepth="4")
+----
+
+The expression above performs a breadth-first search to find the shortest paths in an unweighted, directed graph.
+
+The search starts from the nodeID "\john@company.com" in the `from_address` field and searches for the nodeID "\jane@company.com" in the `to_address` field. This search is performed iteratively until the `maxDepth` has been reached. Each level in the traversal is implemented as a parallel partitioned nested loop join across the entire collection. The `threads` parameter controls the number of threads performing the join at each level, while the `partitionSize` parameter controls the of number of nodes in each join partition. The `maxDepth` parameter controls the number of levels to traverse. `fq` is a limiting query applied to each level in the traversal.
+
+== shuffle
+//TODO
+
+== stats
+
+The `stats` function gathers simple aggregations for a search result set. The stats function does not support rollups over buckets, so the stats stream always returns a single tuple with the rolled up stats. Under the covers the stats function pushes down the generation of the stats into the search engine using the StatsComponent. The stats function currently supports the following metrics: `count(*)`, `sum()`, `avg()`, `min()`, and `max()`.
+
+=== stats Parameters
+
+* `collection`: (Mandatory) Collection the stats will be aggregated from.
+* `q`: (Mandatory) The query to build the aggregations from.
+* `metrics`: (Mandatory) The metrics to include in the result tuple. Current supported metrics are `sum(col)`, `avg(col)`, `min(col)`, `max(col)` and `count(*)`
+
+=== stats Syntax
+
+[source,text]
+----
+stats(collection1,
+      q=*:*,
+      sum(a_i),
+      sum(a_f),
+      min(a_i),
+      min(a_f),
+      max(a_i),
+      max(a_f),
+      avg(a_i),
+      avg(a_f),
+      count(*))
+----
+
+== timeseries
+
+//TODO
+
+== train
+
+The `train` function trains a Logistic Regression text classifier on a training set stored in a SolrCloud collection. It uses a parallel iterative, batch Gradient Descent approach to train the model. The training algorithm is embedded inside Solr so with each iteration only the model is streamed across the network.
+
+The `train` function wraps a <<features,features>> function which provides the terms and inverse document frequency (IDF) used to train the model. The `train` function operates over the same training set as the `features` function, which includes both positive and negative examples of the class.
+
+With each iteration the `train` function emits a tuple with the model. The model contains the feature terms, weights, and the confusion matrix for the model. The optimized model can then be used to classify documents based on their feature terms.
+
+=== train Parameters
+
+* `collection`: (Mandatory) Collection that holds the training set
+* `q`: (Mandatory) The query that defines the training set. The IDF for the features will be generated on the
+* `name`: (Mandatory) The name of model. This can be used to retrieve the model if they stored in a Solr Cloud collection.
+* `field`: (Mandatory) The text field to extract the features from.
+* `outcome`: (Mandatory) The field that defines the class, positive or negative
+* `maxIterations`: (Mandatory) How many training iterations to perform.
+* `positiveLabel`: (defaults to 1) The value in the outcome field that defines a positive outcome.
+
+=== train Syntax
+
+[source,text]
+----
+train(collection1,
+      features(collection1, q="*:*", featureSet="first", field="body", outcome="out_i", numTerms=250),
+      q="*:*",
+      name="model1",
+      field="body",
+      outcome="out_i",
+      maxIterations=100)
+----
+
+== topic
+
+The `topic` function provides publish/subscribe messaging capabilities built on top of SolrCloud. The topic function allows users to subscribe to a query. The function then provides one-time delivery of new or updated documents that match the topic query. The initial call to the topic function establishes the checkpoints for the specific topic ID. Subsequent calls to the same topic ID will return documents added or updated after the initial checkpoint. Each run of the topic query updates the checkpoints for the topic ID. Setting the initialCheckpoint parameter to 0 will cause the topic to process all documents in the index that match the topic query.
+
+[WARNING]
+====
+The topic function should be considered in beta until https://issues.apache.org/jira/browse/SOLR-8709[SOLR-8709] is committed and released.
+====
+
+=== topic Parameters
+
+* `checkpointCollection`: (Mandatory) The collection where the topic checkpoints are stored.
+* `collection`: (Mandatory) The collection that the topic query will be run on.
+* `id`: (Mandatory) The unique ID for the topic. The checkpoints will be saved under this id.
+* `q`: (Mandatory) The topic query.
+* `fl`: (Mandatory) The field list returned by the topic function.
+* `initialCheckpoint`: (Optional) Sets the initial Solr `\_version_` number to start reading from the queue. If not set, it defaults to the highest version in the index. Setting to 0 will process all records that match query in the index.
+
+=== topic Syntax
+
+[source,text]
+----
+topic(checkpointCollection,
+      collection,
+      id="uniqueId",
+      q="topic query",
+      fl="id, name, country")
+----


[25/27] lucene-solr:jira/solr-10233: SOLR-10724: Add describe Stream Evaluator

Posted by tf...@apache.org.
SOLR-10724: Add describe Stream Evaluator


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

Branch: refs/heads/jira/solr-10233
Commit: 2d184581a7e7fcd1ed835dc776e04630a244dbb3
Parents: 59aa5d7
Author: Joel Bernstein <jb...@apache.org>
Authored: Mon May 22 18:41:08 2017 -0400
Committer: Joel Bernstein <jb...@apache.org>
Committed: Mon May 22 18:42:09 2017 -0400

----------------------------------------------------------------------
 .../org/apache/solr/handler/StreamHandler.java  |  1 +
 .../solrj/io/stream/DescribeEvaluator.java      | 92 ++++++++++++++++++++
 .../solrj/io/stream/StreamExpressionTest.java   | 55 ++++++++++++
 3 files changed, 148 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2d184581/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 a2a49a0..9fd7c8b 100644
--- a/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/StreamHandler.java
@@ -183,6 +183,7 @@ public class StreamHandler extends RequestHandlerBase implements SolrCoreAware,
       .withFunctionName("copyOfRange", CopyOfRangeEvaluator.class)
       .withFunctionName("percentile", PercentileEvaluator.class)
       .withFunctionName("empiricalDistribution", EmpiricalDistributionEvaluator.class)
+      .withFunctionName("describe", DescribeEvaluator.class)
 
       // metrics
          .withFunctionName("min", MinMetric.class)

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2d184581/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/DescribeEvaluator.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/DescribeEvaluator.java b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/DescribeEvaluator.java
new file mode 100644
index 0000000..e086ebf
--- /dev/null
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/DescribeEvaluator.java
@@ -0,0 +1,92 @@
+/*
+ * 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.stream;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.math3.stat.descriptive.DescriptiveStatistics;
+import org.apache.solr.client.solrj.io.Tuple;
+import org.apache.solr.client.solrj.io.eval.ComplexEvaluator;
+import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
+import org.apache.solr.client.solrj.io.stream.expr.Explanation;
+import org.apache.solr.client.solrj.io.stream.expr.Explanation.ExpressionType;
+import org.apache.solr.client.solrj.io.stream.expr.Expressible;
+import org.apache.solr.client.solrj.io.stream.expr.StreamExpression;
+import org.apache.solr.client.solrj.io.stream.expr.StreamExpressionParameter;
+import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
+
+public class DescribeEvaluator extends ComplexEvaluator implements Expressible {
+
+  private static final long serialVersionUID = 1;
+
+  public DescribeEvaluator(StreamExpression expression, StreamFactory factory) throws IOException {
+    super(expression, factory);
+  }
+
+  public Tuple evaluate(Tuple tuple) throws IOException {
+
+    if(subEvaluators.size() != 1) {
+      throw new IOException("describe expects 1 column as a parameters");
+    }
+
+    StreamEvaluator colEval = subEvaluators.get(0);
+
+    List<Number> numbers = (List<Number>)colEval.evaluate(tuple);
+    DescriptiveStatistics descriptiveStatistics = new DescriptiveStatistics();
+
+    for(Number n : numbers) {
+      descriptiveStatistics.addValue(n.doubleValue());
+    }
+
+
+    Map map = new HashMap();
+
+    map.put("max", descriptiveStatistics.getMax());
+    map.put("mean", descriptiveStatistics.getMean());
+    map.put("min", descriptiveStatistics.getMin());
+    map.put("stdev", descriptiveStatistics.getStandardDeviation());
+    map.put("sum", descriptiveStatistics.getSum());
+    map.put("N", descriptiveStatistics.getN());
+    map.put("var", descriptiveStatistics.getVariance());
+    map.put("kurtosis", descriptiveStatistics.getKurtosis());
+    map.put("skewness", descriptiveStatistics.getSkewness());
+    map.put("popVar", descriptiveStatistics.getPopulationVariance());
+    map.put("geometricMean", descriptiveStatistics.getGeometricMean());
+    map.put("sumsq", descriptiveStatistics.getSumsq());
+
+    return new Tuple(map);
+  }
+
+
+  @Override
+  public StreamExpressionParameter toExpression(StreamFactory factory) throws IOException {
+    StreamExpression expression = new StreamExpression(factory.getFunctionName(getClass()));
+    return expression;
+  }
+
+  @Override
+  public Explanation toExplanation(StreamFactory factory) throws IOException {
+    return new Explanation(nodeId.toString())
+        .withExpressionType(ExpressionType.EVALUATOR)
+        .withFunctionName(factory.getFunctionName(getClass()))
+        .withImplementingClass(getClass().getName())
+        .withExpression(toExpression(factory).toString());
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/2d184581/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 1632818..a881e53 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
@@ -5819,6 +5819,61 @@ public class StreamExpressionTest extends SolrCloudTestCase {
     assertTrue(prediction == 600.0D);
   }
 
+  @Test
+  public void testDescribe() throws Exception {
+    UpdateRequest updateRequest = new UpdateRequest();
+
+
+    updateRequest.add(id, "1", "price_f", "100.0", "col_s", "a", "order_i", "1");
+    updateRequest.add(id, "2", "price_f", "200.0", "col_s", "a", "order_i", "2");
+    updateRequest.add(id, "3", "price_f", "300.0", "col_s", "a", "order_i", "3");
+    updateRequest.add(id, "4", "price_f", "100.0", "col_s", "a", "order_i", "4");
+    updateRequest.add(id, "5", "price_f", "200.0", "col_s", "a", "order_i", "5");
+    updateRequest.add(id, "6", "price_f", "400.0", "col_s", "a", "order_i", "6");
+    updateRequest.add(id, "7", "price_f", "600.0", "col_s", "a", "order_i", "7");
+
+
+    updateRequest.commit(cluster.getSolrClient(), COLLECTIONORALIAS);
+
+    String expr1 = "search("+COLLECTIONORALIAS+", q=\"col_s:a\", fl=\"price_f, order_i\", sort=\"order_i asc\")";
+
+    String cexpr = "let(a="+expr1+", b=col(a, price_f),  tuple(stats=describe(b)))";
+
+    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);
+    Tuple tuple = tuples.get(0);
+    Map stats = (Map)tuple.get("stats");
+    Number min = (Number)stats.get("min");
+    Number max = (Number)stats.get("max");
+    Number mean = (Number)stats.get("mean");
+    Number stdev = (Number)stats.get("stdev");
+    Number popVar = (Number)stats.get("popVar");
+    Number skewness = (Number)stats.get("skewness");
+    Number kurtosis = (Number)stats.get("kurtosis");
+    Number var = (Number)stats.get("var");
+    Number geometricMean = (Number)stats.get("geometricMean");
+    Number N = (Number)stats.get("N");
+    assertEquals(min.doubleValue(), 100.0D, 0.0);
+    assertEquals(max.doubleValue(), 600.0D, 0.0);
+    assertEquals(N.doubleValue(), 7.0D, 0.0);
+    assertEquals(mean.doubleValue(), 271.42D, 0.5);
+    assertEquals(popVar.doubleValue(), 27755.10, 0.5);
+    assertEquals(kurtosis.doubleValue(), .70D, 0.5);
+    assertEquals(skewness.doubleValue(), 1.07D, 0.5);
+    assertEquals(var.doubleValue(), 32380.95D, 0.5);
+    assertEquals(geometricMean .doubleValue(), 224.56D, 0.5);
+    assertEquals(stdev .doubleValue(), 179.94D, 0.5);
+  }
+
 
   @Test
   public void testLength() throws Exception {


[03/27] lucene-solr:jira/solr-10233: SOLR-10413: Fix precommit

Posted by tf...@apache.org.
SOLR-10413: Fix precommit


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

Branch: refs/heads/jira/solr-10233
Commit: eb475db9c4811d6364000e6ebe372773b3585df0
Parents: 9e3c710
Author: Cao Manh Dat <da...@apache.org>
Authored: Fri May 19 09:43:37 2017 +0700
Committer: Cao Manh Dat <da...@apache.org>
Committed: Fri May 19 09:43:37 2017 +0700

----------------------------------------------------------------------
 .../test/org/apache/solr/handler/admin/TestCollectionAPIs.java    | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/eb475db9/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java b/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
index 7b79443..9f5a246 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
@@ -27,7 +27,6 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.solr.SolrTestCaseJ4;
-import org.apache.solr.api.ApiException;
 import org.apache.solr.client.solrj.SolrRequest;
 import org.apache.solr.common.cloud.ZkNodeProps;
 import org.apache.solr.common.params.CollectionParams;
@@ -186,7 +185,7 @@ public class TestCollectionAPIs extends SolrTestCaseJ4 {
     };
     try {
       api.call(req, rsp);
-    } catch (ApiException e) {
+    } catch (ApiBag.ExceptionWithErrObject e) {
       throw new RuntimeException(e.getMessage() + Utils.toJSONString(e.getErrs()), e);
 
     }