Apache Lucene open-source search software
SOLR-11050: remove Confluence-style anchors and fix all incoming links
Cassandra Targett8b65515f073e
diff --git a/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adoc b/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adocindex 7f1586fc7d6..fce8acb0e8c 100644--- a/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adoc+++ b/solr/solr-ref-guide/src/authentication-and-authorization-plugins.adoc@@ -27,7 +27,6 @@ All authentication and authorization plugins can work with Solr whether they areThe following section describes how to enable plugins with `security.json` and place them in the proper locations for your mode of operation.-[[AuthenticationandAuthorizationPlugins-EnablePluginswithsecurity.json]]== Enable Plugins with security.jsonAll of the information required to initialize either type of security plugin is stored in a `security.json` file. This file contains 2 sections, one each for authentication and authorization.@@ -45,7 +44,7 @@ All of the information required to initialize either type of security plugin is}-----The `/security.json` file needs to be in the proper location before a Solr instance comes up so Solr starts with the security plugin enabled. See the section <<AuthenticationandAuthorizationPlugins-Usingsecurity.jsonwithSolr,Using security.json with Solr>> below for information on how to do this.+The `/security.json` file needs to be in the proper location before a Solr instance comes up so Solr starts with the security plugin enabled. See the section <<Using security.json with Solr>> below for information on how to do this.Depending on the plugin(s) in use, other information will be stored in `security.json` such as user information or rules to create roles and permissions. This information is added through the APIs for each plugin provided by Solr, or, in the case of a custom plugin, the approach designed by you.@@ -66,10 +65,8 @@ Here is a more detailed `security.json` example. In this, the Basic authenticati}}-----[[AuthenticationandAuthorizationPlugins-Usingsecurity.jsonwithSolr]]== Using security.json with Solr-[[AuthenticationandAuthorizationPlugins-InSolrCloudmode]]=== In SolrCloud ModeWhile configuring Solr to use an authentication or authorization plugin, you will need to upload a `security.json` file to ZooKeeper. The following command writes the file as it uploads it - you could also upload a file that you have already created locally.@@ -91,7 +88,6 @@ Depending on the authentication and authorization plugin that you use, you may hOnce `security.json` has been uploaded to ZooKeeper, you should use the appropriate APIs for the plugins you're using to update it. You can edit it manually, but you must take care to remove any version data so it will be properly updated across all ZooKeeper nodes. The version data is found at the end of the `security.json` file, and will appear as the letter "v" followed by a number, such as `{"v":138}`.-[[AuthenticationandAuthorizationPlugins-InStandaloneMode]]=== In Standalone ModeWhen running Solr in standalone mode, you need to create the `security.json` file and put it in the `$SOLR_HOME` directory for your installation (this is the same place you have located `solr.xml` and is usually `server/solr`).@@ -100,8 +96,7 @@ If you are using <<legacy-scaling-and-distribution.adoc#legacy-scaling-and-distrYou can use the authentication and authorization APIs, but if you are using the legacy scaling model, you will need to make the same API requests on each node separately. You can also edit `security.json` by hand if you prefer.-[[AuthenticationandAuthorizationPlugins-Authentication]]-== Authentication+== Authentication PluginsAuthentication plugins help in securing the endpoints of Solr by authenticating incoming requests. A custom plugin can be implemented by extending the AuthenticationPlugin class.@@ -110,7 +105,6 @@ An authentication plugin consists of two parts:. Server-side component, which intercepts and authenticates incoming requests to Solr using a mechanism defined in the plugin, such as Kerberos, Basic Auth or others.. Client-side component, i.e., an extension of `HttpClientConfigurer`, which enables a SolrJ client to make requests to a secure Solr instance using the authentication mechanism which the server understands.-[[AuthenticationandAuthorizationPlugins-EnablingaPlugin]]=== Enabling a Plugin* Specify the authentication plugin in `/security.json` as in this example:@@ -126,7 +120,6 @@ An authentication plugin consists of two parts:* All of the content in the authentication block of `security.json` would be passed on as a map to the plugin during initialization.* An authentication plugin can also be used with a standalone Solr instance by passing in `-DauthenticationPlugin=<plugin class name>` during startup.-[[AuthenticationandAuthorizationPlugins-AvailableAuthenticationPlugins]]=== Available Authentication PluginsSolr has the following implementations of authentication plugins:@@ -135,12 +128,10 @@ Solr has the following implementations of authentication plugins:* <<basic-authentication-plugin.adoc#basic-authentication-plugin,Basic Authentication Plugin>>* <<hadoop-authentication-plugin.adoc#hadoop-authentication-plugin,Hadoop Authentication Plugin>>-[[AuthenticationandAuthorizationPlugins-Authorization]]== AuthorizationAn authorization plugin can be written for Solr by extending the {solr-javadocs}/solr-core/org/apache/solr/security/AuthorizationPlugin.html[AuthorizationPlugin] interface.-[[AuthenticationandAuthorizationPlugins-LoadingaCustomPlugin]]=== Loading a Custom Plugin* Make sure that the plugin implementation is in the classpath.@@ -162,21 +153,16 @@ All of the content in the `authorization` block of `security.json` would be passThe authorization plugin is only supported in SolrCloud mode. Also, reloading the plugin isn't yet supported and requires a restart of the Solr installation (meaning, the JVM should be restarted, not simply a core reload).====-[[AuthenticationandAuthorizationPlugins-AvailableAuthorizationPlugins]]=== Available Authorization PluginsSolr has one implementation of an authorization plugin:* <<rule-based-authorization-plugin.adoc#rule-based-authorization-plugin,Rule-Based Authorization Plugin>>-[[AuthenticationandAuthorizationPlugins-PKISecuringInter-NodeRequests]]--[[AuthenticationandAuthorizationPlugins-PKI]]== Securing Inter-Node RequestsThere are a lot of requests that originate from the Solr nodes itself. For example, requests from overseer to nodes, recovery threads, etc. Each Authentication plugin declares whether it is capable of securing inter-node requests or not. If not, Solr will fall back to using a special internode authentication mechanism where each Solr node is a super user and is fully trusted by other Solr nodes, described below.-[[AuthenticationandAuthorizationPlugins-PKIAuthenticationPlugin]]=== PKIAuthenticationPluginThe PKIAuthenticationPlugin is used when there is any request going on between two Solr nodes, and the configured Authentication plugin does not wish to handle inter-node security.diff --git a/solr/solr-ref-guide/src/basic-authentication-plugin.adoc b/solr/solr-ref-guide/src/basic-authentication-plugin.adocindex 2a48d7cd32b..2d196cff7ee 100644--- a/solr/solr-ref-guide/src/basic-authentication-plugin.adoc+++ b/solr/solr-ref-guide/src/basic-authentication-plugin.adoc@@ -24,7 +24,7 @@ An authorization plugin is also available to configure Solr with permissions to== Enable Basic Authentication-To use Basic authentication, you must first create a `security.json` file. This file and where to put it is described in detail in the section <<authentication-and-authorization-plugins.adoc#AuthenticationandAuthorizationPlugins-EnablePluginswithsecurity.json,Enable Plugins with security.json>>.+To use Basic authentication, you must first create a `security.json` file. This file and where to put it is described in detail in the section <<authentication-and-authorization-plugins.adoc#enable-plugins-with-security-json,Enable Plugins with security.json>>.For Basic authentication, the `security.json` file must have an `authentication` part which defines the class being used for authentication. Usernames and passwords (as a sha256(password+salt) hash) could be added when the file is created, or can be added later with the Basic authentication API, described below.diff --git a/solr/solr-ref-guide/src/blockjoin-faceting.adoc b/solr/solr-ref-guide/src/blockjoin-faceting.adocindex 1a89a570071..7f057f007c1 100644--- a/solr/solr-ref-guide/src/blockjoin-faceting.adoc+++ b/solr/solr-ref-guide/src/blockjoin-faceting.adoc@@ -42,7 +42,7 @@ This example shows how you could add this search components to `solrconfig.xml`This component can be added into any search request handler. This component work with distributed search in SolrCloud mode.-Documents should be added in children-parent blocks as described in <<uploading-data-with-index-handlers.adoc#UploadingDatawithIndexHandlers-NestedChildDocuments,indexing nested child documents>>. Examples:+Documents should be added in children-parent blocks as described in <<uploading-data-with-index-handlers.adoc#nested-child-documents,indexing nested child documents>>. Examples:.Sample document[source,xml]@@ -95,7 +95,7 @@ Documents should be added in children-parent blocks as described in <<uploading-</add>-----Queries are constructed the same way as for a <<other-parsers.adoc#OtherParsers-BlockJoinQueryParsers,Parent Block Join query>>. For example:+Queries are constructed the same way as for a <<other-parsers.adoc#block-join-query-parsers,Parent Block Join query>>. For example:[source,text]----diff --git a/solr/solr-ref-guide/src/collapse-and-expand-results.adoc b/solr/solr-ref-guide/src/collapse-and-expand-results.adocindex 3d610a9e0d1..0c0bbd10033 100644--- a/solr/solr-ref-guide/src/collapse-and-expand-results.adoc+++ b/solr/solr-ref-guide/src/collapse-and-expand-results.adoc@@ -24,7 +24,7 @@ The Collapsing query parser groups documents (collapsing the result set) accordi[IMPORTANT]====-In order to use these features with SolrCloud, the documents must be located on the same shard. To ensure document co-location, you can define the `router.name` parameter as `compositeId` when creating the collection. For more information on this option, see the section <<shards-and-indexing-data-in-solrcloud.adoc#ShardsandIndexingDatainSolrCloud-DocumentRouting,Document Routing>>.+In order to use these features with SolrCloud, the documents must be located on the same shard. To ensure document co-location, you can define the `router.name` parameter as `compositeId` when creating the collection. For more information on this option, see the section <<shards-and-indexing-data-in-solrcloud.adoc#document-routing,Document Routing>>.====== Collapsing Query Parserdiff --git a/solr/solr-ref-guide/src/collections-api.adoc b/solr/solr-ref-guide/src/collections-api.adocindex 3a43d396fe0..662c5fb4cf6 100644--- a/solr/solr-ref-guide/src/collections-api.adoc+++ b/solr/solr-ref-guide/src/collections-api.adoc@@ -24,7 +24,7 @@ The Collections API is used to create, remove, or reload collections.In the context of SolrCloud you can use it to create collections with a specific number of shards and replicas, move replicas or shards, and create or delete collection aliases.-[[CollectionsAPI-create]]+[[create]]== CREATE: Create a Collection`/admin/collections?action=CREATE&name=_name_`@@ -45,7 +45,7 @@ The `compositeId` router hashes the value in the uniqueKey field and looks up th+When using the `implicit` router, the `shards` parameter is required. When using the `compositeId` router, the `numShards` parameter is required.+-For more information, see also the section <<shards-and-indexing-data-in-solrcloud.adoc#ShardsandIndexingDatainSolrCloud-DocumentRouting,Document Routing>>.+For more information, see also the section <<shards-and-indexing-data-in-solrcloud.adoc#document-routing,Document Routing>>.`numShards`::The number of shards to be created as part of the collection. This is a required parameter when the `router.name` is `compositeId`.@@ -68,7 +68,7 @@ Allows defining the nodes to spread the new collection across. The format is a c+If not provided, the CREATE operation will create shard-replicas spread across all live Solr nodes.+-Alternatively, use the special value of `EMPTY` to initially create no shard-replica within the new collection and then later use the <<CollectionsAPI-addreplica,ADDREPLICA>> operation to add shard-replicas when and where required.+Alternatively, use the special value of `EMPTY` to initially create no shard-replica within the new collection and then later use the <<addreplica,ADDREPLICA>> operation to add shard-replicas when and where required.`createNodeSet.shuffle`::Controls wether or not the shard-replicas created for this collection will be assigned to the nodes specified by the `createNodeSet` in a sequential manner, or if the list of nodes should be shuffled prior to creating individual replicas.@@ -89,10 +89,10 @@ Please note that <<realtime-get.adoc#realtime-get,RealTime Get>> or retrieval bySet core property _name_ to _value_. See the section <<defining-core-properties.adoc#defining-core-properties,Defining core.properties>> for details on supported properties and values.`autoAddReplicas`::-When set to `true`, enables automatic addition of replicas on shared file systems (such as HDFS) only. See the section <<running-solr-on-hdfs.adoc#RunningSolronHDFS-AutomaticallyAddReplicasinSolrCloud,autoAddReplicas Settings>> for more details on settings and overrides. The default is `false`.+When set to `true`, enables automatic addition of replicas on shared file systems (such as HDFS) only. See the section <<running-solr-on-hdfs.adoc#automatically-add-replicas-in-solrcloud,autoAddReplicas Settings>> for more details on settings and overrides. The default is `false`.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.`rule`::Replica placement rules. See the section <<rule-based-replica-placement.adoc#rule-based-replica-placement,Rule-based Replica Placement>> for details.@@ -141,7 +141,7 @@ http://localhost:8983/solr/admin/collections?action=CREATE&name=newCollection&nu</response>-----[[CollectionsAPI-modifycollection]]+[[modifycollection]]== MODIFYCOLLECTION: Modify Attributes of a Collection`/admin/collections?action=MODIFYCOLLECTION&collection=_<collection-name>&<attribute-name>=<attribute-value>&<another-attribute-name>=<another-value>_`@@ -165,10 +165,9 @@ The attributes that can be modified are:* rule* snitch+-See the <<CollectionsAPI-create,CREATE action>> section above for details on these attributes.+See the <<create,CREATE action>> section above for details on these attributes.--[[CollectionsAPI-reload]]+[[reload]]== RELOAD: Reload a Collection`/admin/collections?action=RELOAD&name=_name_`@@ -177,11 +176,11 @@ The RELOAD action is used when you have changed a configuration in ZooKeeper.=== RELOAD Parameters-|`name`::+`name`::The name of the collection to reload. This parameter is required.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.=== RELOAD Response@@ -222,7 +221,7 @@ http://localhost:8983/solr/admin/collections?action=RELOAD&name=newCollection</response>-----[[CollectionsAPI-splitshard]]+[[splitshard]]== SPLITSHARD: Split a Shard`/admin/collections?action=SPLITSHARD&collection=_name_&shard=_shardID_`@@ -233,7 +232,7 @@ This command allows for seamless splitting and requires no downtime. A shard beiThe split is performed by dividing the original shard's hash range into two equal partitions and dividing up the documents in the original shard according to the new sub-ranges. Two parameters discussed below, `ranges` and `split.key` provide further control over how the split occurs.-Shard splitting can be a long running process. In order to avoid timeouts, you should run this as an <<CollectionsAPI-async,asynchronous call>>.+Shard splitting can be a long running process. In order to avoid timeouts, you should run this as an <<Asynchronous Calls,asynchronous call>>.=== SPLITSHARD Parameters@@ -259,7 +258,7 @@ For example, suppose `split.key=A!` hashes to the range `12-15` and belongs to sSet core property _name_ to _value_. See the section <<defining-core-properties.adoc#defining-core-properties,Defining core.properties>> for details on supported properties and values.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>=== SPLITSHARD Response@@ -338,7 +337,7 @@ http://localhost:8983/solr/admin/collections?action=SPLITSHARD&collection=anothe</response>-----[[CollectionsAPI-createshard]]+[[createshard]]== CREATESHARD: Create a ShardShards can only created with this API for collections that use the 'implicit' router (i.e., when the collection was created, `router.name=implicit`). A new shard with a name can be created for an existing 'implicit' collection.@@ -364,7 +363,7 @@ The format is a comma-separated list of node_names, such as `localhost:8983_solrSet core property _name_ to _value_. See the section <<defining-core-properties.adoc#defining-core-properties,Defining core.properties>> for details on supported properties and values.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.=== CREATESHARD Response@@ -393,7 +392,7 @@ http://localhost:8983/solr/admin/collections?action=CREATESHARD&collection=anImp</response>-----[[CollectionsAPI-deleteshard]]+[[deleteshard]]== DELETESHARD: Delete a ShardDeleting a shard will unload all replicas of the shard, remove them from `clusterstate.json`, and (by default) delete the instanceDir and dataDir for each replica. It will only remove shards that are inactive, or which have no range given for custom sharding.@@ -418,7 +417,7 @@ By default Solr will delete the dataDir of each replica that is deleted. Set thiBy default Solr will delete the index of each replica that is deleted. Set this to `false` to prevent the index directory from being deleted.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.=== DELETESHARD Response@@ -455,7 +454,7 @@ http://localhost:8983/solr/admin/collections?action=DELETESHARD&collection=anoth</response>-----[[CollectionsAPI-createalias]]+[[createalias]]== CREATEALIAS: Create or Modify an Alias for a CollectionThe `CREATEALIAS` action will create a new alias pointing to one or more collections. If an alias by the same name already exists, this action will replace the existing alias, effectively acting like an atomic "MOVE" command.@@ -471,14 +470,12 @@ The alias name to be created. This parameter is required.A comma-separated list of collections to be aliased. The collections must already exist in the cluster. This parameter is required.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.-[[CollectionsAPI-Output.5]]=== CREATEALIAS ResponseThe output will simply be a responseHeader with details of the time it took to process the request. To confirm the creation of the alias, you can look in the Solr Admin UI, under the Cloud section and find the `aliases.json` file.-[[CollectionsAPI-Examples.5]]=== Examples using CREATEALIAS*Input*@@ -502,7 +499,7 @@ http://localhost:8983/solr/admin/collections?action=CREATEALIAS&name=testalias&c</response>-----[[CollectionsAPI-listaliases]]+[[listaliases]]== LISTALIASES: List of all aliases in the cluster`/admin/collections?action=LISTALIASES`@@ -531,7 +528,7 @@ The output will contain a list of aliases with the corresponding collection name</response>-----[[CollectionsAPI-deletealias]]+[[deletealias]]== DELETEALIAS: Delete a Collection Alias`/admin/collections?action=DELETEALIAS&name=_name_`@@ -542,7 +539,7 @@ The output will contain a list of aliases with the corresponding collection nameThe name of the alias to delete. This parameter is required.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.=== DELETEALIAS Response@@ -571,7 +568,7 @@ http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=testalias</response>-----[[CollectionsAPI-delete]]+[[delete]]== DELETE: Delete a Collection`/admin/collections?action=DELETE&name=_collection_`@@ -582,7 +579,7 @@ http://localhost:8983/solr/admin/collections?action=DELETEALIAS&name=testaliasThe name of the collection to delete. This parameter is required.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.=== DELETE Response@@ -625,7 +622,7 @@ http://localhost:8983/solr/admin/collections?action=DELETE&name=newCollection</response>-----[[CollectionsAPI-deletereplica]]+[[deletereplica]]== DELETEREPLICA: Delete a ReplicaDeletes a named replica from the specified collection and shard.@@ -665,7 +662,7 @@ By default Solr will delete the index of the replica that is deleted. Set this tWhen set to `true`, no action will be taken if the replica is active. Default `false`.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.=== Examples using DELETEREPLICA@@ -688,7 +685,7 @@ http://localhost:8983/solr/admin/collections?action=DELETEREPLICA&collection=tes</response>-----[[CollectionsAPI-addreplica]]+[[addreplica]]== ADDREPLICA: Add ReplicaAdd a replica to a shard in a collection. The node name can be specified if the replica is to be created in a specific node.@@ -722,7 +719,8 @@ The directory in which the core should be created`property._name_=_value_`::Set core property _name_ to _value_. See <<defining-core-properties.adoc#defining-core-properties,Defining core.properties>> for details about supported properties and values.-`async`:: string |No |Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>+`async`::+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>=== Examples using ADDREPLICA@@ -754,7 +752,7 @@ http://localhost:8983/solr/admin/collections?action=ADDREPLICA&collection=test2&</response>-----[[CollectionsAPI-clusterprop]]+[[clusterprop]]== CLUSTERPROP: Cluster PropertiesAdd, edit or delete a cluster-wide property.@@ -794,7 +792,7 @@ http://localhost:8983/solr/admin/collections?action=CLUSTERPROP&name=urlScheme&v</response>-----[[CollectionsAPI-migrate]]+[[migrate]]== MIGRATE: Migrate Documents to Another Collection`/admin/collections?action=MIGRATE&collection=_name_&split.key=_key1!_&target.collection=_target_collection_&forward.timeout=60`@@ -827,7 +825,7 @@ The timeout, in seconds, until which write requests made to the source collectioSet core property _name_ to _value_. See the section <<defining-core-properties.adoc#defining-core-properties,Defining core.properties>> for details on supported properties and values.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.=== MIGRATE Response@@ -988,7 +986,7 @@ http://localhost:8983/solr/admin/collections?action=MIGRATE&collection=test1&spl</response>-----[[CollectionsAPI-addrole]]+[[addrole]]== ADDROLE: Add a Role`/admin/collections?action=ADDROLE&role=_roleName_&node=_nodeName_`@@ -1003,7 +1001,7 @@ Use this command to dedicate a particular node as Overseer. Invoke it multiple tThe name of the role. The only supported role as of now is `overseer`. This parameter is required.`node`::-|The name of the node that will be assigned the role. It is possible to assign a role even before that node is started. This parameter is started.+The name of the node that will be assigned the role. It is possible to assign a role even before that node is started. This parameter is started.=== ADDROLE Response@@ -1030,7 +1028,7 @@ http://localhost:8983/solr/admin/collections?action=ADDROLE&role=overseer&node=1</response>-----[[CollectionsAPI-removerole]]+[[removerole]]== REMOVEROLE: Remove RoleRemove an assigned role. This API is used to undo the roles assigned using ADDROLE operation@@ -1046,7 +1044,6 @@ The name of the role. The only supported role as of now is `overseer`. This paraThe name of the node where the role should be removed.-[[CollectionsAPI-Output.11]]=== REMOVEROLE ResponseThe response will include the status of the request and the properties that were updated or removed. If the status is anything other than "0", an error message will explain why the request failed.@@ -1072,7 +1069,7 @@ http://localhost:8983/solr/admin/collections?action=REMOVEROLE&role=overseer&nod</response>-----[[CollectionsAPI-overseerstatus]]+[[overseerstatus]]== OVERSEERSTATUS: Overseer Status and StatisticsReturns the current status of the overseer, performance statistics of various overseer APIs, and the last 10 failures per operation type.@@ -1146,7 +1143,7 @@ http://localhost:8983/solr/admin/collections?action=OVERSEERSTATUS&wt=json}-----[[CollectionsAPI-clusterstatus]]+[[clusterstatus]]== CLUSTERSTATUS: Cluster StatusFetch the cluster status including collections, shards, replicas, configuration name as well as collection aliases and cluster properties.@@ -1168,7 +1165,6 @@ This can be used if you need the details of the shard where a particular documenThe response will include the status of the request and the status of the cluster.-[[CollectionsAPI-Examples.15]]=== Examples using CLUSTERSTATUS*Input*@@ -1247,10 +1243,10 @@ http://localhost:8983/solr/admin/collections?action=clusterstatus&wt=json}-----[[CollectionsAPI-requeststatus]]+[[requeststatus]]== REQUESTSTATUS: Request Status of an Async Call-Request the status and response of an already submitted <<CollectionsAPI-async,Asynchronous Collection API>> (below) call. This call is also used to clear up the stored statuses.+Request the status and response of an already submitted <<Asynchronous Calls,Asynchronous Collection API>> (below) call. This call is also used to clear up the stored statuses.`/admin/collections?action=REQUESTSTATUS&requestid=_request-id_`@@ -1307,10 +1303,10 @@ http://localhost:8983/solr/admin/collections?action=REQUESTSTATUS&requestid=1004</response>-----[[CollectionsAPI-deletestatus]]+[[deletestatus]]== DELETESTATUS: Delete Status-Deletes the stored response of an already failed or completed <<CollectionsAPI-async,Asynchronous Collection API>> call.+Deletes the stored response of an already failed or completed <<Asynchronous Calls,Asynchronous Collection API>> call.`/admin/collections?action=DELETESTATUS&requestid=_request-id_`@@ -1384,7 +1380,7 @@ http://localhost:8983/solr/admin/collections?action=DELETESTATUS&flush=true</response>-----[[CollectionsAPI-list]]+[[list]]== LIST: List CollectionsFetch the names of the collections in the cluster.@@ -1413,7 +1409,7 @@ http://localhost:8983/solr/admin/collections?action=LIST&wt=json"example2"]}-----[[CollectionsAPI-addreplicaprop]]+[[addreplicaprop]]== ADDREPLICAPROP: Add Replica PropertyAssign an arbitrary property to a particular replica and give it the value specified. If the property already exists, it will be overwritten with the new value.@@ -1501,7 +1497,7 @@ http://localhost:8983/solr/admin/collections?action=ADDREPLICAPROP&shard=shard1&http://localhost:8983/solr/admin/collections?action=ADDREPLICAPROP&shard=shard1&collection=collection1&replica=core_node3&property=testprop&property.value=value2&shardUnique=true-----[[CollectionsAPI-deletereplicaprop]]+[[deletereplicaprop]]== DELETEREPLICAPROP: Delete Replica PropertyDeletes an arbitrary property from a particular replica.@@ -1555,7 +1551,7 @@ http://localhost:8983/solr/admin/collections?action=DELETEREPLICAPROP&shard=shar</response>-----[[CollectionsAPI-balanceshardunique]]+[[balanceshardunique]]== BALANCESHARDUNIQUE: Balance a Property Across Nodes`/admin/collections?action=BALANCESHARDUNIQUE&collection=_collectionName_&property=_propertyName_`@@ -1607,7 +1603,7 @@ http://localhost:8983/solr/admin/collections?action=BALANCESHARDUNIQUE&collectioExamining the clusterstate after issuing this call should show exactly one replica in each shard that has this property.-[[CollectionsAPI-rebalanceleaders]]+[[rebalanceleaders]]== REBALANCELEADERS: Rebalance LeadersReassigns leaders in a collection according to the preferredLeader property across active nodes.@@ -1709,10 +1705,7 @@ The replica in the "inactivePreferreds" section had the `preferredLeader` properExamining the clusterstate after issuing this call should show that every live node that has the `preferredLeader` property should also have the "leader" property set to _true_.--[[CollectionsAPI-FORCELEADER_ForceShardLeader]]--[[CollectionsAPI-forceleader]]+[[forceleader]]== FORCELEADER: Force Shard LeaderIn the unlikely event of a shard losing its leader, this command can be invoked to force the election of a new leader.@@ -1729,7 +1722,7 @@ The name of the shard where leader election should occur. This parameter is requWARNING: This is an expert level command, and should be invoked only when regular leader election is not working. This may potentially lead to loss of data in the event that the new leader doesn't have certain updates, possibly recent ones, which were acknowledged by the old leader before going down.-[[CollectionsAPI-migratestateformat]]+[[migratestateformat]]== MIGRATESTATEFORMAT: Migrate Cluster StateA expert level utility API to move a collection from shared `clusterstate.json` zookeeper node (created with `stateFormat=1`, the default in all Solr releases prior to 5.0) to the per-collection `state.json` stored in ZooKeeper (created with `stateFormat=2`, the current default) seamlessly without any application down-time.@@ -1742,11 +1735,11 @@ A expert level utility API to move a collection from shared `clusterstate.json`The name of the collection to be migrated from `clusterstate.json` to its own `state.json` ZooKeeper node. This parameter is required.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.This API is useful in migrating any collections created prior to Solr 5.0 to the more scalable cluster state format now used by default. If a collection was created in any Solr 5.x version or higher, then executing this command is not necessary.-[[CollectionsAPI-backup]]+[[backup]]== BACKUP: Backup CollectionBacks up Solr collections and associated configurations to a shared filesystem - for example a Network File System.@@ -1761,15 +1754,15 @@ The BACKUP command will backup Solr indexes and configurations for a specified cThe name of the collection to be backed up. This parameter is required.`location`::-The location on a shared drive for the backup command to write to. Alternately it can be set as a <<CollectionsAPI-clusterprop,cluster property>>.+The location on a shared drive for the backup command to write to. Alternately it can be set as a <<clusterprop,cluster property>>.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.`repository`::The name of a repository to be used for the backup. If no repository is specified then the local filesystem repository will be used automatically.-[[CollectionsAPI-restore]]+[[restore]]== RESTORE: Restore CollectionRestores Solr indexes and associated configurations.@@ -1782,7 +1775,7 @@ The collection created will be have the same number of shards and replicas as thWhile restoring, if a configSet with the same name exists in ZooKeeper then Solr will reuse that, or else it will upload the backed up configSet in ZooKeeper and use that.-You can use the collection <<CollectionsAPI-createalias,CREATEALIAS>> command to make sure clients don't need to change the endpoint to query or index against the newly restored collection.+You can use the collection <<createalias,CREATEALIAS>> command to make sure clients don't need to change the endpoint to query or index against the newly restored collection.=== RESTORE Parameters@@ -1790,10 +1783,10 @@ You can use the collection <<CollectionsAPI-createalias,CREATEALIAS>> command toThe collection where the indexes will be restored into. This parameter is required.`location`::-The location on a shared drive for the RESTORE command to read from. Alternately it can be set as a <<CollectionsAPI-clusterprop,cluster property>>.+The location on a shared drive for the RESTORE command to read from. Alternately it can be set as a <<clusterprop,cluster property>>.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.`repository`::The name of a repository to be used for the backup. If no repository is specified then the local filesystem repository will be used automatically.@@ -1814,12 +1807,11 @@ When creating collections, the shards and/or replicas are spread across all avaiIf a node is not live when the CREATE operation is called, it will not get any parts of the new collection, which could lead to too many replicas being created on a single live node. Defining `maxShardsPerNode` sets a limit on the number of replicas CREATE will spread to each node. If the entire collection can not be fit into the live nodes, no collection will be created at all.`autoAddReplicas`::-When set to `true`, enables auto addition of replicas on shared file systems. See the section <<running-solr-on-hdfs.adoc#RunningSolronHDFS-AutomaticallyAddReplicasinSolrCloud,Automatically Add Replicas in SolrCloud>> for more details on settings and overrides.+When set to `true`, enables auto addition of replicas on shared file systems. See the section <<running-solr-on-hdfs.adoc#automatically-add-replicas-in-solrcloud,Automatically Add Replicas in SolrCloud>> for more details on settings and overrides.`property._name_=_value_`::Set core property _name_ to _value_. See the section <<defining-core-properties.adoc#defining-core-properties,Defining core.properties>> for details on supported properties and values.-[[CollectionsAPI-deletenode]]== DELETENODE: Delete Replicas in a NodeDeletes all replicas of all collections in that node. Please note that the node itself will remain as a live node after this operation.@@ -1828,12 +1820,12 @@ Deletes all replicas of all collections in that node. Please note that the node=== DELETENODE Parameters-`node`:: string |Yes |The node to be removed. This parameter is required.+`node`::+The node to be removed. This parameter is required.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.-[[CollectionsAPI-replacenode]]== REPLACENODE: Move All Replicas in a Node to AnotherThis command recreates replicas in one node (the source) to another node (the target). After each replica is copied, the replicas in the source node are deleted.@@ -1854,7 +1846,7 @@ The target node where replicas will be copied. This parameter is required.If this flag is set to `true`, all replicas are created in separate threads. Keep in mind that this can lead to very high network and disk I/O if the replicas have very large indices. The default is `false`.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.`timeout`::Time in seconds to wait until new replicas are created, and until leader replicas are fully recovered. The default is `300`, or 5 minutes.@@ -1864,7 +1856,6 @@ Time in seconds to wait until new replicas are created, and until leader replicaThis operation does not hold necessary locks on the replicas that belong to on the source node. So don't perform other collection operations in this period.====-[[CollectionsAPI-movereplica]]== MOVEREPLICA: Move a Replica to a New NodeThis command moves a replica from one node to a new node. In case of shared filesystems the `dataDir` will be reused.@@ -1889,12 +1880,11 @@ The name of the node that contains the replica. This parameter is required.The name of the destination node. This parameter is required.`async`::-Request ID to track this action which will be <<CollectionsAPI-async,processed asynchronously>>.+Request ID to track this action which will be <<Asynchronous Calls,processed asynchronously>>.-[[CollectionsAPI-async]]== Asynchronous Calls-Since some collection API calls can be long running tasks (such as SPLITSHARD), you can optionally have the calls run asynchronously. Specifying `async=<request-id>` enables you to make an asynchronous call, the status of which can be requested using the <<CollectionsAPI-requeststatus,REQUESTSTATUS>> call at any time.+Since some collection API calls can be long running tasks (such as SPLITSHARD), you can optionally have the calls run asynchronously. Specifying `async=<request-id>` enables you to make an asynchronous call, the status of which can be requested using the <<requeststatus,REQUESTSTATUS>> call at any time.As of now, REQUESTSTATUS does not automatically clean up the tracking data structures, meaning the status of completed or failed tasks stays stored in ZooKeeper unless cleared manually. DELETESTATUS can be used to clear the stored statuses. However, there is a limit of 10,000 on the number of async call responses stored in a cluster.diff --git a/solr/solr-ref-guide/src/collections-core-admin.adoc b/solr/solr-ref-guide/src/collections-core-admin.adocindex fad75601a36..77d66cf9ffb 100644--- a/solr/solr-ref-guide/src/collections-core-admin.adoc+++ b/solr/solr-ref-guide/src/collections-core-admin.adoc@@ -36,6 +36,6 @@ image::images/collections-core-admin/collection-admin.png[image,width=653,heightReplicas can be deleted by clicking the red "X" next to the replica name.-If the shard is inactive, for example after a <<collections-api.adoc#CollectionsAPI-splitshard,SPLITSHARD action>>, an option to delete the shard will appear as a red "X" next to the shard name.+If the shard is inactive, for example after a <<collections-api.adoc#splitshard,SPLITSHARD action>>, an option to delete the shard will appear as a red "X" next to the shard name.image::images/collections-core-admin/DeleteShard.png[image,width=486,height=250]diff --git a/solr/solr-ref-guide/src/command-line-utilities.adoc b/solr/solr-ref-guide/src/command-line-utilities.adocindex 2c0d5110e13..294a1bcac90 100644--- a/solr/solr-ref-guide/src/command-line-utilities.adoc+++ b/solr/solr-ref-guide/src/command-line-utilities.adoc@@ -150,7 +150,7 @@ This can be useful to create a chroot path in ZooKeeper before first cluster staThis command will add or modify a single cluster property in `clusterprops.json`. Use this command instead of the usual getfile \-> edit \-> putfile cycle.-Unlike the CLUSTERPROP command on the <<collections-api.adoc#CollectionsAPI-clusterprop,Collections API>>, this command does *not* require a running Solr cluster.+Unlike the CLUSTERPROP command on the <<collections-api.adoc#clusterprop,Collections API>>, this command does *not* require a running Solr cluster.[source,bash]----diff --git a/solr/solr-ref-guide/src/common-query-parameters.adoc b/solr/solr-ref-guide/src/common-query-parameters.adocindex 826cbe2cb36..1eea0807d46 100644--- a/solr/solr-ref-guide/src/common-query-parameters.adoc+++ b/solr/solr-ref-guide/src/common-query-parameters.adoc@@ -20,7 +20,7 @@Several query parsers share supported query parameters.-The table below summarizes Solr's common query parameters, which are supported by the <<requesthandlers-and-searchcomponents-in-solrconfig#RequestHandlersandSearchComponentsinSolrConfig-SearchHandlers,Search RequestHandlers>>+The table below summarizes Solr's common query parameters, which are supported by the <<requesthandlers-and-searchcomponents-in-solrconfig#searchhandlers,Search RequestHandlers>>// TODO: Change column width to %autowidth.spread when https://github.com/asciidoctor/asciidoctor-pdf/issues/599 is fixed@@ -249,7 +249,7 @@ As this check is periodically performed, the actual time for which a request canThis parameter may be set to either true or false.-If set to true, and if <<indexconfig-in-solrconfig.adoc#IndexConfiginSolrConfig-mergePolicyFactory,the mergePolicyFactory>> for this collection is a {solr-javadocs}/solr-core/org/apache/solr/index/SortingMergePolicyFactory.html[`SortingMergePolicyFactory`] which uses a `sort` option which is compatible with <<CommonQueryParameters-ThesortParameter,the sort parameter>> specified for this query, then Solr will attempt to use an {lucene-javadocs}/core/org/apache/lucene/search/EarlyTerminatingSortingCollector.html[`EarlyTerminatingSortingCollector`].+If set to true, and if <<indexconfig-in-solrconfig.adoc#mergepolicyfactory,the mergePolicyFactory>> for this collection is a {solr-javadocs}/solr-core/org/apache/solr/index/SortingMergePolicyFactory.html[`SortingMergePolicyFactory`] which uses a `sort` option which is compatible with <<CommonQueryParameters-ThesortParameter,the sort parameter>> specified for this query, then Solr will attempt to use an {lucene-javadocs}/core/org/apache/lucene/search/EarlyTerminatingSortingCollector.html[`EarlyTerminatingSortingCollector`].If early termination is used, a `segmentTerminatedEarly` header will be included in the `responseHeader`.diff --git a/solr/solr-ref-guide/src/config-api.adoc b/solr/solr-ref-guide/src/config-api.adocindex 8f2d23b806d..00db2815f64 100644--- a/solr/solr-ref-guide/src/config-api.adoc+++ b/solr/solr-ref-guide/src/config-api.adoc@@ -24,15 +24,13 @@ This feature is enabled by default and works similarly in both SolrCloud and staWhen using this API, `solrconfig.xml` is not changed. Instead, all edited configuration is stored in a file called `configoverlay.json`. The values in `configoverlay.json` override the values in `solrconfig.xml`.-[[ConfigAPI-APIEntryPoints]]-== API Entry Points+== Config API Entry Points* `/config`: retrieve or modify the config. GET to retrieve and POST for executing commands* `/config/overlay`: retrieve the details in the `configoverlay.json` alone* `/config/params` : allows creating parameter sets that can override or take the place of parameters defined in `solrconfig.xml`. See the <<request-parameters-api.adoc#request-parameters-api,Request Parameters API>> section for more details.-[[ConfigAPI-Retrievingtheconfig]]-== Retrieving the config+== Retrieving the ConfigAll configuration items, can be retrieved by sending a GET request to the `/config` endpoint - the results will be the effective configuration resulting from merging settings in `configoverlay.json` with those in `solrconfig.xml`:@@ -55,18 +53,16 @@ To further restrict returned results to a single component within a top level securl http://localhost:8983/solr/techproducts/config/requestHandler?componentName=/select-----[[ConfigAPI-Commandstomodifytheconfig]]-== Commands to modify the config+== Commands to Modify the ConfigThis API uses specific commands to tell Solr what property or type of property to add to `configoverlay.json`. The commands are passed as part of the data sent with the request.The config commands are categorized into 3 different sections which manipulate various data structures in `solrconfig.xml`. Each of these is described below.-* <<ConfigAPI-CommandsforCommonProperties,Common Properties>>-* <<ConfigAPI-CommandsforCustomHandlersandLocalComponents,Components>>-* <<ConfigAPI-CommandsforUser-DefinedProperties,User-defined properties>>+* <<Commands for Common Properties,Common Properties>>+* <<Commands for Custom Handlers and Local Components,Components>>+* <<Commands for User-Defined Properties,User-defined properties>>-[[ConfigAPI-CommandsforCommonProperties]]=== Commands for Common PropertiesThe common properties are those that are frequently need to be customized in a Solr instance. They are manipulated with two commands:@@ -120,7 +116,6 @@ The properties that are configured with these commands are predefined and listed* `requestDispatcher.requestParsers.enableStreamBody`* `requestDispatcher.requestParsers.addHttpRequestToContext`-[[ConfigAPI-CommandsforCustomHandlersandLocalComponents]]=== Commands for Custom Handlers and Local ComponentsCustom request handlers, search components, and other types of localized Solr components (such as custom query parsers, update processors, etc.) can be added, updated and deleted with specific commands for the component being modified.@@ -133,7 +128,6 @@ Settings removed from `configoverlay.json` are not removed from `solrconfig.xml`The full list of available commands follows below:-[[ConfigAPI-GeneralPurposeCommands]]==== General Purpose CommandsThese commands are the most commonly used:@@ -151,7 +145,6 @@ These commands are the most commonly used:* `update-queryresponsewriter`* `delete-queryresponsewriter`-[[ConfigAPI-AdvancedCommands]]==== Advanced CommandsThese commands allow registering more advanced customizations to Solr:@@ -179,9 +172,8 @@ These commands allow registering more advanced customizations to Solr:* `update-runtimelib`* `delete-runtimelib`-See the section <<ConfigAPI-CreatingandUpdatingRequestHandlers,Creating and Updating Request Handlers>> below for examples of using these commands.+See the section <<Creating and Updating Request Handlers>> below for examples of using these commands.-[[ConfigAPI-Whatabout_updateRequestProcessorChain_]]==== What about updateRequestProcessorChain?The Config API does not let you create or edit `updateRequestProcessorChain` elements. However, it is possible to create `updateProcessor` entries and can use them by name to create a chain.@@ -198,7 +190,6 @@ curl http://localhost:8983/solr/techproducts/config -H 'Content-type:applicationYou can use this directly in your request by adding a parameter in the `updateRequestProcessorChain` for the specific update processor called `processor=firstFld`.-[[ConfigAPI-CommandsforUser-DefinedProperties]]=== Commands for User-Defined PropertiesSolr lets users templatize the `solrconfig.xml` using the place holder format `${variable_name:default_val}`. You could set the values using system properties, for example, `-Dvariable_name= my_customvalue`. The same can be achieved during runtime using these commands:@@ -208,11 +199,10 @@ Solr lets users templatize the `solrconfig.xml` using the place holder format `$The structure of the request is similar to the structure of requests using other commands, in the format of `"command":{"variable_name":"property_value"}`. You can add more than one variable at a time if necessary.-For more information about user-defined properties, see the section <<configuring-solrconfig-xml.adoc#Configuringsolrconfig.xml-Userdefinedpropertiesfromcore.properties,User defined properties from core.properties>>.+For more information about user-defined properties, see the section <<configuring-solrconfig-xml.adoc#user-defined-properties-in-core-properties,User defined properties in core.properties>>.-See also the section <<ConfigAPI-CreatingandUpdatingUser-DefinedProperties,Creating and Updating User-Defined Properties>> below for examples of how to use this type of command.+See also the section <<Creating and Updating User-Defined Properties>> below for examples of how to use this type of command.-[[ConfigAPI-HowtoMapsolrconfig.xmlPropertiestoJSON]]== How to Map solrconfig.xml Properties to JSONBy using this API, you will be generating JSON representations of properties defined in `solrconfig.xml`. To understand how properties should be represented with the API, let's take a look at a few examples.@@ -364,15 +354,12 @@ Define the same properties with the Config API:}-----[[ConfigAPI-NameComponentsfortheConfigAPI]]=== Name Components for the Config APIThe Config API always allows changing the configuration of any component by name. However, some configurations such as `listener` or `initParams` do not require a name in `solrconfig.xml`. In order to be able to `update` and `delete` of the same item in `configoverlay.json`, the name attribute becomes mandatory.-[[ConfigAPI-Examples]]-== Examples+== Config API Examples-[[ConfigAPI-CreatingandUpdatingCommonProperties]]=== Creating and Updating Common PropertiesThis change sets the `query.filterCache.autowarmCount` to 1000 items and unsets the `query.filterCache.size`.@@ -403,7 +390,6 @@ And you should get a response like this:"size":25}}}}}-----[[ConfigAPI-CreatingandUpdatingRequestHandlers]]=== Creating and Updating Request HandlersTo create a request handler, we can use the `add-requesthandler` command:@@ -471,7 +457,6 @@ curl http://localhost:8983/solr/techproducts/config -H 'Content-type:application}'-----[[ConfigAPI-CreatingandUpdatingUser-DefinedProperties]]=== Creating and Updating User-Defined PropertiesThis command sets a user property.@@ -507,14 +492,12 @@ To unset the variable, issue a command like this:curl http://localhost:8983/solr/techproducts/config -H'Content-type:application/json' -d '{"unset-user-property" : "variable_name"}'-----[[ConfigAPI-HowItWorks]]-== How It Works+== How the Config API WorksEvery core watches the ZooKeeper directory for the configset being used with that core. In standalone mode, however, there is no watch (because ZooKeeper is not running). If there are multiple cores in the same node using the same configset, only one ZooKeeper watch is used. For instance, if the configset 'myconf' is used by a core, the node would watch `/configs/myconf`. Every write operation performed through the API would 'touch' the directory (sets an empty byte[] to trigger watches) and all watchers are notified. Every core would check if the Schema file, `solrconfig.xml` or `configoverlay.json` is modified by comparing the `znode` versions and if modified, the core is reloaded.If `params.json` is modified, the params object is just updated without a core reload (see the section <<request-parameters-api.adoc#request-parameters-api,Request Parameters API>> for more information about `params.json`).-[[ConfigAPI-EmptyCommand]]=== Empty CommandIf an empty command is sent to the `/config` endpoint, the watch is triggered on all cores using this configset. For example:@@ -528,7 +511,6 @@ Directly editing any files without 'touching' the directory *will not* make it vIt is possible for components to watch for the configset 'touch' events by registering a listener using `SolrCore#registerConfListener()` .-[[ConfigAPI-ListeningtoconfigChanges]]=== Listening to config ChangesAny component can register a listener using:diff --git a/solr/solr-ref-guide/src/configsets-api.adoc b/solr/solr-ref-guide/src/configsets-api.adocindex 603e08e097e..cae9b132961 100644--- a/solr/solr-ref-guide/src/configsets-api.adoc+++ b/solr/solr-ref-guide/src/configsets-api.adoc@@ -1,6 +1,7 @@= ConfigSets API:page-shortname: configsets-api:page-permalink: configsets-api.html+:page-toclevels: 1// Licensed to the Apache Software Foundation (ASF) under one// or more contributor license agreements. See the NOTICE file// distributed with this work for additional information@@ -24,45 +25,40 @@ To use a ConfigSet created with this API as the configuration for a collection,This API can only be used with Solr running in SolrCloud mode. If you are not running Solr in SolrCloud mode but would still like to use shared configurations, please see the section <<config-sets.adoc#config-sets,Config Sets>>.-[[ConfigSetsAPI-APIEntryPoints]]-== API Entry Points+== ConfigSets API Entry PointsThe base URL for all API calls is `\http://<hostname>:<port>/solr`.-* `/admin/configs?action=CREATE`: <<ConfigSetsAPI-create,create>> a ConfigSet, based on an existing ConfigSet-* `/admin/configs?action=DELETE`: <<ConfigSetsAPI-delete,delete>> a ConfigSet-* `/admin/configs?action=LIST`: <<ConfigSetsAPI-list,list>> all ConfigSets-* `/admin/configs?action=UPLOAD`: <<ConfigSetsAPI-upload,upload>> a ConfigSet+* `/admin/configs?action=CREATE`: <<configsets-create,create>> a ConfigSet, based on an existing ConfigSet+* `/admin/configs?action=DELETE`: <<configsets-delete,delete>> a ConfigSet+* `/admin/configs?action=LIST`: <<configsets-list,list>> all ConfigSets+* `/admin/configs?action=UPLOAD`: <<configsets-upload,upload>> a ConfigSet-[[ConfigSetsAPI-createCreateaConfigSet]]--[[ConfigSetsAPI-create]]+[[configsets-create]]== Create a ConfigSet`/admin/configs?action=CREATE&name=_name_&baseConfigSet=_baseConfigSet_`Create a ConfigSet, based on an existing ConfigSet.-[[ConfigSetsAPI-Input]]-=== Input+=== Create ConfigSet ParametersThe following parameters are supported when creating a ConfigSet.-name:: The ConfigSet to be created. This parameter is required.--baseConfigSet:: The ConfigSet to copy as a base. This parameter is required.+name::+The ConfigSet to be created. This parameter is required.-configSetProp._name_=_value_:: Any ConfigSet property from base to override.+baseConfigSet::+The ConfigSet to copy as a base. This parameter is required.-[[ConfigSetsAPI-Output]]-=== Output+configSetProp._name_=_value_::+Any ConfigSet property from base to override.-*Output Content*+=== Create ConfigSet Response-The output will include the status of the request. If the status is anything other than "success", an error message will explain why the request failed.+The response will include the status of the request. If the status is anything other than "success", an error message will explain why the request failed.-[[ConfigSetsAPI-Examples]]-=== Examples+=== Create ConfigSet Examples*Input*@@ -85,31 +81,23 @@ http://localhost:8983/solr/admin/configs?action=CREATE&name=myConfigSet&baseConf</response>-----[[ConfigSetsAPI-deleteDeleteaConfigSet]]--[[ConfigSetsAPI-delete]]+[[configsets-delete]]== Delete a ConfigSet`/admin/configs?action=DELETE&name=_name_`Delete a ConfigSet-[[ConfigSetsAPI-Input.1]]-=== Input+=== Delete ConfigSet Parameters-*Query Parameters*+name::+The ConfigSet to be deleted. This parameter is required.-name:: The ConfigSet to be deleted. This parameter is required.--[[ConfigSetsAPI-Output.1]]-=== Output--*Output Content*+=== Delete ConfigSet ResponseThe output will include the status of the request. If the status is anything other than "success", an error message will explain why the request failed.-[[ConfigSetsAPI-Examples.1]]-=== Examples+=== Delete ConfigSet Examples*Input*@@ -132,15 +120,14 @@ http://localhost:8983/solr/admin/configs?action=DELETE&name=myConfigSet</response>-----[[ConfigSetsAPI-list]]+[[configsets-list]]== List ConfigSets`/admin/configs?action=LIST`Fetch the names of the ConfigSets in the cluster.-[[ConfigSetsAPI-Examples.2]]-=== Examples+=== List ConfigSet Examples*Input*@@ -161,7 +148,7 @@ http://localhost:8983/solr/admin/configs?action=LIST&wt=json"myConfig2"]}-----[[ConfigSetsAPI-upload]]+[[configsets-upload]]== Upload a ConfigSet`/admin/configs?action=UPLOAD&name=_name_`@@ -173,22 +160,18 @@ Upload a ConfigSet, sent in as a zipped file. Please note that a ConfigSet is up* XSLT transformer (tr parameter) cannot be used at request processing time.* StatelessScriptUpdateProcessor does not initialize, if specified in the ConfigSet.-[[ConfigSetsAPI-Input.3]]-=== Input+=== Upload ConfigSet Parameters-name:: The ConfigSet to be created when the upload is complete. This parameter is required.+name::+The ConfigSet to be created when the upload is complete. This parameter is required.The body of the request should contain a zipped config set.-[[ConfigSetsAPI-Output.3]]-=== Output--*Output Content*+=== Upload ConfigSet ResponseThe output will include the status of the request. If the status is anything other than "success", an error message will explain why the request failed.-[[ConfigSetsAPI-Examples.3]]-=== Examples+=== Upload ConfigSet ExamplesCreate a ConfigSet named 'myConfigSet' based on a 'predefinedTemplate' ConfigSet, overriding the immutable property to false.diff --git a/solr/solr-ref-guide/src/configuring-solrconfig-xml.adoc b/solr/solr-ref-guide/src/configuring-solrconfig-xml.adocindex 48f9084452e..7888e29a8af 100644--- a/solr/solr-ref-guide/src/configuring-solrconfig-xml.adoc+++ b/solr/solr-ref-guide/src/configuring-solrconfig-xml.adoc@@ -51,14 +51,12 @@ We've covered the options in the following sections:* <<update-request-processors.adoc#update-request-processors,Update Request Processors>>* <<codec-factory.adoc#codec-factory,Codec Factory>>-[[Configuringsolrconfig.xml-SubstitutingPropertiesinSolrConfigFiles]]== Substituting Properties in Solr Config FilesSolr supports variable substitution of property values in config files, which allows runtime specification of various configuration options in `solrconfig.xml`. The syntax is `${propertyname[:option default value]`}. This allows defining a default that can be overridden when Solr is launched. If a default value is not specified, then the property _must_ be specified at runtime or the configuration file will generate an error when parsed.There are multiple methods for specifying properties that can be used in configuration files. Of those below, strongly consider "config overlay" as the preferred approach, as it stays local to the config set and because it's easy to modify.-[[Configuringsolrconfig.xml-JVMSystemProperties]]=== JVM System PropertiesAny JVM System properties, usually specified using the `-D` flag when starting the JVM, can be used as variables in any XML configuration file in Solr.@@ -79,8 +77,7 @@ bin/solr start -Dsolr.lock.type=noneIn general, any Java system property that you want to set can be passed through the `bin/solr` script using the standard `-Dproperty=value` syntax. Alternatively, you can add common system properties to the `SOLR_OPTS` environment variable defined in the Solr include file (`bin/solr.in.sh` or `bin/solr.in.cmd`). For more information about how the Solr include file works, refer to: <<taking-solr-to-production.adoc#taking-solr-to-production,Taking Solr to Production>>.-[[Configuringsolrconfig.xml-ConfigAPI]]-=== Config API+=== Config API to Override solrconfig.xmlThe <<config-api.adoc#config-api,Config API>> allows you to use an API to modify Solr's configuration, specifically user defined properties. Changes made with this API are stored in a file named `configoverlay.json`. This file should only be edited with the API, but will look like this example:@@ -94,7 +91,6 @@ The <<config-api.adoc#config-api,Config API>> allows you to use an API to modifyFor more details, see the section <<config-api.adoc#config-api,Config API>>.-[[Configuringsolrconfig.xml-solrcore.properties]]=== solrcore.propertiesIf the configuration directory for a Solr core contains a file named `solrcore.properties` that file can contain any arbitrary user defined property names and values using the Java standard https://en.wikipedia.org/wiki/.properties[properties file format], and those properties can be used as variables in the XML configuration files for that Solr core.@@ -120,7 +116,6 @@ The path and name of the `solrcore.properties` file can be overridden using the====-[[Configuringsolrconfig.xml-Userdefinedpropertiesfromcore.properties]]=== User-Defined Properties in core.propertiesEvery Solr core has a `core.properties` file, automatically created when using the APIs. When you create a SolrCloud collection, you can pass through custom parameters to go into each core.properties that will be created, by prefixing the parameter name with "property." as a URL parameter. Example:@@ -148,7 +143,6 @@ The `my.custom.prop` property can then be used as a variable, such as in `solrco</requestHandler>-----[[Configuringsolrconfig.xml-ImplicitCoreProperties]]=== Implicit Core PropertiesSeveral attributes of a Solr core are available as "implicit" properties that can be used in variable substitution, independent of where or how they underlying value is initialized. For example: regardless of whether the name for a particular Solr core is explicitly configured in `core.properties` or inferred from the name of the instance directory, the implicit property `solr.core.name` is available for use as a variable in that core's configuration file...diff --git a/solr/solr-ref-guide/src/content-streams.adoc b/solr/solr-ref-guide/src/content-streams.adocindex f5f01a84f27..c4fc19427a1 100644--- a/solr/solr-ref-guide/src/content-streams.adoc+++ b/solr/solr-ref-guide/src/content-streams.adoc@@ -22,8 +22,7 @@ Content streams are bulk data passed with a request to Solr.When Solr RequestHandlers are accessed using path based URLs, the `SolrQueryRequest` object containing the parameters of the request may also contain a list of ContentStreams containing bulk data for the request. (The name SolrQueryRequest is a bit misleading: it is involved in all requests, regardless of whether it is a query request or an update request.)-[[ContentStreams-StreamSources]]-== Stream Sources+== Content Stream SourcesCurrently request handlers can get content streams in a variety of ways:@@ -34,7 +33,6 @@ Currently request handlers can get content streams in a variety of ways:By default, curl sends a `contentType="application/x-www-form-urlencoded"` header. If you need to test a SolrContentHeader content stream, you will need to set the content type with curl's `-H` flag.-[[ContentStreams-RemoteStreaming]]== RemoteStreamingRemote streaming lets you send the contents of a URL as a stream to a given SolrRequestHandler. You could use remote streaming to send a remote or local file to an update plugin.@@ -65,10 +63,9 @@ curl -d '[IMPORTANT]====-If `enableRemoteStreaming="true"` is used, be aware that this allows _anyone_ to send a request to any URL or local file. If <<ContentStreams-DebuggingRequests,DumpRequestHandler>> is enabled, it will allow anyone to view any file on your system.+If `enableRemoteStreaming="true"` is used, be aware that this allows _anyone_ to send a request to any URL or local file. If the <<Debugging Requests,DumpRequestHandler>> is enabled, it will allow anyone to view any file on your system.====-[[ContentStreams-DebuggingRequests]]== Debugging RequestsThe implicit "dump" RequestHandler (see <<implicit-requesthandlers.adoc#implicit-requesthandlers,Implicit RequestHandlers>>) simply outputs the contents of the SolrQueryRequest using the specified writer type `wt`. This is a useful tool to help understand what streams are available to the RequestHandlers.diff --git a/solr/solr-ref-guide/src/coreadmin-api.adoc b/solr/solr-ref-guide/src/coreadmin-api.adocindex a4a8ea9166e..67587015b0b 100644--- a/solr/solr-ref-guide/src/coreadmin-api.adoc+++ b/solr/solr-ref-guide/src/coreadmin-api.adoc@@ -29,7 +29,7 @@ CoreAdmin actions can be executed by via HTTP requests that specify an `action`All action names are uppercase, and are defined in depth in the sections below.-[[CoreAdminAPI-STATUS]]+[[coreadmin-status]]== STATUSThe `STATUS` action returns the status of all running Solr cores, or status for only the named core.@@ -44,7 +44,7 @@ The name of a core, as listed in the "name" attribute of a `<core>` element in ``indexInfo`::If `false`, information about the index will not be returned with a core STATUS request. In Solr implementations with a large number of cores (i.e., more than hundreds), retrieving the index information for each core can take a lot of time and isn't always required. The default is `true`.-[[CoreAdminAPI-CREATE]]+[[coreadmin-create]]== CREATEThe `CREATE` action creates a new core and registers it.@@ -102,7 +102,7 @@ WARNING: While it's possible to create a core for a non-existent collection, thiThe shard id this core represents. Normally you want to be auto-assigned a shard id.`property._name_=_value_`::-Sets the core property _name_ to _value_. See the section on defining <<defining-core-properties.adoc#Definingcore.properties-core.properties_files,core.properties file contents>>.+Sets the core property _name_ to _value_. See the section on defining <<defining-core-properties.adoc#defining-core-properties-files,core.properties file contents>>.`async`::Request ID to track this action which will be processed asynchronously.@@ -115,7 +115,7 @@ Use `collection.configName=_configname_` to point to the config for a new collechttp://localhost:8983/solr/admin/cores?action=CREATE&name=my_core&collection=my_collection&shard=shard2-[[CoreAdminAPI-RELOAD]]+[[coreadmin-reload]]== RELOADThe RELOAD action loads a new core from the configuration of an existing, registered Solr core. While the new core is initializing, the existing one will continue to handle requests. When the new Solr core is ready, it takes over and the old core is unloaded.@@ -134,7 +134,7 @@ RELOAD performs "live" reloads of SolrCore, reusing some existing objects. Some`core`::The name of the core, as listed in the "name" attribute of a `<core>` element in `solr.xml`. This parameter is required.-[[CoreAdminAPI-RENAME]]+[[coreadmin-rename]]== RENAMEThe `RENAME` action changes the name of a Solr core.@@ -153,7 +153,7 @@ The new name for the Solr core. If the persistent attribute of `<solr>` is `trueRequest ID to track this action which will be processed asynchronously.-[[CoreAdminAPI-SWAP]]+[[coreadmin-swap]]== SWAP`SWAP` atomically swaps the names used to access two existing Solr cores. This can be used to swap new content into production. The prior core remains available and can be swapped back, if necessary. Each core will be known by the name of the other, after the swap.@@ -162,9 +162,7 @@ Request ID to track this action which will be processed asynchronously.[IMPORTANT]====-Do not use `SWAP` with a SolrCloud node. It is not supported and can result in the core being unusable.-======= SWAP Parameters@@ -179,7 +177,7 @@ The name of one of the cores to be swapped. This parameter is required.Request ID to track this action which will be processed asynchronously.-[[CoreAdminAPI-UNLOAD]]+[[coreadmin-unload]]== UNLOADThe `UNLOAD` action removes a core from Solr. Active requests will continue to be processed, but no new requests will be sent to the named core. If a core is registered under more than one name, only the given name is removed.@@ -210,8 +208,7 @@ If `true`, removes everything related to the core, including the index directory`async`::Request ID to track this action which will be processed asynchronously.--[[CoreAdminAPI-MERGEINDEXES]]+[[coreadmin-mergeindexes]]== MERGEINDEXESThe `MERGEINDEXES` action merges one or more indexes to another index. The indexes must have completed commits, and should be locked against writes until the merge is complete or the resulting merged index may become corrupted. The target core index must already exist and have a compatible schema with the one or more indexes that will be merged to it. Another commit on the target core should also be performed after the merge is complete.@@ -243,7 +240,7 @@ Multi-valued, source cores that would be merged.Request ID to track this action which will be processed asynchronously-[[CoreAdminAPI-SPLIT]]+[[coreadmin-split]]== SPLITThe `SPLIT` action splits an index into two or more indexes. The index being split can continue to handle requests. The split pieces can be placed into a specified directory on the server's filesystem or it can be merged into running Solr cores.@@ -270,7 +267,6 @@ The key to be used for splitting the index. If this parameter is used, `ranges``async`::Request ID to track this action which will be processed asynchronously.-=== SPLIT ExamplesThe `core` index will be split into as many pieces as the number of `path` or `targetCore` parameters.@@ -305,9 +301,9 @@ This example uses the `ranges` parameter with hash ranges 0-500, 501-1000 and 10The `targetCore` must already exist and must have a compatible schema with the `core` index. A commit is automatically called on the `core` index before it is split.-This command is used as part of the <<collections-api.adoc#CollectionsAPI-splitshard,SPLITSHARD>> command but it can be used for non-cloud Solr cores as well. When used against a non-cloud core without `split.key` parameter, this action will split the source index and distribute its documents alternately so that each split piece contains an equal number of documents. If the `split.key` parameter is specified then only documents having the same route key will be split from the source index.+This command is used as part of the <<collections-api.adoc#splitshard,SPLITSHARD>> command but it can be used for non-cloud Solr cores as well. When used against a non-cloud core without `split.key` parameter, this action will split the source index and distribute its documents alternately so that each split piece contains an equal number of documents. If the `split.key` parameter is specified then only documents having the same route key will be split from the source index.-[[CoreAdminAPI-REQUESTSTATUS]]+[[coreadmin-requeststatus]]== REQUESTSTATUSRequest the status of an already submitted asynchronous CoreAdmin API call.@@ -326,7 +322,7 @@ The call below will return the status of an already submitted asynchronous CoreA[source,bash]http://localhost:8983/solr/admin/cores?action=REQUESTSTATUS&requestid=1-[[CoreAdminAPI-REQUESTRECOVERY]]+[[coreadmin-requestrecovery]]== REQUESTRECOVERYThe `REQUESTRECOVERY` action manually asks a core to recover by synching with the leader. This should be considered an "expert" level command and should be used in situations where the node (SorlCloud replica) is unable to become active automatically.@@ -338,7 +334,6 @@ The `REQUESTRECOVERY` action manually asks a core to recover by synching with th`core`::The name of the core to re-sync. This parameter is required.-[[CoreAdminAPI-Examples.1]]=== REQUESTRECOVERY Examples[source,bash]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.adocindex bffa71ff873..50d4396230d 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@@ -140,8 +140,6 @@ The CDCR replication logic requires modification to the maintenance logic of theIf the communication with one of the target data center is slow, the Updates Log on the source data center can grow to a substantial size. In such a scenario, it is necessary for the Updates Log to be able to efficiently find a given update operation given its identifier. Given that its identifier is an incremental number, it is possible to implement an efficient search strategy. Each transaction log file contains as part of its filename the version number of the first element. This is used to quickly traverse all the transaction log files and find the transaction log file containing one specific version number.--[[CrossDataCenterReplication_CDCR_-Monitoring]]=== MonitoringCDCR provides the following monitoring capabilities over the replication operations:@@ -155,24 +153,19 @@ Information about the lifecycle and statistics will be provided on a per-shard bThe CDC Replicator is a background thread that is responsible for replicating updates from a Source data center to one or more target data centers. It is responsible in providing monitoring information on a per-shard basis. As there can be a large number of collections and shards in a cluster, we will use a fixed-size pool of CDC Replicator threads that will be shared across shards.--[[CrossDataCenterReplication_CDCR_-Limitations]]-=== Limitations+=== CDCR LimitationsThe current design of CDCR has some limitations. CDCR will continue to evolve over time and many of these limitations will be addressed. Among them are:* CDCR is unlikely to be satisfactory for bulk-load situations where the update rate is high, especially if the bandwidth between the Source and target clusters is restricted. In this scenario, the initial bulk load should be performed, the Source and target data centers synchronized and CDCR be utilized for incremental updates.* CDCR is currently only active-passive; data is pushed from the Source cluster to the target cluster. There is active work being done in this area in the 6x code line to remove this limitation.* CDCR works most robustly with the same number of shards in the Source and target collection. The shards in the two collections may have different numbers of replicas.+* Running CDCR with the indexes on HDFS is not currently supported, see the https://issues.apache.org/jira/browse/SOLR-9861[Solr CDCR over HDFS] JIRA issue.--[[CrossDataCenterReplication_CDCR_-Configuration]]-== Configuration+== CDCR ConfigurationThe source and target configurations differ in the case of the data centers being in separate clusters. "Cluster" here means separate ZooKeeper ensembles controlling disjoint Solr instances. Whether these data centers are physically separated or not is immaterial for this discussion.--[[CrossDataCenterReplication_CDCR_-SourceConfiguration]]=== Source ConfigurationHere is a sample of a source configuration file, a section in `solrconfig.xml`. The presence of the <replica> section causes CDCR to use this cluster as the Source and should not be present in the target collections in the cluster-to-cluster case. Details about each setting are after the two examples:@@ -211,8 +204,6 @@ Here is a sample of a source configuration file, a section in `solrconfig.xml`.</updateHandler>------[[CrossDataCenterReplication_CDCR_-TargetConfiguration]]=== Target ConfigurationHere is a typical target configuration.@@ -256,7 +247,6 @@ The configuration details, defaults and options are as follows:CDCR can be configured to forward update requests to one or more replicas. A replica is defined with a “replica” list as follows:-`zkHost`::The host address for ZooKeeper of the target SolrCloud. Usually this is a comma-separated list of addresses to each node in the target ZooKeeper ensemble. This parameter is required.@@ -303,41 +293,27 @@ Monitor actions are performed at a core level, i.e., by using the following baseCurrently, none of the CDCR API calls have parameters.-=== API Entry Points (Control)-* `<collection>/cdcr?action=STATUS`: <<CrossDataCenterReplication_CDCR_-STATUS,Returns the current state>> of CDCR.-* `<collection>/cdcr?action=START`: <<CrossDataCenterReplication_CDCR_-START,Starts CDCR>> replication-* `<collection>/cdcr?action=STOP`: <<CrossDataCenterReplication_CDCR_-STOP,Stops CDCR>> replication.-* `<collection>/cdcr?action=ENABLEBUFFER`: <<CrossDataCenterReplication_CDCR_-ENABLEBUFFER,Enables the buffering>> of updates.-* `<collection>/cdcr?action=DISABLEBUFFER`: <<CrossDataCenterReplication_CDCR_-DISABLEBUFFER,Disables the buffering>> of updates.-+* `<collection>/cdcr?action=STATUS`: <<CDCR STATUS,Returns the current state>> of CDCR.+* `<collection>/cdcr?action=START`: <<CDCR START,Starts CDCR>> replication+* `<collection>/cdcr?action=STOP`: <<CDCR STOP,Stops CDCR>> replication.+* `<collection>/cdcr?action=ENABLEBUFFER`: <<ENABLEBUFFER,Enables the buffering>> of updates.+* `<collection>/cdcr?action=DISABLEBUFFER`: <<DISABLEBUFFER,Disables the buffering>> of updates.=== API Entry Points (Monitoring)-* `core/cdcr?action=QUEUES`: <<CrossDataCenterReplication_CDCR_-QUEUES,Fetches statistics about the queue>> for each replica and about the update logs.-* `core/cdcr?action=OPS`: <<CrossDataCenterReplication_CDCR_-OPS,Fetches statistics about the replication performance>> (operations per second) for each replica.-* `core/cdcr?action=ERRORS`: <<CrossDataCenterReplication_CDCR_-ERRORS,Fetches statistics and other information about replication errors>> for each replica.+* `core/cdcr?action=QUEUES`: <<QUEUES,Fetches statistics about the queue>> for each replica and about the update logs.+* `core/cdcr?action=OPS`: <<OPS,Fetches statistics about the replication performance>> (operations per second) for each replica.+* `core/cdcr?action=ERRORS`: <<ERRORS,Fetches statistics and other information about replication errors>> for each replica.=== Control Commands-[[CrossDataCenterReplication_CDCR_-STATUS]]-==== STATUS+==== CDCR STATUS`/collection/cdcr?action=STATUS`-===== Input--*Query Parameters:* There are no parameters to this command.--===== Output--*Output Content*--The current state of the CDCR, which includes the state of the replication process and the state of the buffer.--[[cdcr_examples]]-===== Examples+===== CDCR Status Example*Input*@@ -362,22 +338,15 @@ The current state of the CDCR, which includes the state of the replication proce}-----[[CrossDataCenterReplication_CDCR_-ENABLEBUFFER]]==== ENABLEBUFFER`/collection/cdcr?action=ENABLEBUFFER`-===== Input--*Query Parameters:* There are no parameters to this command.--===== Output+===== Enable Buffer Response-*Output Content*--The status of the process and an indication of whether the buffer is enabled+The status of the process and an indication of whether the buffer is enabled.-===== Examples+===== Enable Buffer Example*Input*@@ -402,20 +371,15 @@ The status of the process and an indication of whether the buffer is enabled}-----[[CrossDataCenterReplication_CDCR_-DISABLEBUFFER]]==== DISABLEBUFFER`/collection/cdcr?action=DISABLEBUFFER`-===== Input--*Query Parameters:* There are no parameters to this command--===== Output+===== Disable Buffer Response-*Output Content:* The status of CDCR and an indication that the buffer is disabled.+The status of CDCR and an indication that the buffer is disabled.-===== Examples+===== Disable Buffer Example*Input*@@ -440,20 +404,15 @@ http://host:8983/solr/<collection_name>/cdcr?action=DISABLEBUFFER}-----[[CrossDataCenterReplication_CDCR_-START]]-==== START+==== CDCR START`/collection/cdcr?action=START`-===== Input+===== CDCR Start Response-*Query Parameters:* There are no parameters for this action+Confirmation that CDCR is started and the status of buffering-===== Output--*Output Content:* Confirmation that CDCR is started and the status of buffering--===== Examples+===== CDCR Start Examples*Input*@@ -478,20 +437,15 @@ http://host:8983/solr/<collection_name>/cdcr?action=START}-----[[CrossDataCenterReplication_CDCR_-STOP]]-==== STOP+==== CDCR STOP`/collection/cdcr?action=STOP`-===== Input--*Query Parameters:* There are no parameters for this command.--===== Output+===== CDCR Stop Response-*Output Content:* The status of CDCR, including the confirmation that CDCR is stopped+The status of CDCR, including the confirmation that CDCR is stopped.-===== Examples+===== CDCR Stop Examples*Input*@@ -517,19 +471,13 @@ http://host:8983/solr/<collection_name>/cdcr?action=START-----[[CrossDataCenterReplication_CDCR_-Monitoringcommands]]-=== Monitoring commands+=== CDCR Monitoring Commands-[[CrossDataCenterReplication_CDCR_-QUEUES]]==== QUEUES`/core/cdcr?action=QUEUES`-===== Input--*Query Parameters:* There are no parameters for this command--===== Output+===== QUEUES Response*Output Content*@@ -537,7 +485,7 @@ The output is composed of a list “queues” which contains a list of (ZooKeepeThe “queues” object also contains information about the updates log, such as the size (in bytes) of the updates log on disk (“tlogTotalSize”), the number of transaction log files (“tlogTotalCount”) and the status of the updates log synchronizer (“updateLogSynchronizer”).-===== Examples+===== QUEUES Examples*Input*@@ -569,20 +517,15 @@ The “queues” object also contains information about the updates log, such as}-----[[CrossDataCenterReplication_CDCR_-OPS]]==== OPS`/core/cdcr?action=OPS`-===== Input--*Query Parameters:* There are no parameters for this command.--===== Output+===== OPS Response-*Output Content:* The output is composed of a list “operationsPerSecond” which contains a list of (ZooKeeper) target hosts, themselves containing a list of target collections. For each collection, the average number of processed operations per second since the start of the replication process is provided. The operations are further broken down into two groups: add and delete operations.+The output is composed of `operationsPerSecond` which contains a list of (ZooKeeper) target hosts, themselves containing a list of target collections. For each collection, the average number of processed operations per second since the start of the replication process is provided. The operations are further broken down into two groups: add and delete operations.-===== Examples+===== OPS Examples*Input*@@ -612,20 +555,15 @@ The “queues” object also contains information about the updates log, such as}-----[[CrossDataCenterReplication_CDCR_-ERRORS]]==== ERRORS`/core/cdcr?action=ERRORS`-===== Input+===== ERRORS Response-*Query Parameters:* There are no parameters for this command.+The output is composed of a list “errors” which contains a list of (ZooKeeper) target hosts, themselves containing a list of target collections. For each collection, information about errors encountered during the replication is provided, such as the number of consecutive errors encountered by the replicator thread, the number of bad requests or internal errors since the start of the replication process, and a list of the last errors encountered ordered by timestamp.-===== Output--*Output Content:* The output is composed of a list “errors” which contains a list of (ZooKeeper) target hosts, themselves containing a list of target collections. For each collection, information about errors encountered during the replication is provided, such as the number of consecutive errors encountered by the replicator thread, the number of bad requests or internal errors since the start of the replication process, and a list of the last errors encountered ordered by timestamp.--===== Examples+===== ERRORS Examples*Input*@@ -728,7 +666,6 @@ http://host:port/solr/collection_name/cdcr?action=DISABLEBUFFER+* Renable indexing-[[CrossDataCenterReplication_CDCR_-Monitoring.1]]== Monitoring. Network and disk space monitoring are essential. Ensure that the system has plenty of available storage to queue up changes if there is a disconnect between the Source and Target. A network outage between the two data centers can cause your disk usage to grow.@@ -763,8 +700,3 @@ curl http://<Source>/solr/cloud1/update -H 'Content-type:application/json' -d '[#check the Targetcurl "http://<Target>:8983/solr/<collection_name>/select?q=SKU:ABC&wt=json&indent=true"------[[CrossDataCenterReplication_CDCR_-Limitations.1]]-== Limitations--* Running CDCR with the indexes on HDFS is not currently supported, see: https://issues.apache.org/jira/browse/SOLR-9861[Solr CDCR over HDFS].diff --git a/solr/solr-ref-guide/src/defining-core-properties.adoc b/solr/solr-ref-guide/src/defining-core-properties.adocindex a533098609e..142432706ef 100644--- a/solr/solr-ref-guide/src/defining-core-properties.adoc+++ b/solr/solr-ref-guide/src/defining-core-properties.adoc@@ -29,7 +29,6 @@ A minimal `core.properties` file looks like the example below. However, it can aname=my_core_name-----[[Definingcore.properties-Placementofcore.properties]]== Placement of core.propertiesSolr cores are configured by placing a file named `core.properties` in a sub-directory under `solr.home`. There are no a-priori limits to the depth of the tree, nor are there limits to the number of cores that can be defined. Cores may be anywhere in the tree with the exception that cores may _not_ be defined under an existing core. That is, the following is not allowed:@@ -61,11 +60,8 @@ Your `core.properties` file can be empty if necessary. Suppose `core.properties`You can run Solr without configuring any cores.====-[[Definingcore.properties-Definingcore.propertiesFiles]]== Defining core.properties Files-[[Definingcore.properties-core.properties_files]]-The minimal `core.properties` file is an empty file, in which case all of the properties are defaulted appropriately.Java properties files allow the hash (`#`) or bang (`!`) characters to specify comment-to-end-of-line.@@ -98,4 +94,4 @@ The following properties are available:`roles`:: Future parameter for SolrCloud or a way for users to mark nodes for their own use.-Additional user-defined properties may be specified for use as variables. For more information on how to define local properties, see the section <<configuring-solrconfig-xml.adoc#Configuringsolrconfig.xml-SubstitutingPropertiesinSolrConfigFiles,Substituting Properties in Solr Config Files>>.+Additional user-defined properties may be specified for use as variables. For more information on how to define local properties, see the section <<configuring-solrconfig-xml.adoc#substituting-properties-in-solr-config-files,Substituting Properties in Solr Config Files>>.diff --git a/solr/solr-ref-guide/src/distributed-requests.adoc b/solr/solr-ref-guide/src/distributed-requests.adocindex 9fc80a7a208..b9c392039f5 100644--- a/solr/solr-ref-guide/src/distributed-requests.adoc+++ b/solr/solr-ref-guide/src/distributed-requests.adoc@@ -24,7 +24,7 @@ The chosen replica acts as an aggregator: it creates internal requests to random== Limiting Which Shards are Queried-While one of the advantages of using SolrCloud is the ability to query very large collections distributed among various shards, in some cases <<shards-and-indexing-data-in-solrcloud.adoc#ShardsandIndexingDatainSolrCloud-DocumentRouting,you may know that you are only interested in results from a subset of your shards>>. You have the option of searching over all of your data or just parts of it.+While one of the advantages of using SolrCloud is the ability to query very large collections distributed among various shards, in some cases <<shards-and-indexing-data-in-solrcloud.adoc#document-routing,you may know that you are only interested in results from a subset of your shards>>. You have the option of searching over all of your data or just parts of it.Querying all shards for a collection should look familiar; it's as though SolrCloud didn't even come into play:diff --git a/solr/solr-ref-guide/src/documents-screen.adoc b/solr/solr-ref-guide/src/documents-screen.adocindex 4605dd79e64..7c16ee98663 100644--- a/solr/solr-ref-guide/src/documents-screen.adoc+++ b/solr/solr-ref-guide/src/documents-screen.adoc@@ -42,28 +42,24 @@ The first step is to define the RequestHandler to use (aka, 'qt'). By default `/Then choose the Document Type to define the type of document to load. The remaining parameters will change depending on the document type selected.-[[DocumentsScreen-JSON]]-== JSON+== JSON DocumentsWhen using the JSON document type, the functionality is similar to using a requestHandler on the command line. Instead of putting the documents in a curl command, they can instead be input into the Document entry box. The document structure should still be in proper JSON format.Then you can choose when documents should be added to the index (Commit Within), & whether existing documents should be overwritten with incoming documents with the same id (if this is not *true*, then the incoming documents will be dropped).-This option will only add or overwrite documents to the index; for other update tasks, see the <<DocumentsScreen-SolrCommand,Solr Command>> option.+This option will only add or overwrite documents to the index; for other update tasks, see the <<Solr Command>> option.-[[DocumentsScreen-CSV]]-== CSV+== CSV DocumentsWhen using the CSV document type, the functionality is similar to using a requestHandler on the command line. Instead of putting the documents in a curl command, they can instead be input into the Document entry box. The document structure should still be in proper CSV format, with columns delimited and one row per document.Then you can choose when documents should be added to the index (Commit Within), and whether existing documents should be overwritten with incoming documents with the same id (if this is not *true*, then the incoming documents will be dropped).-[[DocumentsScreen-DocumentBuilder]]== Document BuilderThe Document Builder provides a wizard-like interface to enter fields of a document-[[DocumentsScreen-FileUpload]]== File UploadThe File Upload option allows choosing a prepared file and uploading it. If using only `/update` for the Request-Handler option, you will be limited to XML, CSV, and JSON.@@ -72,18 +68,16 @@ However, to use the ExtractingRequestHandler (aka Solr Cell), you can modify theThen you can choose when documents should be added to the index (Commit Within), and whether existing documents should be overwritten with incoming documents with the same id (if this is not *true*, then the incoming documents will be dropped).-[[DocumentsScreen-SolrCommand]]== Solr CommandThe Solr Command option allows you use XML or JSON to perform specific actions on documents, such as defining documents to be added or deleted, updating only certain fields of documents, or commit and optimize commands on the index.The documents should be structured as they would be if using `/update` on the command line.-[[DocumentsScreen-XML]]-== XML+== XML DocumentsWhen using the XML document type, the functionality is similar to using a requestHandler on the command line. Instead of putting the documents in a curl command, they can instead be input into the Document entry box. The document structure should still be in proper Solr XML format, with each document separated by `<doc>` tags and each field defined.Then you can choose when documents should be added to the index (Commit Within), and whether existing documents should be overwritten with incoming documents with the same id (if this is not **true**, then the incoming documents will be dropped).-This option will only add or overwrite documents to the index; for other update tasks, see the <<DocumentsScreen-SolrCommand,Solr Command>> option.+This option will only add or overwrite documents to the index; for other update tasks, see the <<Solr Command>> option.diff --git a/solr/solr-ref-guide/src/enabling-ssl.adoc b/solr/solr-ref-guide/src/enabling-ssl.adocindex a74156564a1..5357ab1c61a 100644--- a/solr/solr-ref-guide/src/enabling-ssl.adoc+++ b/solr/solr-ref-guide/src/enabling-ssl.adoc@@ -154,7 +154,7 @@ server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:2181 -cmd clusterprop -nserver\scripts\cloud-scripts\zkcli.bat -zkhost localhost:2181 -cmd clusterprop -name urlScheme -val https-----If you have set up your ZooKeeper cluster to use a <<taking-solr-to-production.adoc#TakingSolrtoProduction-ZooKeeperchroot,chroot for Solr>> , make sure you use the correct `zkhost` string with `zkcli`, e.g. `-zkhost localhost:2181/solr`.+If you have set up your ZooKeeper cluster to use a <<taking-solr-to-production.adoc#zookeeper-chroot,chroot for Solr>> , make sure you use the correct `zkhost` string with `zkcli`, e.g. `-zkhost localhost:2181/solr`.=== Run SolrCloud with SSLdiff --git a/solr/solr-ref-guide/src/errata.adoc b/solr/solr-ref-guide/src/errata.adocindex 9030ee354ad..7484c1759bd 100644--- a/solr/solr-ref-guide/src/errata.adoc+++ b/solr/solr-ref-guide/src/errata.adoc@@ -18,14 +18,12 @@// specific language governing permissions and limitations// under the License.-[[Errata-ErrataForThisDocumentation]]== Errata For This DocumentationAny mistakes found in this documentation after its release will be listed on the on-line version of this page:https://lucene.apache.org/solr/guide/{solr-docs-version}/errata.html-[[Errata-ErrataForPastVersionsofThisDocumentation]]== Errata For Past Versions of This DocumentationAny known mistakes in past releases of this documentation will be noted below.diff --git a/solr/solr-ref-guide/src/faceting.adoc b/solr/solr-ref-guide/src/faceting.adocindex 44db50603f4..4384a74f462 100644--- a/solr/solr-ref-guide/src/faceting.adoc+++ b/solr/solr-ref-guide/src/faceting.adoc@@ -351,7 +351,7 @@ The `facet.mincount` parameter, the same one as used in field faceting is also a[NOTE]====-Range faceting on date fields is a common situation where the <<working-with-dates.adoc#WorkingwithDates-TZ,`TZ`>> parameter can be useful to ensure that the "facet counts per day" or "facet counts per month" are based on a meaningful definition of when a given day/month "starts" relative to a particular TimeZone.+Range faceting on date fields is a common situation where the <<working-with-dates.adoc#tz,`TZ`>> parameter can be useful to ensure that the "facet counts per day" or "facet counts per month" are based on a meaningful definition of when a given day/month "starts" relative to a particular TimeZone.For more information, see the examples in the <<working-with-dates.adoc#working-with-dates,Working with Dates>> section.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.adocindex 27c3222f6fc..695146b8de0 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@@ -90,9 +90,9 @@ For multivalued fields, specifies a distance between multiple values, which prev`autoGeneratePhraseQueries`:: For text fields. If `true`, Solr automatically generates phrase queries for adjacent terms. If `false`, terms must be enclosed in double-quotes to be treated as phrases.`enableGraphQueries`::-For text fields, applicable when querying with <<the-standard-query-parser.adoc#TheStandardQueryParser-StandardQueryParserParameters,`sow=false`>>. Use `true` (the default) for field types with query analyzers including graph-aware filters, e.g., <<filter-descriptions.adoc#FilterDescriptions-SynonymGraphFilter,Synonym Graph Filter>> and <<filter-descriptions.adoc#FilterDescriptions-WordDelimiterGraphFilter,Word Delimiter Graph Filter>>.+For text fields, applicable when querying with <<the-standard-query-parser.adoc#TheStandardQueryParser-StandardQueryParserParameters,`sow=false`>>. Use `true` (the default) for field types with query analyzers including graph-aware filters, e.g., <<filter-descriptions.adoc#synonym-graph-filter,Synonym Graph Filter>> and <<filter-descriptions.adoc#word-delimiter-graph-filter,Word Delimiter Graph Filter>>.+-Use `false` for field types with query analyzers including filters that can match docs when some tokens are missing, e.g., <<filter-descriptions.adoc#FilterDescriptions-ShingleFilter,Shingle Filter>>.+Use `false` for field types with query analyzers including filters that can match docs when some tokens are missing, e.g., <<filter-descriptions.adoc#shingle-filter,Shingle Filter>>.[[FieldTypeDefinitionsandProperties-docValuesFormat]]`docValuesFormat`::@@ -140,4 +140,4 @@ The default values for each property depend on the underlying `FieldType` class,A field type may optionally specify a `<similarity/>` that will be used when scoring documents that refer to fields with this type, as long as the "global" similarity for the collection allows it.-By default, any field type which does not define a similarity, uses `BM25Similarity`. For more details, and examples of configuring both global & per-type Similarities, please see <<other-schema-elements.adoc#OtherSchemaElements-Similarity,Other Schema Elements>>.+By default, any field type which does not define a similarity, uses `BM25Similarity`. For more details, and examples of configuring both global & per-type Similarities, please see <<other-schema-elements.adoc#similarity,Other Schema Elements>>.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.adocindex 5c82970b777..4ba0e45598c 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@@ -27,17 +27,17 @@ The following table lists the field types that are available in Solr. The `org.a|Class |Description|BinaryField |Binary data.|BoolField |Contains either true or false. Values of "1", "t", or "T" in the first character are interpreted as true. Any other values in the first character are interpreted as false.-|CollationField |Supports Unicode collation for sorting and range queries. ICUCollationField is a better choice if you can use ICU4J. See the section <<language-analysis.adoc#LanguageAnalysis-UnicodeCollation,Unicode Collation>>.+|CollationField |Supports Unicode collation for sorting and range queries. ICUCollationField is a better choice if you can use ICU4J. See the section <<language-analysis.adoc#unicode-collation,Unicode Collation>>.|CurrencyField |Deprecated in favor of CurrencyFieldType.|CurrencyFieldType |Supports currencies and exchange rates. See the section <<working-with-currencies-and-exchange-rates.adoc#working-with-currencies-and-exchange-rates,Working with Currencies and Exchange Rates>>.|DateRangeField |Supports indexing date ranges, to include point in time date instances as well (single-millisecond durations). See the section <<working-with-dates.adoc#working-with-dates,Working with Dates>> for more detail on using this field type. Consider using this field type even if it's just for date instances, particularly when the queries typically fall on UTC year/month/day/hour, etc., boundaries.|ExternalFileField |Pulls values from a file on disk. See the section <<working-with-external-files-and-processes.adoc#working-with-external-files-and-processes,Working with External Files and Processes>>.|EnumField |Allows defining an enumerated set of values which may not be easily sorted by either alphabetic or numeric order (such as a list of severities, for example). This field type takes a configuration file, which lists the proper order of the field values. See the section <<working-with-enum-fields.adoc#working-with-enum-fields,Working with Enum Fields>> for more information.-|ICUCollationField |Supports Unicode collation for sorting and range queries. See the section <<language-analysis.adoc#LanguageAnalysis-UnicodeCollation,Unicode Collation>>.+|ICUCollationField |Supports Unicode collation for sorting and range queries. See the section <<language-analysis.adoc#unicode-collation,Unicode Collation>>.|LatLonPointSpatialField |<<spatial-search.adoc#spatial-search,Spatial Search>>: a latitude/longitude coordinate pair; possibly multi-valued for multiple points. Usually it's specified as "lat,lon" order with a comma.|LatLonType |(deprecated) <<spatial-search.adoc#spatial-search,Spatial Search>>: a single-valued latitude/longitude coordinate pair. Usually it's specified as "lat,lon" order with a comma.|PointType |<<spatial-search.adoc#spatial-search,Spatial Search>>: A single-valued n-dimensional point. It's both for sorting spatial data that is _not_ lat-lon, and for some more rare use-cases. (NOTE: this is _not_ related to the "Point" based numeric fields)-|PreAnalyzedField |Provides a way to send to Solr serialized token streams, optionally with independent stored values of a field, and have this information stored and indexed without any additional text processing. Configuration and usage of PreAnalyzedField is documented on the <<working-with-external-files-and-processes.adoc#WorkingwithExternalFilesandProcesses-ThePreAnalyzedFieldType,Working with External Files and Processes>> page.+|PreAnalyzedField |Provides a way to send to Solr serialized token streams, optionally with independent stored values of a field, and have this information stored and indexed without any additional text processing. Configuration and usage of PreAnalyzedField is documented on the <<working-with-external-files-and-processes.adoc#the-preanalyzedfield-type,Working with External Files and Processes>> page.|RandomSortField |Does not contain a value. Queries that sort on this field type will return results in random order. Use a dynamic field to use this feature.|SpatialRecursivePrefixTreeFieldType |(RPT for short) <<spatial-search.adoc#spatial-search,Spatial Search>>: Accepts latitude comma longitude strings or other shapes in WKT format.|StrField |String (UTF-8 encoded string or Unicode). Strings are intended for small fields and are _not_ tokenized or analyzed in any way. They have a hard limit of slightly less than 32K.diff --git a/solr/solr-ref-guide/src/filter-descriptions.adoc b/solr/solr-ref-guide/src/filter-descriptions.adocindex f428678f894..4ced59e9d37 100644--- a/solr/solr-ref-guide/src/filter-descriptions.adoc+++ b/solr/solr-ref-guide/src/filter-descriptions.adoc@@ -50,7 +50,6 @@ The following sections describe the filter factories that are included in this rFor user tips about Solr's filters, see http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters.-[[FilterDescriptions-ASCIIFoldingFilter]]== ASCII Folding FilterThis filter converts alphabetic, numeric, and symbolic Unicode characters which are not in the Basic Latin Unicode block (the first 127 ASCII characters) to their ASCII equivalents, if one exists. This filter converts characters from the following Unicode blocks:@@ -92,10 +91,9 @@ This filter converts alphabetic, numeric, and symbolic Unicode characters which*Out:* "a" (ASCII character 97)-[[FilterDescriptions-Beider-MorseFilter]]== Beider-Morse Filter-Implements the Beider-Morse Phonetic Matching (BMPM) algorithm, which allows identification of similar names, even if they are spelled differently or in different languages. More information about how this works is available in the section on <<phonetic-matching.adoc#PhoneticMatching-Beider-MorsePhoneticMatching_BMPM_,Phonetic Matching>>.+Implements the Beider-Morse Phonetic Matching (BMPM) algorithm, which allows identification of similar names, even if they are spelled differently or in different languages. More information about how this works is available in the section on <<phonetic-matching.adoc#beider-morse-phonetic-matching-bmpm,Phonetic Matching>>.[IMPORTANT]====@@ -125,10 +123,9 @@ BeiderMorseFilter changed its behavior in Solr 5.0 due to an update to version 3</analyzer>-----[[FilterDescriptions-ClassicFilter]]== Classic Filter-This filter takes the output of the <<tokenizers.adoc#Tokenizers-ClassicTokenizer,Classic Tokenizer>> and strips periods from acronyms and "'s" from possessives.+This filter takes the output of the <<tokenizers.adoc#classic-tokenizer,Classic Tokenizer>> and strips periods from acronyms and "'s" from possessives.*Factory class:* `solr.ClassicFilterFactory`@@ -150,7 +147,6 @@ This filter takes the output of the <<tokenizers.adoc#Tokenizers-ClassicTokenize*Out:* "IBM", "cat", "can't"-[[FilterDescriptions-CommonGramsFilter]]== Common Grams FilterThis filter creates word shingles by combining common tokens such as stop words with regular tokens. This is useful for creating phrase queries containing common words, such as "the cat." Solr normally ignores stop words in queried phrases, so searching for "the cat" would return all matches for the word "cat."@@ -181,12 +177,10 @@ This filter creates word shingles by combining common tokens such as stop words*Out:* "the_cat"-[[FilterDescriptions-CollationKeyFilter]]== Collation Key Filter-Collation allows sorting of text in a language-sensitive way. It is usually used for sorting, but can also be used with advanced searches. We've covered this in much more detail in the section on <<language-analysis.adoc#LanguageAnalysis-UnicodeCollation,Unicode Collation>>.+Collation allows sorting of text in a language-sensitive way. It is usually used for sorting, but can also be used with advanced searches. We've covered this in much more detail in the section on <<language-analysis.adoc#unicode-collation,Unicode Collation>>.-[[FilterDescriptions-Daitch-MokotoffSoundexFilter]]== Daitch-Mokotoff Soundex FilterImplements the Daitch-Mokotoff Soundex algorithm, which allows identification of similar names, even if they are spelled differently. More information about how this works is available in the section on <<phonetic-matching.adoc#phonetic-matching,Phonetic Matching>>.@@ -207,7 +201,6 @@ Implements the Daitch-Mokotoff Soundex algorithm, which allows identification of</analyzer>-----[[FilterDescriptions-DoubleMetaphoneFilter]]== Double Metaphone FilterThis filter creates tokens using the http://commons.apache.org/codec/apidocs/org/apache/commons/codec/language/DoubleMetaphone.html[`DoubleMetaphone`] encoding algorithm from commons-codec. For more information, see the <<phonetic-matching.adoc#phonetic-matching,Phonetic Matching>> section.@@ -260,7 +253,6 @@ Discard original token (`inject="false"`).Note that "Kuczewski" has two encodings, which are added at the same position.-[[FilterDescriptions-EdgeN-GramFilter]]== Edge N-Gram FilterThis filter generates edge n-gram tokens of sizes within the given range.@@ -327,7 +319,6 @@ A range of 4 to 6.*Out:* "four", "scor", "score", "twen", "twent", "twenty"-[[FilterDescriptions-EnglishMinimalStemFilter]]== English Minimal Stem FilterThis filter stems plural English words to their singular form.@@ -352,7 +343,6 @@ This filter stems plural English words to their singular form.*Out:* "dog", "cat"-[[FilterDescriptions-EnglishPossessiveFilter]]== English Possessive FilterThis filter removes singular possessives (trailing *'s*) from words. Note that plural possessives, e.g. the *s'* in "divers' snorkels", are not removed by this filter.@@ -377,7 +367,6 @@ This filter removes singular possessives (trailing *'s*) from words. Note that p*Out:* "Man", "dog", "bites", "dogs'", "man"-[[FilterDescriptions-FingerprintFilter]]== Fingerprint FilterThis filter outputs a single token which is a concatenation of the sorted and de-duplicated set of input tokens. This can be useful for clustering/linking use cases.@@ -406,7 +395,6 @@ This filter outputs a single token which is a concatenation of the sorted and de*Out:* "brown_dog_fox_jumped_lazy_over_quick_the"-[[FilterDescriptions-FlattenGraphFilter]]== Flatten Graph FilterThis filter must be included on index-time analyzer specifications that include at least one graph-aware filter, including Synonym Graph Filter and Word Delimiter Graph Filter.@@ -417,7 +405,6 @@ This filter must be included on index-time analyzer specifications that includeSee the examples below for <<Synonym Graph Filter>> and <<Word Delimiter Graph Filter>>.-[[FilterDescriptions-HunspellStemFilter]]== Hunspell Stem FilterThe `Hunspell Stem Filter` provides support for several languages. You must provide the dictionary (`.dic`) and rules (`.aff`) files for each language you wish to use with the Hunspell Stem Filter. You can download those language files http://wiki.services.openoffice.org/wiki/Dictionaries[here].@@ -456,7 +443,6 @@ Be aware that your results will vary widely based on the quality of the provided*Out:* "jump", "jump", "jump"-[[FilterDescriptions-HyphenatedWordsFilter]]== Hyphenated Words FilterThis filter reconstructs hyphenated words that have been tokenized as two tokens because of a line break or other intervening whitespace in the field test. If a token ends with a hyphen, it is joined with the following token and the hyphen is discarded.@@ -483,10 +469,9 @@ Note that for this filter to work properly, the upstream tokenizer must not remo*Out:* "A", "hyphenated", "word"-[[FilterDescriptions-ICUFoldingFilter]]== ICU Folding Filter-This filter is a custom Unicode normalization form that applies the foldings specified in http://www.unicode.org/reports/tr30/tr30-4.html[Unicode Technical Report 30] in addition to the `NFKC_Casefold` normalization form as described in <<FilterDescriptions-ICUNormalizer2Filter,ICU Normalizer 2 Filter>>. This filter is a better substitute for the combined behavior of the <<FilterDescriptions-ASCIIFoldingFilter,ASCII Folding Filter>>, <<FilterDescriptions-LowerCaseFilter,Lower Case Filter>>, and <<FilterDescriptions-ICUNormalizer2Filter,ICU Normalizer 2 Filter>>.+This filter is a custom Unicode normalization form that applies the foldings specified in http://www.unicode.org/reports/tr30/tr30-4.html[Unicode Technical Report 30] in addition to the `NFKC_Casefold` normalization form as described in <<ICU Normalizer 2 Filter>>. This filter is a better substitute for the combined behavior of the <<ASCII Folding Filter>>, <<Lower Case Filter>>, and <<ICU Normalizer 2 Filter>>.To use this filter, see `solr/contrib/analysis-extras/README.txt` for instructions on which jars you need to add to your `solr_home/lib`. For more information about adding jars, see the section <<lib-directives-in-solrconfig.adoc#lib-directives-in-solrconfig,Lib Directives in Solrconfig>>.@@ -506,7 +491,6 @@ To use this filter, see `solr/contrib/analysis-extras/README.txt` for instructioFor detailed information on this normalization form, see http://www.unicode.org/reports/tr30/tr30-4.html.-[[FilterDescriptions-ICUNormalizer2Filter]]== ICU Normalizer 2 FilterThis filter factory normalizes text according to one of five Unicode Normalization Forms as described in http://unicode.org/reports/tr15/[Unicode Standard Annex #15]:@@ -539,7 +523,6 @@ For detailed information about these Unicode Normalization Forms, see http://uniTo use this filter, see `solr/contrib/analysis-extras/README.txt` for instructions on which jars you need to add to your `solr_home/lib`.-[[FilterDescriptions-ICUTransformFilter]]== ICU Transform FilterThis filter applies http://userguide.icu-project.org/transforms/general[ICU Tranforms] to text. This filter supports only ICU System Transforms. Custom rule sets are not supported.@@ -564,7 +547,6 @@ For detailed information about ICU Transforms, see http://userguide.icu-project.To use this filter, see `solr/contrib/analysis-extras/README.txt` for instructions on which jars you need to add to your `solr_home/lib`.-[[FilterDescriptions-KeepWordFilter]]== Keep Word FilterThis filter discards all tokens except those that are listed in the given word list. This is the inverse of the Stop Words Filter. This filter can be useful for building specialized indices for a constrained set of terms.@@ -638,7 +620,6 @@ Using LowerCaseFilterFactory before filtering for keep words, no `ignoreCase` fl*Out:* "happy", "funny"-[[FilterDescriptions-KStemFilter]]== KStem FilterKStem is an alternative to the Porter Stem Filter for developers looking for a less aggressive stemmer. KStem was written by Bob Krovetz, ported to Lucene by Sergio Guzman-Lara (UMASS Amherst). This stemmer is only appropriate for English language text.@@ -663,7 +644,6 @@ KStem is an alternative to the Porter Stem Filter for developers looking for a l*Out:* "jump", "jump", "jump"-[[FilterDescriptions-LengthFilter]]== Length FilterThis filter passes tokens whose length falls within the min/max limit specified. All other tokens are discarded.@@ -694,7 +674,6 @@ This filter passes tokens whose length falls within the min/max limit specified.*Out:* "turn", "right"-[[FilterDescriptions-LimitTokenCountFilter]]== Limit Token Count FilterThis filter limits the number of accepted tokens, typically useful for index analysis.@@ -726,7 +705,6 @@ By default, this filter ignores any tokens in the wrapped `TokenStream` once the*Out:* "1", "2", "3", "4", "5", "6", "7", "8", "9", "10"-[[FilterDescriptions-LimitTokenOffsetFilter]]== Limit Token Offset FilterThis filter limits tokens to those before a configured maximum start character offset. This can be useful to limit highlighting, for example.@@ -758,7 +736,6 @@ By default, this filter ignores any tokens in the wrapped `TokenStream` once the*Out:* "0", "2", "4", "6", "8", "A"-[[FilterDescriptions-LimitTokenPositionFilter]]== Limit Token Position FilterThis filter limits tokens to those before a configured maximum token position.@@ -790,7 +767,6 @@ By default, this filter ignores any tokens in the wrapped `TokenStream` once the*Out:* "1", "2", "3"-[[FilterDescriptions-LowerCaseFilter]]== Lower Case FilterConverts any uppercase letters in a token to the equivalent lowercase token. All other characters are left unchanged.@@ -815,10 +791,9 @@ Converts any uppercase letters in a token to the equivalent lowercase token. All*Out:* "down", "with", "camelcase"-[[FilterDescriptions-ManagedStopFilter]]== Managed Stop Filter-This is specialized version of the <<FilterDescriptions-StopFilter,Stop Words Filter Factory>> that uses a set of stop words that are <<managed-resources.adoc#managed-resources,managed from a REST API.>>+This is specialized version of the <<Stop Filter,Stop Words Filter Factory>> that uses a set of stop words that are <<managed-resources.adoc#managed-resources,managed from a REST API.>>*Arguments:*@@ -836,12 +811,11 @@ With this configuration the set of words is named "english" and can be managed v</analyzer>-----See <<FilterDescriptions-StopFilter,Stop Filter>> for example input/output.+See <<Stop Filter>> for example input/output.-[[FilterDescriptions-ManagedSynonymFilter]]== Managed Synonym Filter-This is specialized version of the <<FilterDescriptions-SynonymFilter,Synonym Filter Factory>> that uses a mapping on synonyms that is <<managed-resources.adoc#managed-resources,managed from a REST API.>>+This is specialized version of the <<Synonym Filter>> that uses a mapping on synonyms that is <<managed-resources.adoc#managed-resources,managed from a REST API.>>.Managed Synonym Filter has been Deprecated[WARNING]@@ -851,12 +825,11 @@ Managed Synonym Filter has been deprecated in favor of Managed Synonym Graph Fil*Factory class:* `solr.ManagedSynonymFilterFactory`-For arguments and examples, see the Managed Synonym Graph Filter below.+For arguments and examples, see the <<Managed Synonym Graph Filter>> below.-[[FilterDescriptions-ManagedSynonymGraphFilter]]== Managed Synonym Graph Filter-This is specialized version of the <<FilterDescriptions-SynonymGraphFilter,Synonym Graph Filter Factory>> that uses a mapping on synonyms that is <<managed-resources.adoc#managed-resources,managed from a REST API.>>+This is specialized version of the <<Synonym Graph Filter>> that uses a mapping on synonyms that is <<managed-resources.adoc#managed-resources,managed from a REST API.>>This filter maps single- or multi-token synonyms, producing a fully correct graph output. This filter is a replacement for the Managed Synonym Filter, which produces incorrect graphs for multi-token synonyms.@@ -881,9 +854,8 @@ With this configuration the set of mappings is named "english" and can be manage</analyzer>-----See <<FilterDescriptions-ManagedSynonymFilter,Managed Synonym Filter>> for example input/output.+See <<Managed Synonym Filter>> for example input/output.-[[FilterDescriptions-N-GramFilter]]== N-Gram FilterGenerates n-gram tokens of sizes in the given range. Note that tokens are ordered by position and then by gram size.@@ -950,7 +922,6 @@ A range of 3 to 5.*Out:* "fou", "four", "our", "sco", "scor", "score", "cor", "core", "ore"-[[FilterDescriptions-NumericPayloadTokenFilter]]== Numeric Payload Token FilterThis filter adds a numeric floating point payload value to tokens that match a given type. Refer to the Javadoc for the `org.apache.lucene.analysis.Token` class for more information about token types and payloads.@@ -979,7 +950,6 @@ This filter adds a numeric floating point payload value to tokens that match a g*Out:* "bing"[0.75], "bang"[0.75], "boom"[0.75]-[[FilterDescriptions-PatternReplaceFilter]]== Pattern Replace FilterThis filter applies a regular expression to each token and, for those that match, substitutes the given replacement string in place of the matched pattern. Tokens which do not match are passed though unchanged.@@ -1048,7 +1018,6 @@ More complex pattern with capture group reference in the replacement. Tokens tha*Out:* "cat", "foo_1234", "9987", "blah1234foo"-[[FilterDescriptions-PhoneticFilter]]== Phonetic FilterThis filter creates tokens using one of the phonetic encoding algorithms in the `org.apache.commons.codec.language` package. For more information, see the section on <<phonetic-matching.adoc#phonetic-matching,Phonetic Matching>>.@@ -1119,7 +1088,6 @@ Default Soundex encoder.*Out:* "four"(1), "F600"(1), "score"(2), "S600"(2), "and"(3), "A530"(3), "twenty"(4), "T530"(4)-[[FilterDescriptions-PorterStemFilter]]== Porter Stem FilterThis filter applies the Porter Stemming Algorithm for English. The results are similar to using the Snowball Porter Stemmer with the `language="English"` argument. But this stemmer is coded directly in Java and is not based on Snowball. It does not accept a list of protected words and is only appropriate for English language text. However, it has been benchmarked as http://markmail.org/thread/d2c443z63z37rwf6[four times faster] than the English Snowball stemmer, so can provide a performance enhancement.@@ -1144,7 +1112,6 @@ This filter applies the Porter Stemming Algorithm for English. The results are s*Out:* "jump", "jump", "jump"-[[FilterDescriptions-RemoveDuplicatesTokenFilter]]== Remove Duplicates Token FilterThe filter removes duplicate tokens in the stream. Tokens are considered to be duplicates ONLY if they have the same text and position values.@@ -1223,7 +1190,6 @@ This filter reverses tokens to provide faster leading wildcard and prefix querie*Out:* "oof*", "rab*"-[[FilterDescriptions-ShingleFilter]]== Shingle FilterThis filter constructs shingles, which are token n-grams, from the token stream. It combines runs of tokens into a single token.@@ -1278,7 +1244,6 @@ A shingle size of four, do not include original token.*Out:* "To be"(1), "To be or"(1), "To be or not"(1), "be or"(2), "be or not"(2), "be or not to"(2), "or not"(3), "or not to"(3), "or not to be"(3), "not to"(4), "not to be"(4), "to be"(5)-[[FilterDescriptions-SnowballPorterStemmerFilter]]== Snowball Porter Stemmer FilterThis filter factory instantiates a language-specific stemmer generated by Snowball. Snowball is a software package that generates pattern-based word stemmers. This type of stemmer is not as accurate as a table-based stemmer, but is faster and less complex. Table-driven stemmers are labor intensive to create and maintain and so are typically commercial products.@@ -1349,7 +1314,6 @@ Spanish stemmer, Spanish words:*Out:* "cant", "cant"-[[FilterDescriptions-StandardFilter]]== Standard FilterThis filter removes dots from acronyms and the substring "'s" from the end of tokens. This filter depends on the tokens being tagged with the appropriate term-type to recognize acronyms and words with apostrophes.@@ -1363,7 +1327,6 @@ This filter removes dots from acronyms and the substring "'s" from the end of toThis filter is no longer operational in Solr when the `luceneMatchVersion` (in `solrconfig.xml`) is higher than "3.1".====-[[FilterDescriptions-StopFilter]]== Stop FilterThis filter discards, or _stops_ analysis of, tokens that are on the given stop words list. A standard stop words list is included in the Solr `conf` directory, named `stopwords.txt`, which is appropriate for typical English language text.@@ -1414,10 +1377,9 @@ Case-sensitive matching, capitalized words not stopped. Token positions skip sto*Out:* "what"(4)-[[FilterDescriptions-SuggestStopFilter]]== Suggest Stop Filter-Like <<FilterDescriptions-StopFilter,Stop Filter>>, this filter discards, or _stops_ analysis of, tokens that are on the given stop words list.+Like <<Stop Filter>>, this filter discards, or _stops_ analysis of, tokens that are on the given stop words list.Suggest Stop Filter differs from Stop Filter in that it will not remove the last token unless it is followed by a token separator. For example, a query `"find the"` would preserve the `'the'` since it was not followed by a space, punctuation etc., and mark it as a `KEYWORD` so that following filters will not change or remove it.@@ -1455,7 +1417,6 @@ By contrast, a query like "`find the popsicle`" would remove '`the`' as a stopwo*Out:* "the"(2)-[[FilterDescriptions-SynonymFilter]]== Synonym FilterThis filter does synonym mapping. Each token is looked up in the list of synonyms and if a match is found, then the synonym is emitted in place of the token. The position value of the new tokens are set such they all occur at the same position as the original token.@@ -1470,7 +1431,6 @@ Synonym Filter has been deprecated in favor of Synonym Graph Filter, which is reFor arguments and examples, see the Synonym Graph Filter below.-[[FilterDescriptions-SynonymGraphFilter]]== Synonym Graph FilterThis filter maps single- or multi-token synonyms, producing a fully correct graph output. This filter is a replacement for the Synonym Filter, which produces incorrect graphs for multi-token synonyms.@@ -1542,7 +1502,6 @@ small => tiny,teeny,weeny*Out:* "the"(1), "large"(2), "large"(3), "couch"(4), "sofa"(4), "divan"(4)-[[FilterDescriptions-TokenOffsetPayloadFilter]]== Token Offset Payload FilterThis filter adds the numeric character offsets of the token as a payload value for that token.@@ -1567,7 +1526,6 @@ This filter adds the numeric character offsets of the token as a payload value f*Out:* "bing"[0,4], "bang"[5,9], "boom"[10,14]-[[FilterDescriptions-TrimFilter]]== Trim FilterThis filter trims leading and/or trailing whitespace from tokens. Most tokenizers break tokens at whitespace, so this filter is most often used for special situations.@@ -1596,7 +1554,6 @@ The PatternTokenizerFactory configuration used here splits the input on simple c*Out:* "one", "two", "three", "four"-[[FilterDescriptions-TypeAsPayloadFilter]]== Type As Payload FilterThis filter adds the token's type, as an encoded byte sequence, as its payload.@@ -1621,10 +1578,9 @@ This filter adds the token's type, as an encoded byte sequence, as its payload.*Out:* "Pay"[<ALPHANUM>], "Bob's"[<APOSTROPHE>], "I.O.U."[<ACRONYM>]-[[FilterDescriptions-TypeTokenFilter]]== Type Token Filter-This filter blacklists or whitelists a specified list of token types, assuming the tokens have type metadata associated with them. For example, the <<tokenizers.adoc#Tokenizers-UAX29URLEmailTokenizer,UAX29 URL Email Tokenizer>> emits "<URL>" and "<EMAIL>" typed tokens, as well as other types. This filter would allow you to pull out only e-mail addresses from text as tokens, if you wish.+This filter blacklists or whitelists a specified list of token types, assuming the tokens have type metadata associated with them. For example, the <<tokenizers.adoc#uax29-url-email-tokenizer,UAX29 URL Email Tokenizer>> emits "<URL>" and "<EMAIL>" typed tokens, as well as other types. This filter would allow you to pull out only e-mail addresses from text as tokens, if you wish.*Factory class:* `solr.TypeTokenFilterFactory`@@ -1645,7 +1601,6 @@ This filter blacklists or whitelists a specified list of token types, assuming t</analyzer>-----[[FilterDescriptions-WordDelimiterFilter]]== Word Delimiter FilterThis filter splits tokens at word delimiters.@@ -1660,7 +1615,6 @@ Word Delimiter Filter has been deprecated in favor of Word Delimiter Graph FilteFor a full description, including arguments and examples, see the Word Delimiter Graph Filter below.-[[FilterDescriptions-WordDelimiterGraphFilter]]== Word Delimiter Graph FilterThis filter splits tokens at word delimiters.diff --git a/solr/solr-ref-guide/src/function-queries.adoc b/solr/solr-ref-guide/src/function-queries.adocindex 29cca9cd9bf..5a9f6dfda5a 100644--- a/solr/solr-ref-guide/src/function-queries.adoc+++ b/solr/solr-ref-guide/src/function-queries.adoc@@ -25,14 +25,13 @@ Function queries are supported by the <<the-dismax-query-parser.adoc#the-dismax-Function queries use _functions_. The functions can be a constant (numeric or string literal), a field, another function or a parameter substitution argument. You can use these functions to modify the ranking of results for users. These could be used to change the ranking of results based on a user's location, or some other calculation.-[[FunctionQueries-UsingFunctionQuery]]== Using Function QueryFunctions must be expressed as function calls (for example, `sum(a,b)` instead of simply `a+b`).There are several ways of using function queries in a Solr query:-* Via an explicit QParser that expects function arguments, such <<other-parsers.adoc#OtherParsers-FunctionQueryParser,`func`>> or <<other-parsers.adoc#OtherParsers-FunctionRangeQueryParser,`frange`>> . For example:+* Via an explicit QParser that expects function arguments, such <<other-parsers.adoc#function-query-parser,`func`>> or <<other-parsers.adoc#function-range-query-parser,`frange`>> . For example:+[source,text]----@@ -76,7 +75,6 @@ q=_val_:mynumericfield _val_:"recip(rord(myfield),1,2,3)"Only functions with fast random access are recommended.-[[FunctionQueries-AvailableFunctions]]== Available FunctionsThe table below summarizes the functions available for function queries.@@ -89,7 +87,7 @@ Returns the absolute value of the specified value or function.* `abs(x)` `abs(-5)`=== childfield(field) Function-Returns the value of the given field for one of the matched child docs when searching by <<other-parsers.adoc#OtherParsers-BlockJoinParentQueryParser,{!parent}>>. It can be used only in `sort` parameter.+Returns the value of the given field for one of the matched child docs when searching by <<other-parsers.adoc#block-join-parent-query-parser,{!parent}>>. It can be used only in `sort` parameter.*Syntax Examples*@@ -149,7 +147,6 @@ You can quote the term if it's more complex, or do parameter substitution for th* `docfreq(text,'solr')`* `...&defType=func` `&q=docfreq(text,$myterm)&myterm=solr`-[[FunctionQueries-field]]=== field FunctionReturns the numeric docValues or indexed value of the field with the specified name. In its simplest (single argument) form, this function can only be used on single valued fields, and can be called using the name of the field as a string, or for most conventional field names simply use the field name by itself with out using the `field(...)` syntax.@@ -232,7 +229,7 @@ If the value of `x` does not fall between `min` and `max`, then either the value=== max FunctionReturns the maximum numeric value of multiple nested functions or constants, which are specified as arguments: `max(x,y,...)`. The `max` function can also be useful for "bottoming out" another function or field at some specified constant.-Use the `field(myfield,max)` syntax for <<FunctionQueries-field,selecting the maximum value of a single multivalued field>>.+Use the `field(myfield,max)` syntax for <<field Function,selecting the maximum value of a single multivalued field>>.*Syntax Example*@@ -248,7 +245,7 @@ Returns the number of documents in the index, including those that are marked as=== min FunctionReturns the minimum numeric value of multiple nested functions of constants, which are specified as arguments: `min(x,y,...)`. The `min` function can also be useful for providing an "upper bound" on a function using a constant.-Use the `field(myfield,min)` <<FunctionQueries-field,syntax for selecting the minimum value of a single multivalued field>>.+Use the `field(myfield,min)` <<field Function,syntax for selecting the minimum value of a single multivalued field>>.*Syntax Example*@@ -502,8 +499,6 @@ Returns `true` if any member of the field exists.*Syntax Example** `if(lt(ms(mydatefield),315569259747),0.8,1)` translates to this pseudocode: `if mydatefield < 315569259747 then 0.8 else 1`--[[FunctionQueries-ExampleFunctionQueries]]== Example Function QueriesTo give you a better understanding of how function queries can be used in Solr, suppose an index stores the dimensions in meters x,y,z of some hypothetical boxes with arbitrary names stored in field `boxname`. Suppose we want to search for box matching name `findbox` but ranked according to volumes of boxes. The query parameters would be:@@ -521,7 +516,6 @@ Suppose that you also have a field storing the weight of the box as `weight`. Tohttp://localhost:8983/solr/collection_name/select?q=boxname:findbox _val_:"div(weight,product(x,y,z))"&fl=boxname x y z weight score-----[[FunctionQueries-SortByFunction]]== Sort By FunctionYou can sort your query results by the output of a function. For example, to sort results by distance, you could enter:diff --git a/solr/solr-ref-guide/src/graph-traversal.adoc b/solr/solr-ref-guide/src/graph-traversal.adocindex 007019bb2ac..a23b32e7d52 100644--- a/solr/solr-ref-guide/src/graph-traversal.adoc+++ b/solr/solr-ref-guide/src/graph-traversal.adoc@@ -31,7 +31,6 @@ The `nodes` function can be combined with the `scoreNodes` function to provide rThis document assumes a basic understanding of graph terminology and streaming expressions. You can begin exploring graph traversal concepts with this https://en.wikipedia.org/wiki/Graph_traversal[Wikipedia article]. More details about streaming expressions are available in this Guide, in the section <<streaming-expressions.adoc#streaming-expressions,Streaming Expressions>>.====-[[GraphTraversal-BasicSyntax]]== Basic SyntaxWe'll start with the most basic syntax and slowly build up more complexity. The most basic syntax for `nodes` is:@@ -161,7 +160,6 @@ When scattering both branches and leaves the output would like this:Now the level 0 root node is included in the output.-[[GraphTraversal-Aggregations]]== Aggregations`nodes` also supports aggregations. For example:@@ -182,8 +180,7 @@ Edges are uniqued as part of the traversal so the count will *not* reflect the nThe aggregation functions supported are `count(*)`, `sum(field)`, `min(field)`, `max(field)`, and `avg(field)`. The fields being aggregated should be present in the edges collected during the traversal. Later examples (below) will show aggregations can be a powerful tool for providing recommendations and limiting the scope of traversals.-[[GraphTraversal-Nestingnodesfunctions]]-== Nesting nodes functions+== Nesting nodes FunctionsThe `nodes` function can be nested to traverse deeper into the graph. For example:@@ -207,14 +204,12 @@ Put more simply, the inner expression gathers all the people that "\johndoe@apacThis construct of nesting `nodes` functions is the basic technique for doing a controlled traversal through the graph.-[[GraphTraversal-CycleDetection]]== Cycle DetectionThe `nodes` function performs cycle detection across the entire traversal. This ensures that nodes that have already been visited are not traversed again. Cycle detection is important for both limiting the size of traversals and gathering accurate aggregations. Without cycle detection the size of the traversal could grow exponentially with each hop in the traversal. With cycle detection only new nodes encountered are traversed.Cycle detection *does not* cross collection boundaries. This is because internally the collection name is part of the node ID. For example the node ID "\[email protected]", is really `emails/[email protected]`. When traversing to another collection "\[email protected]" will be traversed.-[[GraphTraversal-FilteringtheTraversal]]== Filtering the TraversalEach level in the traversal can be filtered with a filter query. For example:@@ -229,7 +224,6 @@ nodes(emails,In the example above only emails that match the filter query will be included in the traversal. Any Solr query can be included here. So you can do fun things like <<spatial-search.adoc#spatial-search,geospatial queries>>, apply any of the available <<query-syntax-and-parsing.adoc#query-syntax-and-parsing,query parsers>>, or even write custom query parsers to limit the traversal.-[[GraphTraversal-RootStreams]]== Root StreamsAny streaming expression can be used to provide the root nodes for a traversal. For example:@@ -246,7 +240,6 @@ The example above provides the root nodes through a search expression. You can aNotice that the `walk` parameter maps a field from the tuples generated by the inner stream. In this case it maps the `to` field from the inner stream to the `from` field.-[[GraphTraversal-SkippingHighFrequencyNodes]]== Skipping High Frequency NodesIt's often desirable to skip traversing high frequency nodes in the graph. This is similar in nature to a search term stop list. The best way to describe this is through an example use case.@@ -277,7 +270,6 @@ The `nodes` function has the `maxDocFreq` param to allow for filtering out highIn the example above, the inner search expression searches the `logs` collection and returning all the articles viewed by "user1". The outer `nodes` expression takes all the articles emitted from the inner search expression and finds all the records in the logs collection for those articles. It then gathers and aggregates the users that have read the articles. The `maxDocFreq` parameter limits the articles returned to those that appear in no more then 10,000 log records (per shard). This guards against returning articles that have been viewed by millions of users.-[[GraphTraversal-TrackingtheTraversal]]== Tracking the TraversalBy default the `nodes` function only tracks enough information to do cycle detection. This provides enough information to output the nodes and aggregations in the graph.@@ -298,7 +290,6 @@ nodes(emails,gather="to")-----[[GraphTraversal-Cross-CollectionTraversals]]== Cross-Collection TraversalsNested `nodes` functions can operate on different SolrCloud collections. This allow traversals to "walk" from one collection to another to gather nodes. Cycle detection does not cross collection boundaries, so nodes collected in one collection will be traversed in a different collection. This was done deliberately to support cross-collection traversals. Note that the output from a cross-collection traversal will likely contain duplicate nodes with different collection attributes.@@ -320,7 +311,6 @@ nodes(logs,The example above finds all people who sent emails with a body that contains "solr rocks". It then finds all the people these people have emailed. Then it traverses to the logs collection and gathers all the content IDs that these people have edited.-[[GraphTraversal-CombiningnodesWithOtherStreamingExpressions]]== Combining nodes With Other Streaming ExpressionsThe `nodes` function can act as both a stream source and a stream decorator. The connection with the wider stream expression library provides tremendous power and flexibility when performing graph traversals. Here is an example of using the streaming expression library to intersect two friend networks:@@ -348,10 +338,8 @@ The `nodes` function can act as both a stream source and a stream decorator. TheThe example above gathers two separate friend networks, one rooted with "\[email protected]" and another rooted with "\[email protected]". The friend networks are then sorted by the `node` field, and intersected. The resulting node set will be the intersection of the two friend networks.-[[GraphTraversal-SampleUseCases]]-== Sample Use Cases+== Sample Use Cases for Graph Traversal-[[GraphTraversal-CalculateMarketBasketCo-occurrence]]=== Calculate Market Basket Co-occurrenceIt is often useful to know which products are most frequently purchased with a particular product. This example uses a simple market basket table (indexed in Solr) to store past shopping baskets. The schema for the table is very simple with each row containing a `basketID` and a `productID`. This can be seen as a graph with each row in the table representing an edge. And it can be traversed very quickly to calculate basket co-occurrence, even when the graph contains billions of edges.@@ -378,15 +366,13 @@ Let's break down exactly what this traversal is doing.In a nutshell this expression finds the products that most frequently co-occur with product "ABC" in past shopping baskets.-[[GraphTraversal-UsingthescoreNodesFunctiontoMakeaRecommendation]]=== Using the scoreNodes Function to Make a Recommendation-This use case builds on the market basket example <<GraphTraversal-CalculateMarketBasketCo-occurrence,above>> that calculates which products co-occur most frequently with productID:ABC. The ranked co-occurrence counts provide candidates for a recommendation. The `scoreNodes` function can be used to score the candidates to find the best recommendation.+This use case builds on the market basket example <<Calculate Market Basket Co-occurrence,above>> that calculates which products co-occur most frequently with productID:ABC. The ranked co-occurrence counts provide candidates for a recommendation. The `scoreNodes` function can be used to score the candidates to find the best recommendation.Before diving into the syntax of the `scoreNodes` function it's useful to understand why the raw co-occurrence counts may not produce the best recommendation. The reason is that raw co-occurrence counts favor items that occur frequently across all baskets. A better recommendation would find the product that has the most significant relationship with productID ABC. The `scoreNodes` function uses a term frequency-inverse document frequency (TF-IDF) algorithm to find the most significant relationship.-[[GraphTraversal-HowItWorks]]-==== *How It Works*+==== How scoreNodes WorksThe `scoreNodes` function assigns a score to each node emitted by the nodes expression. By default the `scoreNodes` function uses the `count(*)` aggregation, which is the co-occurrence count, as the TF value. The IDF value for each node is fetched from the collection where the node was gathered. Each node is then scored using the TF*IDF formula, which provides a boost to nodes with a lower frequency across all market baskets.@@ -394,8 +380,7 @@ Combining the co-occurrence count with the IDF provides a score that shows how iThe `scoreNodes` function adds the score to each node in the `nodeScore` field.-[[GraphTraversal-ExampleSyntax]]-==== *Example Syntax*+==== Example scoreNodes Syntax[source,plain]----@@ -417,7 +402,6 @@ This example builds on the earlier example "Calculate market basket co-occurrenc. The `scoreNodes` function then assigns a score to the candidates based on the TF*IDF of each node.. The outer `top` expression selects the highest scoring node. This is the recommendation.-[[GraphTraversal-RecommendContentBasedonCollaborativeFilter]]=== Recommend Content Based on Collaborative FilterIn this example we'll recommend content for a user based on a collaborative filter. This recommendation is made using log records that contain the `userID` and `articleID` and the action performed. In this scenario each log record can be viewed as an edge in a graph. The userID and articleID are the nodes and the action is an edge property used to filter the traversal.@@ -458,7 +442,6 @@ Note that it skips high frequency nodes using the `maxDocFreq` param to filter oAny article selected in step 1 (user1 reading list), will not appear in this step due to cycle detection. So this step returns the articles read by the users with the most similar readings habits to "user1" that "user1" has not read yet. It also counts the number of times each article has been read across this user group.. The outer `top` expression takes the top articles emitted from step 4. This is the recommendation.-[[GraphTraversal-ProteinPathwayTraversal]]=== Protein Pathway TraversalIn recent years, scientists have become increasingly able to rationally design drugs that target the mutated proteins, called oncogenes, responsible for some cancers. Proteins typically act through long chains of chemical interactions between multiple proteins, called pathways, and, while the oncogene in the pathway may not have a corresponding drug, another protein in the pathway may. Graph traversal on a protein collection that records protein interactions and drugs may yield possible candidates. (Thanks to Lewis Geer of the NCBI, for providing this example).@@ -481,7 +464,6 @@ Let's break down exactly what this traversal is doing.. The outer `nodes` expression also works with the `proteins` collection. It gathers all the drugs that correspond to proteins emitted from step 1.. Using this stepwise approach you can gather the drugs along the pathway of interactions any number of steps away from the root protein.-[[GraphTraversal-ExportingGraphMLtoSupportGraphVisualization]]== Exporting GraphML to Support Graph VisualizationIn the examples above, the `nodes` expression was sent to Solr's `/stream` handler like any other streaming expression. This approach outputs the nodes in the same JSON tuple format as other streaming expressions so that it can be treated like any other streaming expression. You can use the `/stream` handler when you need to operate directly on the tuples, such as in the recommendation use cases above.@@ -496,8 +478,7 @@ There are a few things to keep mind when exporting a graph in GraphML:. The `/graph` handler currently accepts an arbitrarily complex streaming expression which includes a `nodes` expression. If the streaming expression doesn't include a `nodes` expression, the `/graph` handler will not properly output GraphML.. The `/graph` handler currently accepts a single arbitrarily complex, nested `nodes` expression per request. This means you cannot send in a streaming expression that joins or intersects the node sets from multiple `nodes` expressions. The `/graph` handler does support any level of nesting within a single `nodes` expression. The `/stream` handler does support joining and intersecting node sets, but the `/graph` handler currently does not.-[[GraphTraversal-SampleRequest]]-=== Sample Request+=== Sample GraphML Request[source,bash]----@@ -512,7 +493,6 @@ curl --data-urlencode 'expr=nodes(enron_emails,gather="to")' http://localhost:8983/solr/enron_emails/graph-----[[GraphTraversal-SampleGraphMLOutput]]=== Sample GraphML Output[source,xml]diff --git a/solr/solr-ref-guide/src/hadoop-authentication-plugin.adoc b/solr/solr-ref-guide/src/hadoop-authentication-plugin.adocindex 7fc1943459a..7ed0a156f29 100644--- a/solr/solr-ref-guide/src/hadoop-authentication-plugin.adoc+++ b/solr/solr-ref-guide/src/hadoop-authentication-plugin.adoc@@ -30,7 +30,7 @@ For some of the authentication schemes (e.g., Kerberos), Solr provides a nativeThere are two plugin classes:-* `HadoopAuthPlugin`: This can be used with standalone Solr as well as Solrcloud with <<authentication-and-authorization-plugins.adoc#AuthenticationandAuthorizationPlugins-PKI,PKI authentication>> for internode communication.+* `HadoopAuthPlugin`: This can be used with standalone Solr as well as Solrcloud with <<authentication-and-authorization-plugins.adoc#securing-inter-node-requests,PKI authentication>> for internode communication.* `ConfigurableInternodeAuthHadoopPlugin`: This is an extension of HadoopAuthPlugin that allows you to configure the authentication scheme for internode communication.[TIP]diff --git a/solr/solr-ref-guide/src/implicit-requesthandlers.adoc b/solr/solr-ref-guide/src/implicit-requesthandlers.adocindex 3c87f8c9554..c10d93bc0d9 100644--- a/solr/solr-ref-guide/src/implicit-requesthandlers.adoc+++ b/solr/solr-ref-guide/src/implicit-requesthandlers.adoc@@ -20,7 +20,6 @@Solr ships with many out-of-the-box RequestHandlers, which are called implicit because they are not configured in `solrconfig.xml`.-[[ImplicitRequestHandlers-ListofImplicitlyAvailableEndpoints]]== List of Implicitly Available Endpoints// TODO: Change column width to %autowidth.spread when https://github.com/asciidoctor/asciidoctor-pdf/issues/599 is fixed@@ -44,19 +43,18 @@ Solr ships with many out-of-the-box RequestHandlers, which are called implicit b|`/debug/dump` |{solr-javadocs}/solr-core/org/apache/solr/handler/DumpRequestHandler.html[DumpRequestHandler] |`_DEBUG_DUMP` |Echo the request contents back to the client.|<<exporting-result-sets.adoc#exporting-result-sets,`/export`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/component/SearchHandler.html[SearchHandler] |`_EXPORT` |Export full sorted result sets.|<<realtime-get.adoc#realtime-get,`/get`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/RealTimeGetHandler.html[RealTimeGetHandler] |`_GET` |Real-time get: low-latency retrieval of the latest version of a document.-|<<graph-traversal.adoc#GraphTraversal-ExportingGraphMLtoSupportGraphVisualization,`/graph`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/GraphHandler.html[GraphHandler] |`_ADMIN_GRAPH` |Return http://graphml.graphdrawing.org/[GraphML] formatted output from a <<graph-traversal.adoc#graph-traversal,`gather` `Nodes` streaming expression>>.+|<<graph-traversal.adoc#exporting-graphml-to-support-graph-visualization,`/graph`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/GraphHandler.html[GraphHandler] |`_ADMIN_GRAPH` |Return http://graphml.graphdrawing.org/[GraphML] formatted output from a <<graph-traversal.adoc#graph-traversal,`gather` `Nodes` streaming expression>>.|<<index-replication.adoc#index-replication,`/replication`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/ReplicationHandler.html[ReplicationHandler] |`_REPLICATION` |Replicate indexes for SolrCloud recovery and Master/Slave index distribution.|<<schema-api.adoc#schema-api,`/schema`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/SchemaHandler.html[SchemaHandler] |`_SCHEMA` |Retrieve/modify Solr schema.|<<parallel-sql-interface.adoc#sql-request-handler,`/sql`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/SQLHandler.html[SQLHandler] |`_SQL` |Front end of the Parallel SQL interface.-|<<streaming-expressions.adoc#StreamingExpressions-StreamingRequestsandResponses,`/stream`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/StreamHandler.html[StreamHandler] |`_STREAM` |Distributed stream processing.-|<<the-terms-component.adoc#TheTermsComponent-UsingtheTermsComponentinaRequestHandler,`/terms`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/component/SearchHandler.html[SearchHandler] |`_TERMS` |Return a field's indexed terms and the number of documents containing each term.+|<<streaming-expressions.adoc#streaming-requests-and-responses,`/stream`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/StreamHandler.html[StreamHandler] |`_STREAM` |Distributed stream processing.+|<<the-terms-component.adoc#using-the-terms-component-in-a-request-handler,`/terms`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/component/SearchHandler.html[SearchHandler] |`_TERMS` |Return a field's indexed terms and the number of documents containing each term.|<<uploading-data-with-index-handlers.adoc#uploading-data-with-index-handlers,`/update`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/UpdateRequestHandler.html[UpdateRequestHandler] |`_UPDATE` |Add, delete and update indexed documents formatted as SolrXML, CSV, SolrJSON or javabin.-|<<uploading-data-with-index-handlers.adoc#UploadingDatawithIndexHandlers-CSVUpdateConveniencePaths,`/update/csv`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/UpdateRequestHandler.html[UpdateRequestHandler] |`_UPDATE_CSV` |Add and update CSV-formatted documents.-|<<uploading-data-with-index-handlers.adoc#UploadingDatawithIndexHandlers-CSVUpdateConveniencePaths,`/update/json`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/UpdateRequestHandler.html[UpdateRequestHandler] |`_UPDATE_JSON` |Add, delete and update SolrJSON-formatted documents.+|<<uploading-data-with-index-handlers.adoc#csv-update-convenience-paths,`/update/csv`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/UpdateRequestHandler.html[UpdateRequestHandler] |`_UPDATE_CSV` |Add and update CSV-formatted documents.+|<<uploading-data-with-index-handlers.adoc#csv-update-convenience-paths,`/update/json`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/UpdateRequestHandler.html[UpdateRequestHandler] |`_UPDATE_JSON` |Add, delete and update SolrJSON-formatted documents.|<<transforming-and-indexing-custom-json.adoc#transforming-and-indexing-custom-json,`/update/json/docs`>> |{solr-javadocs}/solr-core/org/apache/solr/handler/UpdateRequestHandler.html[UpdateRequestHandler] |`_UPDATE_JSON_DOCS` |Add and update custom JSON-formatted documents.|===-[[ImplicitRequestHandlers-HowtoViewtheConfiguration]]== How to View the ConfigurationYou can see configuration for all request handlers, including the implicit request handlers, via the <<config-api.adoc#config-api,Config API>>. E.g. for the `gettingstarted` collection:@@ -71,7 +69,6 @@ To include the expanded paramset in the response, as well as the effective param`curl "http://localhost:8983/solr/gettingstarted/config/requestHandler?componentName=/export&expandParams=true"`-[[ImplicitRequestHandlers-HowtoEdittheConfiguration]]== How to Edit the ConfigurationBecause implicit request handlers are not present in `solrconfig.xml`, configuration of their associated `default`, `invariant` and `appends` parameters may be edited via<<request-parameters-api.adoc#request-parameters-api, Request Parameters API>> using the paramset listed in the above table. However, other parameters, including SearchHandler components, may not be modified. The invariants and appends specified in the implicit configuration cannot be overridden.diff --git a/solr/solr-ref-guide/src/index-replication.adoc b/solr/solr-ref-guide/src/index-replication.adocindex 774b78cde75..8c5134154b1 100644--- a/solr/solr-ref-guide/src/index-replication.adoc+++ b/solr/solr-ref-guide/src/index-replication.adoc@@ -26,7 +26,6 @@ The figure below shows a Solr configuration using index replication. The masterimage::images/index-replication/worddav2b7e14725d898b4104cdd9c502fc77cd.png[image,width=159,height=235]-[[IndexReplication-IndexReplicationinSolr]]== Index Replication in SolrSolr includes a Java implementation of index replication that works over HTTP:@@ -46,7 +45,6 @@ Although there is no explicit concept of "master/slave" nodes in a <<solrcloud.aWhen using SolrCloud, the `ReplicationHandler` must be available via the `/replication` path. Solr does this implicitly unless overridden explicitly in your `solrconfig.xml`, but if you wish to override the default behavior, make certain that you do not explicitly set any of the "master" or "slave" configuration options mentioned below, or they will interfere with normal SolrCloud operation.====-[[IndexReplication-ReplicationTerminology]]== Replication TerminologyThe table below defines the key terms associated with Solr replication.@@ -79,15 +77,13 @@ Snapshot::A directory containing hard links to the data files of an index. Snapshots are distributed from the master nodes when the slaves pull them, "smart copying" any segments the slave node does not have in snapshot directory that contains the hard links to the most recent index data files.-[[IndexReplication-ConfiguringtheReplicationHandler]]== Configuring the ReplicationHandlerIn addition to `ReplicationHandler` configuration options specific to the master/slave roles, there are a few special configuration options that are generally supported (even when using SolrCloud).* `maxNumberOfBackups` an integer value dictating the maximum number of backups this node will keep on disk as it receives `backup` commands.-* Similar to most other request handlers in Solr you may configure a set of <<requesthandlers-and-searchcomponents-in-solrconfig.adoc#RequestHandlersandSearchComponentsinSolrConfig-SearchHandlers,defaults, invariants, and/or appends>> parameters corresponding with any request parameters supported by the `ReplicationHandler` when <<IndexReplication-HTTPAPICommandsfortheReplicationHandler,processing commands>>.+* Similar to most other request handlers in Solr you may configure a set of <<requesthandlers-and-searchcomponents-in-solrconfig.adoc#searchhandlers,defaults, invariants, and/or appends>> parameters corresponding with any request parameters supported by the `ReplicationHandler` when <<HTTP API Commands for the ReplicationHandler,processing commands>>.-[[IndexReplication-ConfiguringtheReplicationRequestHandleronaMasterServer]]=== Configuring the Replication RequestHandler on a Master ServerBefore running a replication, you should set the following parameters on initialization of the handler:@@ -125,7 +121,6 @@ The example below shows a possible 'master' configuration for the `ReplicationHa</requestHandler>-----[[IndexReplication-Replicatingsolrconfig.xml]]==== Replicating solrconfig.xmlIn the configuration file on the master server, include a line like the following:@@ -139,7 +134,6 @@ This ensures that the local configuration `solrconfig_slave.xml` will be saved aOn the master server, the file name of the slave configuration file can be anything, as long as the name is correctly identified in the `confFiles` string; then it will be saved as whatever file name appears after the colon ':'.-[[IndexReplication-ConfiguringtheReplicationRequestHandleronaSlaveServer]]=== Configuring the Replication RequestHandler on a Slave ServerThe code below shows how to configure a ReplicationHandler on a slave.@@ -188,7 +182,6 @@ The code below shows how to configure a ReplicationHandler on a slave.</requestHandler>-----[[IndexReplication-SettingUpaRepeaterwiththeReplicationHandler]]== Setting Up a Repeater with the ReplicationHandlerA master may be able to serve only so many slaves without affecting performance. Some organizations have deployed slave servers across multiple data centers. If each slave downloads the index from a remote data center, the resulting download may consume too much network bandwidth. To avoid performance degradation in cases like this, you can configure one or more slaves as repeaters. A repeater is simply a node that acts as both a master and a slave.@@ -213,7 +206,6 @@ Here is an example of a ReplicationHandler configuration for a repeater:</requestHandler>-----[[IndexReplication-CommitandOptimizeOperations]]== Commit and Optimize OperationsWhen a commit or optimize operation is performed on the master, the RequestHandler reads the list of file names which are associated with each commit point. This relies on the `replicateAfter` parameter in the configuration to decide which types of events should trigger replication.@@ -233,7 +225,6 @@ The `replicateAfter` parameter can accept multiple arguments. For example:<str name="replicateAfter">optimize</str>-----[[IndexReplication-SlaveReplication]]== Slave ReplicationThe master is totally unaware of the slaves.@@ -246,7 +237,6 @@ The slave continuously keeps polling the master (depending on the `pollInterval`* After the download completes, all the new files are moved to the live index directory and the file's timestamp is same as its counterpart on the master.* A commit command is issued on the slave by the Slave's ReplicationHandler and the new index is loaded.-[[IndexReplication-ReplicatingConfigurationFiles]]=== Replicating Configuration FilesTo replicate configuration files, list them using using the `confFiles` parameter. Only files found in the `conf` directory of the master's Solr instance will be replicated.@@ -259,7 +249,6 @@ As a precaution when replicating configuration files, Solr copies configurationIf a replication involved downloading of at least one configuration file, the ReplicationHandler issues a core-reload command instead of a commit command.-[[IndexReplication-ResolvingCorruptionIssuesonSlaveServers]]=== Resolving Corruption Issues on Slave ServersIf documents are added to the slave, then the slave is no longer in sync with its master. However, the slave will not undertake any action to put itself in sync, until the master has new index data.@@ -268,7 +257,6 @@ When a commit operation takes place on the master, the index version of the mastTo correct this problem, the slave then copies all the index files from master to a new index directory and asks the core to load the fresh index from the new directory.-[[IndexReplication-HTTPAPICommandsfortheReplicationHandler]]== HTTP API Commands for the ReplicationHandlerYou can use the HTTP commands below to control the ReplicationHandler's operations.@@ -355,7 +343,6 @@ There are two supported parameters:* `location`: Location where the snapshot is created.-[[IndexReplication-DistributionandOptimization]]== Distribution and OptimizationOptimizing an index is not something most users should generally worry about - but in particular users should be aware of the impacts of optimizing an index when using the `ReplicationHandler`.diff --git a/solr/solr-ref-guide/src/indexconfig-in-solrconfig.adoc b/solr/solr-ref-guide/src/indexconfig-in-solrconfig.adocindex 63ab26dda8a..a592a2daf02 100644--- a/solr/solr-ref-guide/src/indexconfig-in-solrconfig.adoc+++ b/solr/solr-ref-guide/src/indexconfig-in-solrconfig.adoc@@ -29,10 +29,8 @@ By default, the settings are commented out in the sample `solrconfig.xml` includ</indexConfig>-----[[IndexConfiginSolrConfig-WritingNewSegments]]== Writing New Segments-[[IndexConfiginSolrConfig-ramBufferSizeMB]]=== ramBufferSizeMBOnce accumulated document updates exceed this much memory space (defined in megabytes), then the pending updates are flushed. This can also create new segments or trigger a merge. Using this setting is generally preferable to `maxBufferedDocs`. If both `maxBufferedDocs` and `ramBufferSizeMB` are set in `solrconfig.xml`, then a flush will occur when either limit is reached. The default is 100Mb.@@ -42,7 +40,6 @@ Once accumulated document updates exceed this much memory space (defined in mega<ramBufferSizeMB>100</ramBufferSizeMB>-----[[IndexConfiginSolrConfig-maxBufferedDocs]]=== maxBufferedDocsSets the number of document updates to buffer in memory before they are flushed as a new segment. This may also trigger a merge. The default Solr configuration sets to flush by RAM usage (`ramBufferSizeMB`).@@ -52,20 +49,17 @@ Sets the number of document updates to buffer in memory before they are flushed<maxBufferedDocs>1000</maxBufferedDocs>-----[[IndexConfiginSolrConfig-useCompoundFile]]=== useCompoundFile-Controls whether newly written (and not yet merged) index segments should use the <<IndexConfiginSolrConfig-CompoundFileSegments,Compound File Segment>> format. The default is false.+Controls whether newly written (and not yet merged) index segments should use the <<Compound File Segments>> format. The default is false.[source,xml]----<useCompoundFile>false</useCompoundFile>-----[[IndexConfiginSolrConfig-MergingIndexSegments]]== Merging Index Segments-[[IndexConfiginSolrConfig-mergePolicyFactory]]=== mergePolicyFactoryDefines how merging segments is done.@@ -99,7 +93,6 @@ Choosing the best merge factors is generally a trade-off of indexing speed vs. sConversely, keeping more segments can accelerate indexing, because merges happen less often, making an update is less likely to trigger a merge. But searches become more computationally expensive and will likely be slower, because search terms must be looked up in more index segments. Faster index updates also means shorter commit turnaround times, which means more timely search results.-[[IndexConfiginSolrConfig-CustomizingMergePolicies]]=== Customizing Merge PoliciesIf the configuration options for the built-in merge policies do not fully suit your use case, you can customize them: either by creating a custom merge policy factory that you specify in your configuration, or by configuring a {solr-javadocs}/solr-core/org/apache/solr/index/WrapperMergePolicyFactory.html[merge policy wrapper] which uses a `wrapped.prefix` configuration option to control how the factory it wraps will be configured:@@ -117,7 +110,6 @@ If the configuration options for the built-in merge policies do not fully suit yThe example above shows Solr's {solr-javadocs}/solr-core/org/apache/solr/index/SortingMergePolicyFactory.html[`SortingMergePolicyFactory`] being configured to sort documents in merged segments by `"timestamp desc"`, and wrapped around a `TieredMergePolicyFactory` configured to use the values `maxMergeAtOnce=10` and `segmentsPerTier=10` via the `inner` prefix defined by `SortingMergePolicyFactory` 's `wrapped.prefix` option. For more information on using `SortingMergePolicyFactory`, see <<common-query-parameters.adoc#CommonQueryParameters-ThesegmentTerminateEarlyParameter,the segmentTerminateEarly parameter>>.-[[IndexConfiginSolrConfig-mergeScheduler]]=== mergeSchedulerThe merge scheduler controls how merges are performed. The default `ConcurrentMergeScheduler` performs merges in the background using separate threads. The alternative, `SerialMergeScheduler`, does not perform merges with separate threads.@@ -127,7 +119,6 @@ The merge scheduler controls how merges are performed. The default `ConcurrentMe<mergeScheduler class="org.apache.lucene.index.ConcurrentMergeScheduler"/>-----[[IndexConfiginSolrConfig-mergedSegmentWarmer]]=== mergedSegmentWarmerWhen using Solr in for <<near-real-time-searching.adoc#near-real-time-searching,Near Real Time Searching>> a merged segment warmer can be configured to warm the reader on the newly merged segment, before the merge commits. This is not required for near real-time search, but will reduce search latency on opening a new near real-time reader after a merge completes.@@ -137,7 +128,6 @@ When using Solr in for <<near-real-time-searching.adoc#near-real-time-searching,<mergedSegmentWarmer class="org.apache.lucene.index.SimpleMergedSegmentWarmer"/>-----[[IndexConfiginSolrConfig-CompoundFileSegments]]== Compound File SegmentsEach Lucene segment is typically comprised of a dozen or so files. Lucene can be configured to bundle all of the files for a segment into a single compound file using a file extension of `.cfs`; it's an abbreviation for Compound File Segment.@@ -149,16 +139,14 @@ On systems where the number of open files allowed per process is limited, CFS ma.CFS: New Segments vs Merged Segments[NOTE]====-To configure whether _newly written segments_ should use CFS, see the <<IndexConfiginSolrConfig-useCompoundFile,`useCompoundFile`>> setting described above. To configure whether _merged segments_ use CFS, review the Javadocs for your <<IndexConfiginSolrConfig-mergePolicyFactory,`mergePolicyFactory`>> .+To configure whether _newly written segments_ should use CFS, see the <<useCompoundFile,`useCompoundFile`>> setting described above. To configure whether _merged segments_ use CFS, review the Javadocs for your <<mergePolicyFactory,`mergePolicyFactory`>> .-Many <<IndexConfiginSolrConfig-MergingIndexSegments,Merge Policy>> implementations support `noCFSRatio` and `maxCFSSegmentSizeMB` settings with default values that prevent compound files from being used for large segments, but do use compound files for small segments.+Many <<Merging Index Segments,Merge Policy>> implementations support `noCFSRatio` and `maxCFSSegmentSizeMB` settings with default values that prevent compound files from being used for large segments, but do use compound files for small segments.====-[[IndexConfiginSolrConfig-IndexLocks]]== Index Locks-[[IndexConfiginSolrConfig-lockType]]=== lockTypeThe LockFactory options specify the locking implementation to use.@@ -177,7 +165,6 @@ For more information on the nuances of each LockFactory, see http://wiki.apache.<lockType>native</lockType>-----[[IndexConfiginSolrConfig-writeLockTimeout]]=== writeLockTimeoutThe maximum time to wait for a write lock on an IndexWriter. The default is 1000, expressed in milliseconds.@@ -187,7 +174,6 @@ The maximum time to wait for a write lock on an IndexWriter. The default is 1000<writeLockTimeout>1000</writeLockTimeout>-----[[IndexConfiginSolrConfig-OtherIndexingSettings]]== Other Indexing SettingsThere are a few other parameters that may be important to configure for your implementation. These settings affect how or when updates are made to an index.diff --git a/solr/solr-ref-guide/src/language-analysis.adoc b/solr/solr-ref-guide/src/language-analysis.adocindex c2b02ff069a..a6d04da6b41 100644--- a/solr/solr-ref-guide/src/language-analysis.adoc+++ b/solr/solr-ref-guide/src/language-analysis.adoc@@ -26,7 +26,6 @@ In other languages the tokenization rules are often not so simple. Some EuropeanFor information about language detection at index time, see <<detecting-languages-during-indexing.adoc#detecting-languages-during-indexing,Detecting Languages During Indexing>>.-[[LanguageAnalysis-KeywordMarkerFilterFactory]]== KeywordMarkerFilterFactoryProtects words from being modified by stemmers. A customized protected word list may be specified with the "protected" attribute in the schema. Any words in the protected word list will not be modified by any stemmer in Solr.@@ -44,7 +43,6 @@ A sample Solr `protwords.txt` with comments can be found in the `sample_techprod</fieldtype>-----[[LanguageAnalysis-KeywordRepeatFilterFactory]]== KeywordRepeatFilterFactoryEmits each token twice, one with the `KEYWORD` attribute and once without.@@ -69,8 +67,6 @@ A sample fieldType configuration could look like this:IMPORTANT: When adding the same token twice, it will also score twice (double), so you may have to re-tune your ranking rules.--[[LanguageAnalysis-StemmerOverrideFilterFactory]]== StemmerOverrideFilterFactoryOverrides stemming algorithms by applying a custom mapping, then protecting these terms from being modified by stemmers.@@ -90,7 +86,6 @@ A sample http://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/test-fil</fieldtype>-----[[LanguageAnalysis-DictionaryCompoundWordTokenFilter]]== Dictionary Compound Word Token FilterThis filter splits, or _decompounds_, compound words into individual words using a dictionary of the component words. Each input token is passed through unchanged. If it can also be decompounded into subwords, each subword is also added to the stream at the same logical position.@@ -129,7 +124,6 @@ Assume that `germanwords.txt` contains at least the following words: `dumm kopf*Out:* "Donaudampfschiff"(1), "Donau"(1), "dampf"(1), "schiff"(1), "dummkopf"(2), "dumm"(2), "kopf"(2)-[[LanguageAnalysis-UnicodeCollation]]== Unicode CollationUnicode Collation is a language-sensitive method of sorting text that can also be used for advanced search purposes.@@ -175,7 +169,6 @@ Expert options:`variableTop`:: Single character or contraction. Controls what is variable for `alternate`.-[[LanguageAnalysis-SortingTextforaSpecificLanguage]]=== Sorting Text for a Specific LanguageIn this example, text is sorted according to the default German rules provided by ICU4J.@@ -223,7 +216,6 @@ An example using the "city_sort" field to sort:q=*:*&fl=city&sort=city_sort+asc-----[[LanguageAnalysis-SortingTextforMultipleLanguages]]=== Sorting Text for Multiple LanguagesThere are two approaches to supporting multiple languages: if there is a small list of languages you wish to support, consider defining collated fields for each language and using `copyField`. However, adding a large number of sort fields can increase disk and indexing costs. An alternative approach is to use the Unicode `default` collator.@@ -237,7 +229,6 @@ The Unicode `default` or `ROOT` locale has rules that are designed to work wellstrength="primary" />-----[[LanguageAnalysis-SortingTextwithCustomRules]]=== Sorting Text with Custom RulesYou can define your own set of sorting rules. It's easiest to take existing rules that are close to what you want and customize them.@@ -277,7 +268,6 @@ This rule set can now be used for custom collation in Solr:strength="primary" />-----[[LanguageAnalysis-JDKCollation]]=== JDK CollationAs mentioned above, ICU Unicode Collation is better in several ways than JDK Collation, but if you cannot use ICU4J for some reason, you can use `solr.CollationField`.@@ -321,7 +311,6 @@ Using a Tailored ruleset:== ASCII & Decimal Folding Filters-[[LanguageAnalysis-AsciiFolding]]=== ASCII FoldingThis filter converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the "Basic Latin" Unicode block) into their ASCII equivalents, if one exists. Only those characters with reasonable ASCII alternatives are converted.@@ -348,7 +337,6 @@ This can increase recall by causing more matches. On the other hand, it can redu*Out:* "Bjorn", "Angstrom"-[[LanguageAnalysis-DecimalDigitFolding]]=== Decimal Digit FoldingThis filter converts any character in the Unicode "Decimal Number" general category (`Nd`) into their equivalent Basic Latin digits (0-9).@@ -369,7 +357,6 @@ This can increase recall by causing more matches. On the other hand, it can redu</analyzer>-----[[LanguageAnalysis-Language-SpecificFactories]]== Language-Specific FactoriesThese factories are each designed to work with specific languages. The languages covered here are:@@ -380,8 +367,8 @@ These factories are each designed to work with specific languages. The languages* <<Catalan>>* <<Traditional Chinese>>* <<Simplified Chinese>>-* <<LanguageAnalysis-Czech,Czech>>-* <<LanguageAnalysis-Danish,Danish>>+* <<Czech>>+* <<Danish>>* <<Dutch>>* <<Finnish>>@@ -389,7 +376,7 @@ These factories are each designed to work with specific languages. The languages* <<Galician>>* <<German>>* <<Greek>>-* <<LanguageAnalysis-Hebrew_Lao_Myanmar_Khmer,Hebrew, Lao, Myanmar, Khmer>>+* <<hebrew-lao-myanmar-khmer,Hebrew, Lao, Myanmar, Khmer>>* <<Hindi>>* <<Indonesian>>* <<Italian>>@@ -410,7 +397,6 @@ These factories are each designed to work with specific languages. The languages* <<Turkish>>* <<Ukrainian>>-[[LanguageAnalysis-Arabic]]=== ArabicSolr provides support for the http://www.mtholyoke.edu/~lballest/Pubs/arab_stem05.pdf[Light-10] (PDF) stemming algorithm, and Lucene includes an example stopword list.@@ -432,7 +418,6 @@ This algorithm defines both character normalization and stemming, so these are s</analyzer>-----[[LanguageAnalysis-BrazilianPortuguese]]=== Brazilian PortugueseThis is a Java filter written specifically for stemming the Brazilian dialect of the Portuguese language. It uses the Lucene class `org.apache.lucene.analysis.br.BrazilianStemmer`. Although that stemmer can be configured to use a list of protected words (which should not be stemmed), this factory does not accept any arguments to specify such a list.@@ -457,7 +442,6 @@ This is a Java filter written specifically for stemming the Brazilian dialect of*Out:* "pra", "pra"-[[LanguageAnalysis-Bulgarian]]=== BulgarianSolr includes a light stemmer for Bulgarian, following http://members.unine.ch/jacques.savoy/Papers/BUIR.pdf[this algorithm] (PDF), and Lucene includes an example stopword list.@@ -477,7 +461,6 @@ Solr includes a light stemmer for Bulgarian, following http://members.unine.ch/j</analyzer>-----[[LanguageAnalysis-Catalan]]=== CatalanSolr can stem Catalan using the Snowball Porter Stemmer with an argument of `language="Catalan"`. Solr includes a set of contractions for Catalan, which can be stripped using `solr.ElisionFilterFactory`.@@ -507,14 +490,13 @@ Solr can stem Catalan using the Snowball Porter Stemmer with an argument of `lan*Out:* "llengu"(1), "llengu"(2)-[[LanguageAnalysis-TraditionalChinese]]=== Traditional Chinese-The default configuration of the <<tokenizers.adoc#Tokenizers-ICUTokenizer,ICU Tokenizer>> is suitable for Traditional Chinese text. It follows the Word Break rules from the Unicode Text Segmentation algorithm for non-Chinese text, and uses a dictionary to segment Chinese words. To use this tokenizer, you must add additional .jars to Solr's classpath (as described in the section <<lib-directives-in-solrconfig.adoc#lib-directives-in-solrconfig,Lib Directives in SolrConfig>>). See the `solr/contrib/analysis-extras/README.txt` for information on which jars you need to add to your `SOLR_HOME/lib`.+The default configuration of the <<tokenizers.adoc#icu-tokenizer,ICU Tokenizer>> is suitable for Traditional Chinese text. It follows the Word Break rules from the Unicode Text Segmentation algorithm for non-Chinese text, and uses a dictionary to segment Chinese words. To use this tokenizer, you must add additional .jars to Solr's classpath (as described in the section <<lib-directives-in-solrconfig.adoc#lib-directives-in-solrconfig,Lib Directives in SolrConfig>>). See the `solr/contrib/analysis-extras/README.txt` for information on which jars you need to add to your `SOLR_HOME/lib`.-<<tokenizers.adoc#Tokenizers-StandardTokenizer,Standard Tokenizer>> can also be used to tokenize Traditional Chinese text. Following the Word Break rules from the Unicode Text Segmentation algorithm, it produces one token per Chinese character. When combined with <<LanguageAnalysis-CJKBigramFilter,CJK Bigram Filter>>, overlapping bigrams of Chinese characters are formed.+<<tokenizers.adoc#standard-tokenizer,Standard Tokenizer>> can also be used to tokenize Traditional Chinese text. Following the Word Break rules from the Unicode Text Segmentation algorithm, it produces one token per Chinese character. When combined with <<CJK Bigram Filter>>, overlapping bigrams of Chinese characters are formed.-<<LanguageAnalysis-CJKWidthFilter,CJK Width Filter>> folds fullwidth ASCII variants into the equivalent Basic Latin forms.+<<CJK Width Filter>> folds fullwidth ASCII variants into the equivalent Basic Latin forms.*Examples:*@@ -537,10 +519,9 @@ The default configuration of the <<tokenizers.adoc#Tokenizers-ICUTokenizer,ICU T</analyzer>-----[[LanguageAnalysis-CJKBigramFilter]]=== CJK Bigram Filter-Forms bigrams (overlapping 2-character sequences) of CJK characters that are generated from <<tokenizers.adoc#Tokenizers-StandardTokenizer,Standard Tokenizer>> or <<tokenizers.adoc#Tokenizers-ICUTokenizer,ICU Tokenizer>>.+Forms bigrams (overlapping 2-character sequences) of CJK characters that are generated from <<tokenizers.adoc#standard-tokenizer,Standard Tokenizer>> or <<tokenizers.adoc#icu-tokenizer,ICU Tokenizer>>.By default, all CJK characters produce bigrams, but finer grained control is available by specifying orthographic type arguments `han`, `hiragana`, `katakana`, and `hangul`. When set to `false`, characters of the corresponding type will be passed through as unigrams, and will not be included in any bigrams.@@ -560,18 +541,17 @@ In all cases, all non-CJK input is passed through unmodified.`outputUnigrams`:: (true/false) If true, in addition to forming bigrams, all characters are also passed through as unigrams. Default is false.-See the example under <<LanguageAnalysis-TraditionalChinese,Traditional Chinese>>.+See the example under <<Traditional Chinese>>.-[[LanguageAnalysis-SimplifiedChinese]]=== Simplified Chinese-For Simplified Chinese, Solr provides support for Chinese sentence and word segmentation with the <<LanguageAnalysis-HMMChineseTokenizer,HMM Chinese Tokenizer>>. This component includes a large dictionary and segments Chinese text into words with the Hidden Markov Model. To use this tokenizer, you must add additional .jars to Solr's classpath (as described in the section <<lib-directives-in-solrconfig.adoc#lib-directives-in-solrconfig,Lib Directives in SolrConfig>>). See the `solr/contrib/analysis-extras/README.txt` for information on which jars you need to add to your `SOLR_HOME/lib`.+For Simplified Chinese, Solr provides support for Chinese sentence and word segmentation with the <<HMM Chinese Tokenizer>>. This component includes a large dictionary and segments Chinese text into words with the Hidden Markov Model. To use this tokenizer, you must add additional .jars to Solr's classpath (as described in the section <<lib-directives-in-solrconfig.adoc#lib-directives-in-solrconfig,Lib Directives in SolrConfig>>). See the `solr/contrib/analysis-extras/README.txt` for information on which jars you need to add to your `SOLR_HOME/lib`.-The default configuration of the <<tokenizers.adoc#Tokenizers-ICUTokenizer,ICU Tokenizer>> is also suitable for Simplified Chinese text. It follows the Word Break rules from the Unicode Text Segmentation algorithm for non-Chinese text, and uses a dictionary to segment Chinese words. To use this tokenizer, you must add additional .jars to Solr's classpath (as described in the section <<lib-directives-in-solrconfig.adoc#lib-directives-in-solrconfig,Lib Directives in SolrConfig>>). See the `solr/contrib/analysis-extras/README.txt` for information on which jars you need to add to your `SOLR_HOME/lib`.+The default configuration of the <<tokenizers.adoc#icu-tokenizer,ICU Tokenizer>> is also suitable for Simplified Chinese text. It follows the Word Break rules from the Unicode Text Segmentation algorithm for non-Chinese text, and uses a dictionary to segment Chinese words. To use this tokenizer, you must add additional .jars to Solr's classpath (as described in the section <<lib-directives-in-solrconfig.adoc#lib-directives-in-solrconfig,Lib Directives in SolrConfig>>). See the `solr/contrib/analysis-extras/README.txt` for information on which jars you need to add to your `SOLR_HOME/lib`.Also useful for Chinese analysis:-<<LanguageAnalysis-CJKWidthFilter,CJK Width Filter>> folds fullwidth ASCII variants into the equivalent Basic Latin forms, and folds halfwidth Katakana variants into their equivalent fullwidth forms.+<<CJK Width Filter>> folds fullwidth ASCII variants into the equivalent Basic Latin forms, and folds halfwidth Katakana variants into their equivalent fullwidth forms.*Examples:*@@ -598,7 +578,6 @@ Also useful for Chinese analysis:</analyzer>-----[[LanguageAnalysis-HMMChineseTokenizer]]=== HMM Chinese TokenizerFor Simplified Chinese, Solr provides support for Chinese sentence and word segmentation with the `solr.HMMChineseTokenizerFactory` in the `analysis-extras` contrib module. This component includes a large dictionary and segments Chinese text into words with the Hidden Markov Model. To use this tokenizer, see `solr/contrib/analysis-extras/README.txt` for instructions on which jars you need to add to your `solr_home/lib`.@@ -613,9 +592,8 @@ To use the default setup with fallback to English Porter stemmer for English wor`<analyzer class="org.apache.lucene.analysis.cn.smart.SmartChineseAnalyzer"/>`-Or to configure your own analysis setup, use the `solr.HMMChineseTokenizerFactory` along with your custom filter setup. See an example of this in the <<LanguageAnalysis-SimplifiedChinese,Simplified Chinese>> section.+Or to configure your own analysis setup, use the `solr.HMMChineseTokenizerFactory` along with your custom filter setup. See an example of this in the <<Simplified Chinese>> section.-[[LanguageAnalysis-Czech]]=== CzechSolr includes a light stemmer for Czech, following https://dl.acm.org/citation.cfm?id=1598600[this algorithm], and Lucene includes an example stopword list.@@ -641,12 +619,11 @@ Solr includes a light stemmer for Czech, following https://dl.acm.org/citation.c*Out:* "preziden", "preziden", "preziden"-[[LanguageAnalysis-Danish]]=== DanishSolr can stem Danish using the Snowball Porter Stemmer with an argument of `language="Danish"`.-Also relevant are the <<LanguageAnalysis-Scandinavian,Scandinavian normalization filters>>.+Also relevant are the <<Scandinavian,Scandinavian normalization filters>>.*Factory class:* `solr.SnowballPorterFilterFactory`@@ -671,8 +648,6 @@ Also relevant are the <<LanguageAnalysis-Scandinavian,Scandinavian normalization*Out:* "undersøg"(1), "undersøg"(2)--[[LanguageAnalysis-Dutch]]=== DutchSolr can stem Dutch using the Snowball Porter Stemmer with an argument of `language="Dutch"`.@@ -700,7 +675,6 @@ Solr can stem Dutch using the Snowball Porter Stemmer with an argument of `langu*Out:* "kanal", "kanal"-[[LanguageAnalysis-Finnish]]=== FinnishSolr includes support for stemming Finnish, and Lucene includes an example stopword list.@@ -726,10 +700,8 @@ Solr includes support for stemming Finnish, and Lucene includes an example stopw*Out:* "kala", "kala"-[[LanguageAnalysis-French]]=== French-[[LanguageAnalysis-ElisionFilter]]==== Elision FilterRemoves article elisions from a token stream. This filter can be useful for languages such as French, Catalan, Italian, and Irish.@@ -760,7 +732,6 @@ Removes article elisions from a token stream. This filter can be useful for lang*Out:* "histoire", "art"-[[LanguageAnalysis-FrenchLightStemFilter]]==== French Light Stem FilterSolr includes three stemmers for French: one in the `solr.SnowballPorterFilterFactory`, a lighter stemmer called `solr.FrenchLightStemFilterFactory`, and an even less aggressive stemmer called `solr.FrenchMinimalStemFilterFactory`. Lucene includes an example stopword list.@@ -800,7 +771,6 @@ Solr includes three stemmers for French: one in the `solr.SnowballPorterFilterFa*Out:* "le", "chat", "le", "chat"-[[LanguageAnalysis-Galician]]=== GalicianSolr includes a stemmer for Galician following http://bvg.udc.es/recursos_lingua/stemming.jsp[this algorithm], and Lucene includes an example stopword list.@@ -826,8 +796,6 @@ Solr includes a stemmer for Galician following http://bvg.udc.es/recursos_lingua*Out:* "feliz", "luz"--[[LanguageAnalysis-German]]=== GermanSolr includes four stemmers for German: one in the `solr.SnowballPorterFilterFactory language="German"`, a stemmer called `solr.GermanStemFilterFactory`, a lighter stemmer called `solr.GermanLightStemFilterFactory`, and an even less aggressive stemmer called `solr.GermanMinimalStemFilterFactory`. Lucene includes an example stopword list.@@ -868,8 +836,6 @@ Solr includes four stemmers for German: one in the `solr.SnowballPorterFilterFac*Out:* "haus", "haus"--[[LanguageAnalysis-Greek]]=== GreekThis filter converts uppercase letters in the Greek character set to the equivalent lowercase character.@@ -893,7 +859,6 @@ Use of custom charsets is no longer supported as of Solr 3.1. If you need to ind</analyzer>-----[[LanguageAnalysis-Hindi]]=== HindiSolr includes support for stemming Hindi following http://computing.open.ac.uk/Sites/EACLSouthAsia/Papers/p6-Ramanathan.pdf[this algorithm] (PDF), support for common spelling differences through the `solr.HindiNormalizationFilterFactory`, support for encoding differences through the `solr.IndicNormalizationFilterFactory` following http://ldc.upenn.edu/myl/IndianScriptsUnicode.html[this algorithm], and Lucene includes an example stopword list.@@ -914,8 +879,6 @@ Solr includes support for stemming Hindi following http://computing.open.ac.uk/S</analyzer>------[[LanguageAnalysis-Indonesian]]=== IndonesianSolr includes support for stemming Indonesian (Bahasa Indonesia) following http://www.illc.uva.nl/Publications/ResearchReports/MoL-2003-02.text.pdf[this algorithm] (PDF), and Lucene includes an example stopword list.@@ -941,7 +904,6 @@ Solr includes support for stemming Indonesian (Bahasa Indonesia) following http:*Out:* "bagai", "bagai"-[[LanguageAnalysis-Italian]]=== ItalianSolr includes two stemmers for Italian: one in the `solr.SnowballPorterFilterFactory language="Italian"`, and a lighter stemmer called `solr.ItalianLightStemFilterFactory`. Lucene includes an example stopword list.@@ -969,7 +931,6 @@ Solr includes two stemmers for Italian: one in the `solr.SnowballPorterFilterFac*Out:* "propag", "propag", "propag"-[[LanguageAnalysis-Irish]]=== IrishSolr can stem Irish using the Snowball Porter Stemmer with an argument of `language="Irish"`. Solr includes `solr.IrishLowerCaseFilterFactory`, which can handle Irish-specific constructs. Solr also includes a set of contractions for Irish which can be stripped using `solr.ElisionFilterFactory`.@@ -999,22 +960,20 @@ Solr can stem Irish using the Snowball Porter Stemmer with an argument of `langu*Out:* "siopadóir", "síceapaite", "fearr", "athair"-[[LanguageAnalysis-Japanese]]=== JapaneseSolr includes support for analyzing Japanese, via the Lucene Kuromoji morphological analyzer, which includes several analysis components - more details on each below:-* <<LanguageAnalysis-JapaneseIterationMarkCharFilter,`JapaneseIterationMarkCharFilter`>> normalizes Japanese horizontal iteration marks (odoriji) to their expanded form.-* <<LanguageAnalysis-JapaneseTokenizer,`JapaneseTokenizer`>> tokenizes Japanese using morphological analysis, and annotates each term with part-of-speech, base form (a.k.a. lemma), reading and pronunciation.-* <<LanguageAnalysis-JapaneseBaseFormFilter,`JapaneseBaseFormFilter`>> replaces original terms with their base forms (a.k.a. lemmas).-* <<LanguageAnalysis-JapanesePartOfSpeechStopFilter,`JapanesePartOfSpeechStopFilter`>> removes terms that have one of the configured parts-of-speech.-* <<LanguageAnalysis-JapaneseKatakanaStemFilter,`JapaneseKatakanaStemFilter`>> normalizes common katakana spelling variations ending in a long sound character (U+30FC) by removing the long sound character.+* <<Japanese Iteration Mark CharFilter,`JapaneseIterationMarkCharFilter`>> normalizes Japanese horizontal iteration marks (odoriji) to their expanded form.+* <<Japanese Tokenizer,`JapaneseTokenizer`>> tokenizes Japanese using morphological analysis, and annotates each term with part-of-speech, base form (a.k.a. lemma), reading and pronunciation.+* <<Japanese Base Form Filter,`JapaneseBaseFormFilter`>> replaces original terms with their base forms (a.k.a. lemmas).+* <<Japanese Part Of Speech Stop Filter,`JapanesePartOfSpeechStopFilter`>> removes terms that have one of the configured parts-of-speech.+* <<Japanese Katakana Stem Filter,`JapaneseKatakanaStemFilter`>> normalizes common katakana spelling variations ending in a long sound character (U+30FC) by removing the long sound character.Also useful for Japanese analysis, from lucene-analyzers-common:-* <<LanguageAnalysis-CJKWidthFilter,`CJKWidthFilter`>> folds fullwidth ASCII variants into the equivalent Basic Latin forms, and folds halfwidth Katakana variants into their equivalent fullwidth forms.+* <<CJK Width Filter,`CJKWidthFilter`>> folds fullwidth ASCII variants into the equivalent Basic Latin forms, and folds halfwidth Katakana variants into their equivalent fullwidth forms.-[[LanguageAnalysis-JapaneseIterationMarkCharFilter]]==== Japanese Iteration Mark CharFilterNormalizes horizontal Japanese iteration marks (odoriji) to their expanded form. Vertical iteration marks are not supported.@@ -1027,7 +986,6 @@ Normalizes horizontal Japanese iteration marks (odoriji) to their expanded form.`normalizeKana`:: set to `false` to not normalize kana iteration marks (default is `true`)-[[LanguageAnalysis-JapaneseTokenizer]]==== Japanese TokenizerTokenizer for Japanese that uses morphological analysis, and annotates each term with part-of-speech, base form (a.k.a. lemma), reading and pronunciation.@@ -1052,7 +1010,6 @@ For some applications it might be good to use `search` mode for indexing and `no`discardPunctuation`:: set to `false` to keep punctuation, `true` to discard (the default)-[[LanguageAnalysis-JapaneseBaseFormFilter]]==== Japanese Base Form FilterReplaces original terms' text with the corresponding base form (lemma). (`JapaneseTokenizer` annotates each term with its base form.)@@ -1061,7 +1018,6 @@ Replaces original terms' text with the corresponding base form (lemma). (`Japane(no arguments)-[[LanguageAnalysis-JapanesePartOfSpeechStopFilter]]==== Japanese Part Of Speech Stop FilterRemoves terms with one of the configured parts-of-speech. `JapaneseTokenizer` annotates terms with parts-of-speech.@@ -1074,12 +1030,11 @@ Removes terms with one of the configured parts-of-speech. `JapaneseTokenizer` an`enablePositionIncrements`:: if `luceneMatchVersion` is `4.3` or earlier and `enablePositionIncrements="false"`, no position holes will be left by this filter when it removes tokens. *This argument is invalid if `luceneMatchVersion` is `5.0` or later.*-[[LanguageAnalysis-JapaneseKatakanaStemFilter]]==== Japanese Katakana Stem FilterNormalizes common katakana spelling variations ending in a long sound character (U+30FC) by removing the long sound character.-<<LanguageAnalysis-CJKWidthFilter,`solr.CJKWidthFilterFactory`>> should be specified prior to this filter to normalize half-width katakana to full-width.+<<CJK Width Filter,`solr.CJKWidthFilterFactory`>> should be specified prior to this filter to normalize half-width katakana to full-width.*Factory class:* `JapaneseKatakanaStemFilterFactory`@@ -1087,7 +1042,6 @@ Normalizes common katakana spelling variations ending in a long sound character`minimumLength`:: terms below this length will not be stemmed. Default is 4, value must be 2 or more.-[[LanguageAnalysis-CJKWidthFilter]]==== CJK Width FilterFolds fullwidth ASCII variants into the equivalent Basic Latin forms, and folds halfwidth Katakana variants into their equivalent fullwidth forms.@@ -1115,14 +1069,13 @@ Example:</fieldType>-----[[LanguageAnalysis-Hebrew_Lao_Myanmar_Khmer]]+[[hebrew-lao-myanmar-khmer]]=== Hebrew, Lao, Myanmar, KhmerLucene provides support, in addition to UAX#29 word break rules, for Hebrew's use of the double and single quote characters, and for segmenting Lao, Myanmar, and Khmer into syllables with the `solr.ICUTokenizerFactory` in the `analysis-extras` contrib module. To use this tokenizer, see `solr/contrib/analysis-extras/README.txt for` instructions on which jars you need to add to your `solr_home/lib`.-See <<tokenizers.adoc#Tokenizers-ICUTokenizer,the ICUTokenizer>> for more information.+See <<tokenizers.adoc#icu-tokenizer,the ICUTokenizer>> for more information.-[[LanguageAnalysis-Latvian]]=== LatvianSolr includes support for stemming Latvian, and Lucene includes an example stopword list.@@ -1150,16 +1103,14 @@ Solr includes support for stemming Latvian, and Lucene includes an example stopw*Out:* "tirg", "tirg"-[[LanguageAnalysis-Norwegian]]=== NorwegianSolr includes two classes for stemming Norwegian, `NorwegianLightStemFilterFactory` and `NorwegianMinimalStemFilterFactory`. Lucene includes an example stopword list.Another option is to use the Snowball Porter Stemmer with an argument of language="Norwegian".-Also relevant are the <<LanguageAnalysis-Scandinavian,Scandinavian normalization filters>>.+Also relevant are the <<Scandinavian,Scandinavian normalization filters>>.-[[LanguageAnalysis-NorwegianLightStemmer]]==== Norwegian Light StemmerThe `NorwegianLightStemFilterFactory` requires a "two-pass" sort for the -dom and -het endings. This means that in the first pass the word "kristendom" is stemmed to "kristen", and then all the general rules apply so it will be further stemmed to "krist". The effect of this is that "kristen," "kristendom," "kristendommen," and "kristendommens" will all be stemmed to "krist."@@ -1209,7 +1160,6 @@ The second pass is to pick up -dom and -het endings. Consider this example:*Out:* "forelske"-[[LanguageAnalysis-NorwegianMinimalStemmer]]==== Norwegian Minimal StemmerThe `NorwegianMinimalStemFilterFactory` stems plural forms of Norwegian nouns only.@@ -1244,10 +1194,8 @@ The `NorwegianMinimalStemFilterFactory` stems plural forms of Norwegian nouns on*Out:* "bil"-[[LanguageAnalysis-Persian]]=== Persian-[[LanguageAnalysis-PersianFilterFactories]]==== Persian Filter FactoriesSolr includes support for normalizing Persian, and Lucene includes an example stopword list.@@ -1267,7 +1215,6 @@ Solr includes support for normalizing Persian, and Lucene includes an example st</analyzer>-----[[LanguageAnalysis-Polish]]=== PolishSolr provides support for Polish stemming with the `solr.StempelPolishStemFilterFactory`, and `solr.MorphologikFilterFactory` for lemmatization, in the `contrib/analysis-extras` module. The `solr.StempelPolishStemFilterFactory` component includes an algorithmic stemmer with tables for Polish. To use either of these filters, see `solr/contrib/analysis-extras/README.txt` for instructions on which jars you need to add to your `solr_home/lib`.@@ -1308,7 +1255,6 @@ Note the lower case filter is applied _after_ the Morfologik stemmer; this is beThe Morfologik dictionary parameter value is a constant specifying which dictionary to choose. The dictionary resource must be named `path/to/_language_.dict` and have an associated `.info` metadata file. See http://morfologik.blogspot.com/[the Morfologik project] for details. If the dictionary attribute is not provided, the Polish dictionary is loaded and used by default.-[[LanguageAnalysis-Portuguese]]=== PortugueseSolr includes four stemmers for Portuguese: one in the `solr.SnowballPorterFilterFactory`, an alternative stemmer called `solr.PortugueseStemFilterFactory`, a lighter stemmer called `solr.PortugueseLightStemFilterFactory`, and an even less aggressive stemmer called `solr.PortugueseMinimalStemFilterFactory`. Lucene includes an example stopword list.@@ -1352,8 +1298,6 @@ Solr includes four stemmers for Portuguese: one in the `solr.SnowballPorterFilte*Out:* "pra", "pra"--[[LanguageAnalysis-Romanian]]=== RomanianSolr can stem Romanian using the Snowball Porter Stemmer with an argument of `language="Romanian"`.@@ -1375,11 +1319,8 @@ Solr can stem Romanian using the Snowball Porter Stemmer with an argument of `la</analyzer>------[[LanguageAnalysis-Russian]]=== Russian-[[LanguageAnalysis-RussianStemFilter]]==== Russian Stem FilterSolr includes two stemmers for Russian: one in the `solr.SnowballPorterFilterFactory language="Russian"`, and a lighter stemmer called `solr.RussianLightStemFilterFactory`. Lucene includes an example stopword list.@@ -1399,11 +1340,9 @@ Solr includes two stemmers for Russian: one in the `solr.SnowballPorterFilterFac</analyzer>------[[LanguageAnalysis-Scandinavian]]=== Scandinavian-Scandinavian is a language group spanning three languages <<LanguageAnalysis-Norwegian,Norwegian>>, <<LanguageAnalysis-Swedish,Swedish>> and <<LanguageAnalysis-Danish,Danish>> which are very similar.+Scandinavian is a language group spanning three languages <<Norwegian>>, <<Swedish>> and <<Danish>> which are very similar.Swedish å, ä, ö are in fact the same letters as Norwegian and Danish å, æ, ø and thus interchangeable when used between these languages. They are however folded differently when people type them on a keyboard lacking these characters.@@ -1413,7 +1352,6 @@ There are two filters for helping with normalization between Scandinavian languaSee also each language section for other relevant filters.-[[LanguageAnalysis-ScandinavianNormalizationFilter]]==== Scandinavian Normalization FilterThis filter normalize use of the interchangeable Scandinavian characters æÆäÄöÖøØ and folded variants (aa, ao, ae, oe and oo) by transforming them to åÅæÆøØ.@@ -1441,7 +1379,6 @@ It's a semantically less destructive solution than `ScandinavianFoldingFilter`,*Out:* "blåbærsyltetøj", "blåbærsyltetøj", "blåbærsyltetøj", "blabarsyltetoj"-[[LanguageAnalysis-ScandinavianFoldingFilter]]==== Scandinavian Folding FilterThis filter folds Scandinavian characters åÅäæÄÆ\->a and öÖøØ\->o. It also discriminate against use of double vowels aa, ae, ao, oe and oo, leaving just the first one.@@ -1469,10 +1406,8 @@ It's a semantically more destructive solution than `ScandinavianNormalizationFil*Out:* "blabarsyltetoj", "blabarsyltetoj", "blabarsyltetoj", "blabarsyltetoj"-[[LanguageAnalysis-Serbian]]=== Serbian-[[LanguageAnalysis-SerbianNormalizationFilter]]==== Serbian Normalization FilterSolr includes a filter that normalizes Serbian Cyrillic and Latin characters. Note that this filter only works with lowercased input.@@ -1499,7 +1434,6 @@ See the Solr wiki for tips & advice on using this filter: https://wiki.apache.or</analyzer>-----[[LanguageAnalysis-Spanish]]=== SpanishSolr includes two stemmers for Spanish: one in the `solr.SnowballPorterFilterFactory language="Spanish"`, and a lighter stemmer called `solr.SpanishLightStemFilterFactory`. Lucene includes an example stopword list.@@ -1526,15 +1460,13 @@ Solr includes two stemmers for Spanish: one in the `solr.SnowballPorterFilterFac*Out:* "tor", "tor", "tor"-[[LanguageAnalysis-Swedish]]=== Swedish-[[LanguageAnalysis-SwedishStemFilter]]==== Swedish Stem FilterSolr includes two stemmers for Swedish: one in the `solr.SnowballPorterFilterFactory language="Swedish"`, and a lighter stemmer called `solr.SwedishLightStemFilterFactory`. Lucene includes an example stopword list.-Also relevant are the <<LanguageAnalysis-Scandinavian,Scandinavian normalization filters>>.+Also relevant are the <<Scandinavian,Scandinavian normalization filters>>.*Factory class:* `solr.SwedishStemFilterFactory`@@ -1557,8 +1489,6 @@ Also relevant are the <<LanguageAnalysis-Scandinavian,Scandinavian normalization*Out:* "klok", "klok", "klok"--[[LanguageAnalysis-Thai]]=== ThaiThis filter converts sequences of Thai characters into individual Thai words. Unlike European languages, Thai does not use whitespace to delimit words.@@ -1577,7 +1507,6 @@ This filter converts sequences of Thai characters into individual Thai words. Un</analyzer>-----[[LanguageAnalysis-Turkish]]=== TurkishSolr includes support for stemming Turkish with the `solr.SnowballPorterFilterFactory`; support for case-insensitive search with the `solr.TurkishLowerCaseFilterFactory`; support for stripping apostrophes and following suffixes with `solr.ApostropheFilterFactory` (see http://www.ipcsit.com/vol57/015-ICNI2012-M021.pdf[Role of Apostrophes in Turkish Information Retrieval]); support for a form of stemming that truncating tokens at a configurable maximum length through the `solr.TruncateTokenFilterFactory` (see http://www.users.muohio.edu/canf/papers/JASIST2008offPrint.pdf[Information Retrieval on Turkish Texts]); and Lucene includes an example stopword list.@@ -1613,10 +1542,6 @@ Solr includes support for stemming Turkish with the `solr.SnowballPorterFilterFa</analyzer>-----[[LanguageAnalysis-BacktoTop#main]]-===--[[LanguageAnalysis-Ukrainian]]=== UkrainianSolr provides support for Ukrainian lemmatization with the `solr.MorphologikFilterFactory`, in the `contrib/analysis-extras` module. To use this filter, see `solr/contrib/analysis-extras/README.txt` for instructions on which jars you need to add to your `solr_home/lib`.diff --git a/solr/solr-ref-guide/src/learning-to-rank.adoc b/solr/solr-ref-guide/src/learning-to-rank.adocindex 64a461bd6e4..d2687c124e7 100644--- a/solr/solr-ref-guide/src/learning-to-rank.adoc+++ b/solr/solr-ref-guide/src/learning-to-rank.adoc@@ -22,21 +22,17 @@ With the *Learning To Rank* (or *LTR* for short) contrib module you can configurThe module also supports feature extraction inside Solr. The only thing you need to do outside Solr is train your own ranking model.-[[LearningToRank-Concepts]]-== Concepts+== Learning to Rank Concepts-[[LearningToRank-Re-Ranking]]=== Re-Ranking-Re-Ranking allows you to run a simple query for matching documents and then re-rank the top N documents using the scores from a different, complex query. This page describes the use of *LTR* complex queries, information on other rank queries included in the Solr distribution can be found on the <<query-re-ranking.adoc#query-re-ranking,Query Re-Ranking>> page.+Re-Ranking allows you to run a simple query for matching documents and then re-rank the top N documents using the scores from a different, more complex query. This page describes the use of *LTR* complex queries, information on other rank queries included in the Solr distribution can be found on the <<query-re-ranking.adoc#query-re-ranking,Query Re-Ranking>> page.-[[LearningToRank-LearningToRank]]-=== Learning To Rank+=== Learning To Rank ModelsIn information retrieval systems, https://en.wikipedia.org/wiki/Learning_to_rank[Learning to Rank] is used to re-rank the top N retrieved documents using trained machine learning models. The hope is that such sophisticated models can make more nuanced ranking decisions than standard ranking functions like https://en.wikipedia.org/wiki/Tf%E2%80%93idf[TF-IDF] or https://en.wikipedia.org/wiki/Okapi_BM25[BM25].-[[LearningToRank-Model]]-==== Model+==== Ranking ModelA ranking model computes the scores used to rerank documents. Irrespective of any particular algorithm or implementation, a ranking model's computation can use three types of inputs:@@ -44,27 +40,23 @@ A ranking model computes the scores used to rerank documents. Irrespective of an* features that represent the document being scored* features that represent the query for which the document is being scored-[[LearningToRank-Feature]]==== FeatureA feature is a value, a number, that represents some quantity or quality of the document being scored or of the query for which documents are being scored. For example documents often have a 'recency' quality and 'number of past purchases' might be a quantity that is passed to Solr as part of the search query.-[[LearningToRank-Normalizer]]==== NormalizerSome ranking models expect features on a particular scale. A normalizer can be used to translate arbitrary feature values into normalized values e.g. on a 0..1 or 0..100 scale.-[[LearningToRank-Training]]-=== Training+=== Training Models-[[LearningToRank-Featureengineering]]-==== Feature engineering+==== Feature EngineeringThe LTR contrib module includes several feature classes as well as support for custom features. Each feature class's javadocs contain an example to illustrate use of that class. The process of https://en.wikipedia.org/wiki/Feature_engineering[feature engineering] itself is then entirely up to your domain expertise and creativity.[cols=",,,",options="header",]|===-|Feature |Class |Example parameters |<<LearningToRank-ExternalFeatureInformation,External Feature Information>>+|Feature |Class |Example parameters |<<External Feature Information>>|field length |{solr-javadocs}/solr-ltr/org/apache/solr/ltr/feature/FieldLengthFeature.html[FieldLengthFeature] |`{"field":"title"}` |not (yet) supported|field value |{solr-javadocs}/solr-ltr/org/apache/solr/ltr/feature/FieldValueFeature.html[FieldValueFeature] |`{"field":"hits"}` |not (yet) supported|original score |{solr-javadocs}/solr-ltr/org/apache/solr/ltr/feature/OriginalScoreFeature.html[OriginalScoreFeature] |`{}` |not applicable@@ -84,12 +76,10 @@ The LTR contrib module includes several feature classes as well as support for c|(custom) |(custom class extending {solr-javadocs}/solr-ltr/org/apache/solr/ltr/norm/Normalizer.html[Normalizer]) ||===-[[LearningToRank-Featureextraction]]==== Feature ExtractionThe ltr contrib module includes a <<transforming-result-documents.adoc#transforming-result-documents,[features>> transformer] to support the calculation and return of feature values for https://en.wikipedia.org/wiki/Feature_extraction[feature extraction] purposes including and especially when you do not yet have an actual reranking model.-[[LearningToRank-Featureselectionandmodeltraining]]==== Feature Selection and Model TrainingFeature selection and model training take place offline and outside Solr. The ltr contrib module supports two generalized forms of models as well as custom models. Each model class's javadocs contain an example to illustrate configuration of that class. In the form of JSON files your trained model or models (e.g. different models for different customer geographies) can then be directly uploaded into Solr using provided REST APIs.@@ -102,8 +92,7 @@ Feature selection and model training take place offline and outside Solr. The lt|(custom) |(custom class extending {solr-javadocs}/solr-ltr/org/apache/solr/ltr/model/LTRScoringModel.html[LTRScoringModel]) |(not applicable)|===-[[LearningToRank-QuickStartExample]]-== Quick Start Example+== Quick Start with LTRThe `"techproducts"` example included with Solr is pre-configured with the plugins required for learning-to-rank, but they are disabled by default.@@ -114,7 +103,6 @@ To enable the plugins, please specify the `solr.ltr.enabled` JVM System Propertybin/solr start -e techproducts -Dsolr.ltr.enabled=true-----[[LearningToRank-Uploadingfeatures]]=== Uploading FeaturesTo upload features in a `/path/myFeatures.json` file, please run:@@ -154,7 +142,6 @@ To view the features you just uploaded please open the following URL in a browse]-----[[LearningToRank-Extractingfeatures]]=== Extracting FeaturesTo extract features as part of a query, add `[features]` to the `fl` parameter, for example:@@ -184,7 +171,6 @@ The output XML will include feature values as a comma-separated list, resembling}}-----[[LearningToRank-Uploadingamodel]]=== Uploading a ModelTo upload the model in a `/path/myModel.json` file, please run:@@ -219,7 +205,6 @@ To view the model you just uploaded please open the following URL in a browser:}-----[[LearningToRank-Runningarerankquery]]=== Running a Rerank QueryTo rerank the results of a query, add the `rq` parameter to your search, for example:@@ -258,12 +243,10 @@ The output XML will include feature values as a comma-separated list, resembling}}-----[[LearningToRank-ExternalFeatureInformation]]=== External Feature InformationThe {solr-javadocs}/solr-ltr/org/apache/solr/ltr/feature/ValueFeature.html[ValueFeature] and {solr-javadocs}/solr-ltr/org/apache/solr/ltr/feature/SolrFeature.html[SolrFeature] classes support the use of external feature information, `efi` for short.-[[LearningToRank-Uploadingfeatures.1]]==== Uploading FeaturesTo upload features in a `/path/myEfiFeatures.json` file, please run:@@ -308,9 +291,8 @@ To view the features you just uploaded please open the following URL in a browse]-----As an aside, you may have noticed that the `myEfiFeatures.json` example uses `"store":"myEfiFeatureStore"` attributes: read more about feature `store` in the <<Lifecycle>> section of this page.+As an aside, you may have noticed that the `myEfiFeatures.json` example uses `"store":"myEfiFeatureStore"` attributes: read more about feature `store` in the <<LTR Lifecycle>> section of this page.-[[LearningToRank-Extractingfeatures.1]]==== Extracting FeaturesTo extract `myEfiFeatureStore` features as part of a query, add `efi.*` parameters to the `[features]` part of the `fl` parameter, for example:@@ -321,7 +303,6 @@ http://localhost:8983/solr/techproducts/query?q=test&fl=id,cat,manu,score,[featu[source,text]http://localhost:8983/solr/techproducts/query?q=test&fl=id,cat,manu,score,[features store=myEfiFeatureStore efi.text=test efi.preferredManufacturer=Apache efi.fromMobile=0 efi.answer=13]-[[LearningToRank-Uploadingamodel.1]]==== Uploading a ModelTo upload the model in a `/path/myEfiModel.json` file, please run:@@ -359,7 +340,6 @@ To view the model you just uploaded please open the following URL in a browser:}-----[[LearningToRank-Runningarerankquery.1]]==== Running a Rerank QueryTo obtain the feature values computed during reranking, add `[features]` to the `fl` parameter and `efi.*` parameters to the `rq` parameter, for example:@@ -368,39 +348,34 @@ To obtain the feature values computed during reranking, add `[features]` to thehttp://localhost:8983/solr/techproducts/query?q=test&rq=\{!ltr model=myEfiModel efi.text=test efi.preferredManufacturer=Apache efi.fromMobile=1}&fl=id,cat,manu,score,[features]] link:[][source,text]-http://localhost:8983/solr/techproducts/query?q=test&rq=\{!ltr model=myEfiModel efi.text=test efi.preferredManufacturer=Apache efi.fromMobile=0 efi.answer=13}&fl=id,cat,manu,score,[features]]+http://localhost:8983/solr/techproducts/query?q=test&rq={!ltr model=myEfiModel efi.text=test efi.preferredManufacturer=Apache efi.fromMobile=0 efi.answer=13}&fl=id,cat,manu,score,[features]Notice the absence of `efi.*` parameters in the `[features]` part of the `fl` parameter.-[[LearningToRank-Extractingfeatureswhilstreranking]]==== Extracting Features While RerankingTo extract features for `myEfiFeatureStore` features while still reranking with `myModel`:[source,text]-http://localhost:8983/solr/techproducts/query?q=test&rq=\{!ltr model=myModel}&fl=id,cat,manu,score,[features store=myEfiFeatureStore efi.text=test efi.preferredManufacturer=Apache efi.fromMobile=1]] link:[]+http://localhost:8983/solr/techproducts/query?q=test&rq={!ltr model=myModel}&fl=id,cat,manu,score,[features store=myEfiFeatureStore efi.text=test efi.preferredManufacturer=Apache efi.fromMobile=1]-Notice the absence of `efi.*` parameters in the `rq` parameter (because `myModel` does not use `efi` feature) and the presence of `efi.*` parameters in the `[features]` part of the `fl` parameter (because `myEfiFeatureStore` contains `efi` features).+Notice the absence of `efi.\*` parameters in the `rq` parameter (because `myModel` does not use `efi` feature) and the presence of `efi.*` parameters in the `[features]` part of the `fl` parameter (because `myEfiFeatureStore` contains `efi` features).-Read more about model evolution in the <<Lifecycle>> section of this page.+Read more about model evolution in the <<LTR Lifecycle>> section of this page.-[[LearningToRank-Trainingexample]]=== Training ExampleExample training data and a demo 'train and upload model' script can be found in the `solr/contrib/ltr/example` folder in the https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git[Apache lucene-solr git repository] which is mirrored on https://github.com/apache/lucene-solr/tree/releases/lucene-solr/6.4.0/solr/contrib/ltr/example[github.com] (the `solr/contrib/ltr/example` folder is not shipped in the solr binary release).-[[LearningToRank-Installation]]-== Installation+== Installation of LTRThe ltr contrib module requires the `dist/solr-ltr-*.jar` JARs.-[[LearningToRank-Configuration]]-== Configuration+== LTR ConfigurationLearning-To-Rank is a contrib module and therefore its plugins must be configured in `solrconfig.xml`.-[[LearningToRank-Minimumrequirements]]-=== Minimum requirements+=== Minimum Requirements* Include the required contrib JARs. Note that by default paths are relative to the Solr core so they may need adjustments to your configuration, or an explicit specification of the `$solr.install.dir`.+@@ -437,15 +412,12 @@ Learning-To-Rank is a contrib module and therefore its plugins must be configure</transformer>-----[[LearningToRank-Advancedoptions]]=== Advanced Options-[[LearningToRank-LTRThreadModule]]==== LTRThreadModuleA thread module can be configured for the query parser and/or the transformer to parallelize the creation of feature weights. For details, please refer to the {solr-javadocs}/solr-ltr/org/apache/solr/ltr/LTRThreadModule.html[LTRThreadModule] javadocs.-[[LearningToRank-Featurevectorcustomization]]==== Feature Vector CustomizationThe features transformer returns dense CSV values such as `featureA=0.1,featureB=0.2,featureC=0.3,featureD=0.0`.@@ -462,7 +434,6 @@ For sparse CSV output such as `featureA:0.1 featureB:0.2 featureC:0.3` you can c</transformer>-----[[LearningToRank-Implementationandcontributions]]==== Implementation and Contributions.How does Solr Learning-To-Rank work under the hood?@@ -481,10 +452,8 @@ Contributions for further models, features and normalizers are welcome. Related* http://wiki.apache.org/lucene-java/HowToContribute====-[[LearningToRank-Lifecycle]]-== Lifecycle+== LTR Lifecycle-[[LearningToRank-Featurestores]]=== Feature StoresIt is recommended that you organise all your features into stores which are akin to namespaces:@@ -501,7 +470,6 @@ To inspect the content of the `commonFeatureStore` feature store:`\http://localhost:8983/solr/techproducts/schema/feature-store/commonFeatureStore`-[[LearningToRank-Models]]=== Models* A model uses features from exactly one feature store.@@ -537,13 +505,11 @@ To delete the `currentFeatureStore` feature store:curl -XDELETE 'http://localhost:8983/solr/techproducts/schema/feature-store/currentFeatureStore'-----[[LearningToRank-Applyingchanges]]=== Applying ChangesThe feature store and the model store are both <<managed-resources.adoc#managed-resources,Managed Resources>>. Changes made to managed resources are not applied to the active Solr components until the Solr collection (or Solr core in single server mode) is reloaded.-[[LearningToRank-Examples]]-=== Examples+=== LTR Examples==== One Feature Store, Multiple Ranking Models@@ -628,7 +594,6 @@ The feature store and the model store are both <<managed-resources.adoc#managed-}-----[[LearningToRank-Modelevolution]]==== Model Evolution* `linearModel201701` uses features from `featureStore201701`@@ -752,8 +717,7 @@ The feature store and the model store are both <<managed-resources.adoc#managed-}-----[[LearningToRank-AdditionalResources]]-== Additional Resources+== Additional LTR Resources* "Learning to Rank in Solr" presentation at Lucene/Solr Revolution 2015 in Austin:** Slides: http://www.slideshare.net/lucidworks/learning-to-rank-in-solr-presented-by-michael-nilsson-diego-ceccarelli-bloomberg-lpdiff --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.adocindex 6810e4bd3a6..9ec44d8b9b7 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@@ -46,9 +46,9 @@ Built on streaming expressions, new in Solr 6 is a <<parallel-sql-interface.adocReplication across data centers is now possible with <<cross-data-center-replication-cdcr.adoc#cross-data-center-replication-cdcr,Cross Data Center Replication>>. Using an active-passive model, a SolrCloud cluster can be replicated to another data center, and monitored with a new API.-=== Graph Query Parser+=== Graph QueryParser-A new <<other-parsers.adoc#OtherParsers-GraphQueryParser,`graph` query parser>> makes it possible to to graph traversal queries of Directed (Cyclic) Graphs modelled using Solr documents.+A new <<other-parsers.adoc#graph-query-parser,`graph` query parser>> makes it possible to to graph traversal queries of Directed (Cyclic) Graphs modelled using Solr documents.[[major-5-6-docvalues]]=== DocValuesdiff --git a/solr/solr-ref-guide/src/making-and-restoring-backups.adoc b/solr/solr-ref-guide/src/making-and-restoring-backups.adocindex 6f3383c1b45..38da729051d 100644--- a/solr/solr-ref-guide/src/making-and-restoring-backups.adoc+++ b/solr/solr-ref-guide/src/making-and-restoring-backups.adoc@@ -28,12 +28,12 @@ Support for backups when running SolrCloud is provided with the <<collections-apTwo commands are available:-* `action=BACKUP`: This command backs up Solr indexes and configurations. More information is available in the section <<collections-api.adoc#CollectionsAPI-backup,Backup Collection>>.-* `action=RESTORE`: This command restores Solr indexes and configurations. More information is available in the section <<collections-api.adoc#CollectionsAPI-restore,Restore Collection>>.+* `action=BACKUP`: This command backs up Solr indexes and configurations. More information is available in the section <<collections-api.adoc#backup,Backup Collection>>.+* `action=RESTORE`: This command restores Solr indexes and configurations. More information is available in the section <<collections-api.adoc#restore,Restore Collection>>.== Standalone Mode Backups-Backups and restoration uses Solr's replication handler. Out of the box, Solr includes implicit support for replication so this API can be used. Configuration of the replication handler can, however, be customized by defining your own replication handler in `solrconfig.xml` . For details on configuring the replication handler, see the section <<index-replication.adoc#IndexReplication-ConfiguringtheReplicationHandler,Configuring the ReplicationHandler>>.+Backups and restoration uses Solr's replication handler. Out of the box, Solr includes implicit support for replication so this API can be used. Configuration of the replication handler can, however, be customized by defining your own replication handler in `solrconfig.xml` . For details on configuring the replication handler, see the section <<index-replication.adoc#configuring-the-replicationhandler,Configuring the ReplicationHandler>>.=== Backup API@@ -58,7 +58,7 @@ The path where the backup will be created. If the path is not absolute then the|name |The snapshot will be created in a directory called `snapshot.<name>`. If a name is not specified then the directory name would have the following format: `snapshot.<yyyyMMddHHmmssSSS>`.`numberToKeep`::-The number of backups to keep. If `maxNumberOfBackups` has been specified on the replication handler in `solrconfig.xml`, `maxNumberOfBackups` is always used and attempts to use `numberToKeep` will cause an error. Also, this parameter is not taken into consideration if the backup name is specified. More information about `maxNumberOfBackups` can be found in the section <<index-replication.adoc#IndexReplication-ConfiguringtheReplicationHandler,Configuring the ReplicationHandler>>.+The number of backups to keep. If `maxNumberOfBackups` has been specified on the replication handler in `solrconfig.xml`, `maxNumberOfBackups` is always used and attempts to use `numberToKeep` will cause an error. Also, this parameter is not taken into consideration if the backup name is specified. More information about `maxNumberOfBackups` can be found in the section <<index-replication.adoc#configuring-the-replicationhandler,Configuring the ReplicationHandler>>.`repository`::The name of the repository to be used for the backup. If no repository is specified then the local filesystem repository will be used automatically.diff --git a/solr/solr-ref-guide/src/managed-resources.adoc b/solr/solr-ref-guide/src/managed-resources.adocindex 14fcffd7001..deb10cc112e 100644--- a/solr/solr-ref-guide/src/managed-resources.adoc+++ b/solr/solr-ref-guide/src/managed-resources.adoc@@ -33,14 +33,13 @@ All of the examples in this section assume you are running the "techproducts" Sobin/solr -e techproducts-----[[ManagedResources-Overview]]-== Overview+== Managed Resources OverviewLet's begin learning about managed resources by looking at a couple of examples provided by Solr for managing stop words and synonyms using a REST API. After reading this section, you'll be ready to dig into the details of how managed resources are implemented in Solr so you can start building your own implementation.=== Managing Stop Words-To begin, you need to define a field type that uses the <<filter-descriptions.adoc#FilterDescriptions-ManagedStopFilter,ManagedStopFilterFactory>>, such as:+To begin, you need to define a field type that uses the <<filter-descriptions.adoc#managed-stop-filter,ManagedStopFilterFactory>>, such as:[source,xml,subs="verbatim,callouts"]----@@ -55,7 +54,7 @@ To begin, you need to define a field type that uses the <<filter-descriptions.adThere are two important things to notice about this field type definition:-<1> The filter implementation class is `solr.ManagedStopFilterFactory`. This is a special implementation of the <<filter-descriptions.adoc#FilterDescriptions-StopFilter,StopFilterFactory>> that uses a set of stop words that are managed from a REST API.+<1> The filter implementation class is `solr.ManagedStopFilterFactory`. This is a special implementation of the <<filter-descriptions.adoc#stop-filter,StopFilterFactory>> that uses a set of stop words that are managed from a REST API.<2> The `managed=”english”` attribute gives a name to the set of managed stop words, in this case indicating the stop words are for English text.diff --git a/solr/solr-ref-guide/src/merging-indexes.adoc b/solr/solr-ref-guide/src/merging-indexes.adocindex 1c118517db4..cf1cd372850 100644--- a/solr/solr-ref-guide/src/merging-indexes.adoc+++ b/solr/solr-ref-guide/src/merging-indexes.adoc@@ -44,6 +44,6 @@ This will create a new index at `/path/to/newindex` that contains both index1 an== Using CoreAdmin-The `MERGEINDEXES` command of the <<coreadmin-api.adoc#CoreAdminAPI-MERGEINDEXES,CoreAdminHandler>> can be used to merge indexes into a new core – either from one or more arbitrary `indexDir` directories or by merging from one or more existing `srcCore` core names.+The `MERGEINDEXES` command of the <<coreadmin-api.adoc#coreadmin-mergeindexes,CoreAdminHandler>> can be used to merge indexes into a new core – either from one or more arbitrary `indexDir` directories or by merging from one or more existing `srcCore` core names.-See the <<coreadmin-api.adoc#CoreAdminAPI-MERGEINDEXES,CoreAdminHandler>> section for details.+See the <<coreadmin-api.adoc#coreadmin-mergeindexes,CoreAdminHandler>> section for details.diff --git a/solr/solr-ref-guide/src/near-real-time-searching.adoc b/solr/solr-ref-guide/src/near-real-time-searching.adocindex d4d196f2f5d..6556398e200 100644--- a/solr/solr-ref-guide/src/near-real-time-searching.adoc+++ b/solr/solr-ref-guide/src/near-real-time-searching.adoc@@ -127,7 +127,7 @@ curl http://localhost:8983/solr/my_collection/update?commitWithin=10000-H "Content-Type: text/xml" --data-binary '<add><doc><field name="id">testdoc</field></doc></add>'-----WARNING: While the `stream.body` feature is great for development and testing, it should normally not be enabled in production systems, as it lets a user with READ permissions post data that may alter the system state. The feature is disabled by default. See <<requestdispatcher-in-solrconfig.adoc#RequestDispatcherinSolrConfig-requestParsersElement,RequestDispatcher in SolrConfig>> for details.+WARNING: While the `stream.body` feature is great for development and testing, it should normally not be enabled in production systems, as it lets a user with READ permissions post data that may alter the system state. The feature is disabled by default. See <<requestdispatcher-in-solrconfig.adoc#requestparsers-element,RequestDispatcher in SolrConfig>> for details.=== Changing Default commitWithin Behaviordiff --git a/solr/solr-ref-guide/src/other-parsers.adoc b/solr/solr-ref-guide/src/other-parsers.adocindex 271c33b29c9..db484193775 100644--- a/solr/solr-ref-guide/src/other-parsers.adoc+++ b/solr/solr-ref-guide/src/other-parsers.adoc@@ -24,7 +24,6 @@ This section details the other parsers, and gives examples for how they might beMany of these parsers are expressed the same way as <<local-parameters-in-queries.adoc#local-parameters-in-queries,Local Parameters in Queries>>.-[[OtherParsers-BlockJoinQueryParsers]]== Block Join Query ParsersThere are two query parsers that support block joins. These parsers allow indexing and searching for relational content that has been<<uploading-data-with-index-handlers.adoc#uploading-data-with-index-handlers,indexed as nested documents>>.@@ -55,7 +54,6 @@ The example usage of the query parsers below assumes these two documents and eac</add>-----[[OtherParsers-BlockJoinChildrenQueryParser]]=== Block Join Children Query ParserThis parser takes a query that matches some parent documents and returns their children.@@ -80,16 +78,16 @@ Using the example documents above, we can construct a query such as `q={!child oNote that the query for `someParents` should match only parent documents passed by `allParents` or you may get an exception:-....+[literal]Parent query must not match any docs besides parent filter. Combine them as must (+) and must-not (-) clauses to find a problem doc.-....+In older version the error is:-....++[literal]Parent query yields document which is not matched by parents filter.-....+You can search for `q=+(someParents) -(allParents)` to find a cause.-[[OtherParsers-BlockJoinParentQueryParser]]=== Block Join Parent Query ParserThis parser takes a query that matches child documents and returns their parents.@@ -101,13 +99,15 @@ The parameter `allParents` is a filter that matches *only parent documents*; herThe parameter `someChildren` is a query that matches some or all of the child documents.Note that the query for `someChildren` should match only child documents or you may get an exception:-....++[literal]Child query must not match same docs with parent filter. Combine them as must clauses (+) to find a problem doc.-....-In older version it's:-....++In older version the error is:++[literal]child query must only match non-parent docs.-....+You can search for `q=+(parentFilter) +(someChildren)` to find a cause .Again using the example documents above, we can construct a query such as `q={!parent which="content_type:parentDocument"}comments:SolrCloud`. We get this document in response:@@ -133,20 +133,17 @@ A common mistake is to try to filter parents with a `which` filter, as in this bInstead, you should use a sibling mandatory clause as a filter:`q= *+title:join* +{!parent which="*content_type:parentDocument*"}comments:SolrCloud`-====-[[OtherParsers-Scoring]]-=== Scoring+=== Scoring with the Block Join Parent Query ParserYou can optionally use the `score` local parameter to return scores of the subordinate query. The values to use for this parameter define the type of aggregation, which are `avg` (average), `max` (maximum), `min` (minimum), `total (sum)`. Implicit default is `none` which returns `0.0`.-[[OtherParsers-BoostQueryParser]]== Boost Query Parser`BoostQParser` extends the `QParserPlugin` and creates a boosted query from the input value. The main value is the query to be boosted. Parameter `b` is the function query to use as the boost. The query to be boosted may be of any type.-Examples:+=== Boost Query Parser ExamplesCreates a query "foo" which is boosted (scores are multiplied) by the function query `log(popularity)`:@@ -162,7 +159,7 @@ Creates a query "foo" which is boosted by the date boosting function referenced{!boost b=recip(ms(NOW,mydatefield),3.16e-11,1,1)}foo-----[[OtherParsers-CollapsingQueryParser]]+[[other-collapsing]]== Collapsing Query ParserThe `CollapsingQParser` is really a _post filter_ that provides more performant field collapsing than Solr's standard approach when the number of distinct groups in the result set is high.@@ -171,7 +168,6 @@ This parser collapses the result set to a single document per group before it foDetails about using the `CollapsingQParser` can be found in the section <<collapse-and-expand-results.adoc#collapse-and-expand-results,Collapse and Expand Results>>.-[[OtherParsers-ComplexPhraseQueryParser]]== Complex Phrase Query ParserThe `ComplexPhraseQParser` provides support for wildcards, ORs, etc., inside phrase queries using Lucene's {lucene-javadocs}/queryparser/org/apache/lucene/queryparser/complexPhrase/ComplexPhraseQueryParser.html[`ComplexPhraseQueryParser`].@@ -204,15 +200,13 @@ A mix of ordered and unordered complex phrase queries:+_query_:"{!complexphrase inOrder=true}manu:\"a* c*\"" +_query_:"{!complexphrase inOrder=false df=name}\"bla* pla*\""-----[[OtherParsers-Limitations]]-=== Limitations+=== Complex Phrase Parser LimitationsPerformance is sensitive to the number of unique terms that are associated with a pattern. For instance, searching for "a*" will form a large OR clause (technically a SpanOr with many terms) for all of the terms in your index for the indicated field that start with the single letter 'a'. It may be prudent to restrict wildcards to at least two or preferably three letters as a prefix. Allowing very short prefixes may result in to many low-quality documents being returned.Notice that it also supports leading wildcards "*a" as well with consequent performance implications. Applying <<filter-descriptions.adoc#reversed-wildcard-filter,ReversedWildcardFilterFactory>> in index-time analysis is usually a good idea.-[[OtherParsers-MaxBooleanClauses]]-==== MaxBooleanClauses+==== MaxBooleanClauses with Complex Phrase ParserYou may need to increase MaxBooleanClauses in `solrconfig.xml` as a result of the term expansion above:@@ -221,10 +215,9 @@ You may need to increase MaxBooleanClauses in `solrconfig.xml` as a result of th<maxBooleanClauses>4096</maxBooleanClauses>-----This property is described in more detail in the section <<query-settings-in-solrconfig.adoc#QuerySettingsinSolrConfig-QuerySizingandWarming,Query Sizing and Warming>>.+This property is described in more detail in the section <<query-settings-in-solrconfig.adoc#query-sizing-and-warming,Query Sizing and Warming>>.-[[OtherParsers-Stopwords]]-==== Stopwords+==== Stopwords with Complex Phrase ParserIt is recommended not to use stopword elimination with this query parser.@@ -246,12 +239,10 @@ the document is returned. The next query that _does_ use the Complex Phrase Querdoes _not_ return that document because SpanNearQuery has no good way to handle stopwords in a way analogous to PhraseQuery. If you must remove stopwords for your use case, use a custom filter factory or perhaps a customized synonyms filter that reduces given stopwords to some impossible token.-[[OtherParsers-Escaping]]-==== Escaping+==== Escaping with Complex Phrase ParserSpecial care has to be given when escaping: clauses between double quotes (usually whole query) is parsed twice, these parts have to be escaped as twice. eg `"foo\\: bar\\^"`.-[[OtherParsers-FieldQueryParser]]== Field Query ParserThe `FieldQParser` extends the `QParserPlugin` and creates a field query from the input value, applying text analysis and constructing a phrase query if appropriate. The parameter `f` is the field to be queried.@@ -265,7 +256,6 @@ Example:This example creates a phrase query with "foo" followed by "bar" (assuming the analyzer for `myfield` is a text field with an analyzer that splits on whitespace and lowercase terms). This is generally equivalent to the Lucene query parser expression `myfield:"Foo Bar"`.-[[OtherParsers-FunctionQueryParser]]== Function Query ParserThe `FunctionQParser` extends the `QParserPlugin` and creates a function query from the input value. This is only one way to use function queries in Solr; for another, more integrated, approach, see the section on <<function-queries.adoc#function-queries,Function Queries>>.@@ -277,7 +267,6 @@ Example:{!func}log(foo)-----[[OtherParsers-FunctionRangeQueryParser]]== Function Range Query ParserThe `FunctionRangeQParser` extends the `QParserPlugin` and creates a range query over a function. This is also referred to as `frange`, as seen in the examples below.@@ -312,15 +301,13 @@ Both of these examples restrict the results by a range of values found in a declFor more information about range queries over functions, see Yonik Seeley's introductory blog post https://lucidworks.com/2009/07/06/ranges-over-functions-in-solr-14/[Ranges over Functions in Solr 1.4].-[[OtherParsers-GraphQueryParser]]== Graph Query ParserThe `graph` query parser does a breadth first, cyclic aware, graph traversal of all documents that are "reachable" from a starting set of root documents identified by a wrapped query.The graph is built according to linkages between documents based on the terms found in `from` and `to` fields that you specify as part of the query.-[[OtherParsers-Parameters]]-=== Parameters+=== Graph Query Parameters`to`::The field name of matching documents to inspect to identify outgoing edges for graph traversal. Defaults to `edge_ids`.@@ -342,17 +329,15 @@ Boolean that indicates if the results of the query should be filtered so that on`useAutn`:: Boolean that indicates if an Automatons should be compiled for each iteration of the breadth first search, which may be faster for some graphs. Defaults to `false`.-[[OtherParsers-Limitations.1]]-=== Limitations+=== Graph Query LimitationsThe `graph` parser only works in single node Solr installations, or with <<solrcloud.adoc#solrcloud,SolrCloud>> collections that use exactly 1 shard.-[[OtherParsers-Examples]]-=== Examples+=== Graph Query ExamplesTo understand how the graph parser works, consider the following Directed Cyclic Graph, containing 8 nodes (A to H) and 9 edges (1 to 9):-image::images/other-parsers/graph_qparser_example.png[image,height=200]+image::images/other-parsers/graph_qparser_example.png[image,height=100]One way to model this graph as Solr documents, would be to create one document per node, with mutivalued fields identifying the incoming and outgoing edges for each node:@@ -426,7 +411,6 @@ http://localhost:8983/solr/my_graph/query?fl=id&q={!graph+from=in_edge+to=out_ed}-----[[OtherParsers-SimplifiedModels]]=== Simplified ModelsThe Document & Field modeling used in the above examples enumerated all of the outgoing and income edges for each node explicitly, to help demonstrate exactly how the "from" and "to" params work, and to give you an idea of what is possible. With multiple sets of fields like these for identifying incoming and outgoing edges, it's possible to model many independent Directed Graphs that contain some or all of the documents in your collection.@@ -469,7 +453,6 @@ http://localhost:8983/solr/alt_graph/query?fl=id&q={!graph+from=id+to=out_edge+m}-----[[OtherParsers-JoinQueryParser]]== Join Query Parser`JoinQParser` extends the `QParserPlugin`. It allows normalizing relationships between documents with a join operation. This is different from the concept of a join in a relational database because no information is being truly joined. An appropriate SQL analogy would be an "inner query".@@ -493,8 +476,7 @@ fq = price:[* TO 12]The join operation is done on a term basis, so the "from" and "to" fields must use compatible field types. For example: joining between a `StrField` and a `TrieIntField` will not work, likewise joining between a `StrField` and a `TextField` that uses `LowerCaseFilterFactory` will only work for values that are already lower cased in the string field.-[[OtherParsers-Scoring.1]]-=== Scoring+=== Join Parser ScoringYou can optionally use the `score` parameter to return scores of the subordinate query. The values to use for this parameter define the type of aggregation, which are `avg` (average), `max` (maximum), `min` (minimum) `total`, or `none`.@@ -504,7 +486,6 @@ You can optionally use the `score` parameter to return scores of the subordinateSpecifying `score` local parameter switches the join algorithm. This might have performance implication on large indices, but it's more important that this algorithm won't work for single value numeric field starting from 7.0. Users are encouraged to change field types to string and rebuild indexes during migration.====-[[OtherParsers-JoiningAcrossCollections]]=== Joining Across CollectionsYou can also specify a `fromIndex` parameter to join with a field from another core or collection. If running in SolrCloud mode, then the collection specified in the `fromIndex` parameter must have a single shard and a replica on all Solr nodes where the collection you're joining to has a replica.@@ -548,7 +529,6 @@ At query time, the `JoinQParser` will access the local replica of the *movie_dirFor more information about join queries, see the Solr Wiki page on http://wiki.apache.org/solr/Join[Joins]. Erick Erickson has also written a blog post about join performance titled https://lucidworks.com/2012/06/20/solr-and-joins/[Solr and Joins].-[[OtherParsers-LuceneQueryParser]]== Lucene Query ParserThe `LuceneQParser` extends the `QParserPlugin` by parsing Solr's variant on the Lucene QueryParser syntax. This is effectively the same query parser that is used in Lucene. It uses the operators `q.op`, the default operator ("OR" or "AND") and `df`, the default field name.@@ -562,7 +542,6 @@ Example:For more information about the syntax for the Lucene Query Parser, see the {lucene-javadocs}/queryparser/org/apache/lucene/queryparser/classic/package-summary.html[Classic QueryParser javadocs].-[[OtherParsers-LearningToRankQueryParser]]== Learning To Rank Query ParserThe `LTRQParserPlugin` is a special purpose parser for reranking the top results of a simple query using a more complex ranking query which is based on a machine learnt model.@@ -576,7 +555,6 @@ Example:Details about using the `LTRQParserPlugin` can be found in the <<learning-to-rank.adoc#learning-to-rank,Learning To Rank>> section.-[[OtherParsers-MaxScoreQueryParser]]== Max Score Query ParserThe `MaxScoreQParser` extends the `LuceneQParser` but returns the Max score from the clauses. It does this by wrapping all `SHOULD` clauses in a `DisjunctionMaxQuery` with tie=1.0. Any `MUST` or `PROHIBITED` clauses are passed through as-is. Non-boolean queries, e.g., NumericRange falls-through to the `LuceneQParser` parser behavior.@@ -588,7 +566,6 @@ Example:{!maxscore tie=0.01}C OR (D AND E)-----[[OtherParsers-MoreLikeThisQueryParser]]== More Like This Query Parser`MLTQParser` enables retrieving documents that are similar to a given document. It uses Lucene's existing `MoreLikeThis` logic and also works in SolrCloud mode. The document identifier used here is the unique id value and not the Lucene internal document id. The list of returned documents excludes the queried document.@@ -638,7 +615,6 @@ Adding more constraints to what qualifies as similar using mintf and mindf.{!mlt qf=name mintf=2 mindf=3}1-----[[OtherParsers-NestedQueryParser]]== Nested Query ParserThe `NestedParser` extends the `QParserPlugin` and creates a nested query, with the ability for that query to redefine its type via local parameters. This is useful in specifying defaults in configuration and letting clients indirectly reference them.@@ -662,7 +638,6 @@ If the `q1` parameter is price, then the query would be a function query on theFor more information about the possibilities of nested queries, see Yonik Seeley's blog post https://lucidworks.com/2009/03/31/nested-queries-in-solr/[Nested Queries in Solr].-[[OtherParsers-PayloadQueryParsers]]== Payload Query ParsersThese query parsers utilize payloads encoded on terms during indexing.@@ -672,7 +647,6 @@ The main query, for both of these parsers, is parsed straightforwardly from the* `PayloadScoreQParser`* `PayloadCheckQParser`-[[OtherParsers-PayloadScoreParser]]=== Payload Score Parser`PayloadScoreQParser` incorporates each matching term's numeric (integer or float) payloads into the scores.@@ -695,7 +669,6 @@ If `true`, multiples computed payload factor by the score of the original query.{!payload_score f=my_field_dpf v=some_term func=max}-----[[OtherParsers-PayloadCheckParser]]=== Payload Check Parser`PayloadCheckQParser` only matches when the matching terms also have the specified payloads.@@ -719,7 +692,6 @@ Each specified payload will be encoded using the encoder determined from the fie{!payload_check f=words_dps payloads="VERB NOUN"}searching stuff-----[[OtherParsers-PrefixQueryParser]]== Prefix Query Parser`PrefixQParser` extends the `QParserPlugin` by creating a prefix query from the input value. Currently no analysis or value transformation is done to create this prefix query.@@ -735,7 +707,6 @@ Example:This would be generally equivalent to the Lucene query parser expression `myfield:foo*`.-[[OtherParsers-RawQueryParser]]== Raw Query Parser`RawQParser` extends the `QParserPlugin` by creating a term query from the input value without any text analysis or transformation. This is useful in debugging, or when raw terms are returned from the terms component (this is not the default).@@ -751,18 +722,16 @@ Example:This example constructs the query: `TermQuery(Term("myfield","Foo Bar"))`.-For easy filter construction to drill down in faceting, the <<OtherParsers-TermQueryParser,TermQParserPlugin>> is recommended.+For easy filter construction to drill down in faceting, the <<Term Query Parser,TermQParserPlugin>> is recommended.-For full analysis on all fields, including text fields, you may want to use the <<OtherParsers-FieldQueryParser,FieldQParserPlugin>>.+For full analysis on all fields, including text fields, you may want to use the <<Field Query Parser,FieldQParserPlugin>>.-[[OtherParsers-Re-RankingQueryParser]]== Re-Ranking Query ParserThe `ReRankQParserPlugin` is a special purpose parser for Re-Ranking the top results of a simple query using a more complex ranking query.Details about using the `ReRankQParserPlugin` can be found in the <<query-re-ranking.adoc#query-re-ranking,Query Re-Ranking>> section.-[[OtherParsers-SimpleQueryParser]]== Simple Query ParserThe Simple query parser in Solr is based on Lucene's SimpleQueryParser. This query parser is designed to allow users to enter queries however they want, and it will do its best to interpret the query and return results.@@ -811,14 +780,12 @@ Defines the default field if none is defined in the Schema, or overrides the defAny errors in syntax are ignored and the query parser will interpret queries as best it can. However, this can lead to odd results in some cases.-[[OtherParsers-SpatialQueryParsers]]== Spatial Query ParsersThere are two spatial QParsers in Solr: `geofilt` and `bbox`. But there are other ways to query spatially: using the `frange` parser with a distance function, using the standard (lucene) query parser with the range syntax to pick the corners of a rectangle, or with RPT and BBoxField you can use the standard query parser but use a special syntax within quotes that allows you to pick the spatial predicate.All these options are documented further in the section <<spatial-search.adoc#spatial-search,Spatial Search>>.-[[OtherParsers-SurroundQueryParser]]== Surround Query ParserThe `SurroundQParser` enables the Surround query syntax, which provides proximity search functionality. There are two positional operators: `w` creates an ordered span query and `n` creates an unordered one. Both operators take a numeric value to indicate distance between two terms. The default is 1, and the maximum is 99.@@ -838,7 +805,6 @@ This query parser will also accept boolean operators (`AND`, `OR`, and `NOT`, inThe non-unary operators (everything but `NOT`) support both infix `(a AND b AND c)` and prefix `AND(a, b, c)` notation.-[[OtherParsers-SwitchQueryParser]]== Switch Query Parser`SwitchQParser` is a `QParserPlugin` that acts like a "switch" or "case" statement.@@ -895,7 +861,6 @@ Using the example configuration below, clients can optionally specify the custom</requestHandler>-----[[OtherParsers-TermQueryParser]]== Term Query Parser`TermQParser` extends the `QParserPlugin` by creating a single term query from the input value equivalent to `readableToIndexed()`. This is useful for generating filter queries from the external human readable terms returned by the faceting or terms components. The only parameter is `f`, for the field.@@ -907,14 +872,13 @@ Example:{!term f=weight}1.5-----For text fields, no analysis is done since raw terms are already returned from the faceting and terms components. To apply analysis to text fields as well, see the <<OtherParsers-FieldQueryParser,Field Query Parser>>, above.+For text fields, no analysis is done since raw terms are already returned from the faceting and terms components. To apply analysis to text fields as well, see the <<Field Query Parser>>, above.-If no analysis or transformation is desired for any type of field, see the <<OtherParsers-RawQueryParser,Raw Query Parser>>, above.+If no analysis or transformation is desired for any type of field, see the <<Raw Query Parser>>, above.-[[OtherParsers-TermsQueryParser]]== Terms Query Parser-`TermsQParser` functions similarly to the <<OtherParsers-TermQueryParser,Term Query Parser>> but takes in multiple values separated by commas and returns documents matching any of the specified values.+`TermsQParser` functions similarly to the <<Term Query Parser,Term Query Parser>> but takes in multiple values separated by commas and returns documents matching any of the specified values.This can be useful for generating filter queries from the external human readable terms returned by the faceting or terms components, and may be more efficient in some cases than using the <<the-standard-query-parser.adoc#the-standard-query-parser,Standard Query Parser>> to generate an boolean query since the default implementation `method` avoids scoring.@@ -929,7 +893,6 @@ Separator to use when parsing the input. If set to " " (a single blank space), w`method`::The internal query-building implementation: `termsFilter`, `booleanQuery`, `automaton`, or `docValuesTermsFilter`. Defaults to `termsFilter`.-*Examples*[source,text]@@ -942,7 +905,6 @@ The internal query-building implementation: `termsFilter`, `booleanQuery`, `auto{!terms f=categoryId method=booleanQuery separator=" "}8 6 7 5309-----[[OtherParsers-XMLQueryParser]]== XML Query ParserThe {solr-javadocs}/solr-core/org/apache/solr/search/XmlQParserPlugin.html[XmlQParserPlugin] extends the {solr-javadocs}/solr-core/org/apache/solr/search/QParserPlugin.html[QParserPlugin] and supports the creation of queries from XML. Example:@@ -1002,7 +964,6 @@ The XmlQParser implementation uses the {solr-javadocs}/solr-core/org/apache/solr|<LegacyNumericRangeQuery> |LegacyNumericRangeQuery(Builder) is deprecated|===-[[OtherParsers-CustomizingXMLQueryParser]]=== Customizing XML Query ParserYou can configure your own custom query builders for additional XML elements. The custom builders need to extend the {solr-javadocs}/solr-core/org/apache/solr/search/SolrQueryBuilder.html[SolrQueryBuilder] or the {solr-javadocs}/solr-core/org/apache/solr/search/SolrSpanQueryBuilder.html[SolrSpanQueryBuilder] class. Example solrconfig.xml snippet:diff --git a/solr/solr-ref-guide/src/other-schema-elements.adoc b/solr/solr-ref-guide/src/other-schema-elements.adocindex 029cd641185..cd39401b238 100644--- a/solr/solr-ref-guide/src/other-schema-elements.adoc+++ b/solr/solr-ref-guide/src/other-schema-elements.adoc@@ -20,7 +20,6 @@This section describes several other important elements of `schema.xml` not covered in earlier sections.-[[OtherSchemaElements-UniqueKey]]== Unique KeyThe `uniqueKey` element specifies which field is a unique identifier for documents. Although `uniqueKey` is not required, it is nearly always warranted by your application design. For example, `uniqueKey` should be used if you will ever update a document in the index.@@ -37,7 +36,6 @@ Schema defaults and `copyFields` cannot be used to populate the `uniqueKey` fielFurther, 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-Similarity]]== SimilaritySimilarity is a Lucene class used to score a document in searching.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.adocindex 60ae891eee8..4389c5f3bec 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@@ -54,7 +54,7 @@ Faceting makes use of fields defined when the search applications were indexed.Solr also supports a feature called <<morelikethis.adoc#morelikethis,MoreLikeThis>>, which enables users to submit new queries that focus on particular terms returned in an earlier query. MoreLikeThis queries can make use of faceting or clustering to provide additional aid to users.-A Solr component called a <<response-writers.adoc#response-writers,*response writer*>> manages the final presentation of the query response. Solr includes a variety of response writers, including an <<response-writers.adoc#ResponseWriters-TheStandardXMLResponseWriter,XML Response Writer>> and a <<response-writers.adoc#ResponseWriters-JSONResponseWriter,JSON Response Writer>>.+A Solr component called a <<response-writers.adoc#response-writers,*response writer*>> manages the final presentation of the query response. Solr includes a variety of response writers, including an <<response-writers.adoc#standard-xml-response-writer,XML Response Writer>> and a <<response-writers.adoc#json-response-writer,JSON Response Writer>>.The diagram below summarizes some key elements of the search process.diff --git a/solr/solr-ref-guide/src/pagination-of-results.adoc b/solr/solr-ref-guide/src/pagination-of-results.adocindex a9c83680205..130a6c70cfd 100644--- a/solr/solr-ref-guide/src/pagination-of-results.adoc+++ b/solr/solr-ref-guide/src/pagination-of-results.adoc@@ -24,7 +24,7 @@ In most search applications, the "top" matching results (sorted by score, or somIn many applications the UI for these sorted results are displayed to the user in "pages" containing a fixed number of matching results, and users don't typically look at results past the first few pages worth of results.== Basic Pagination-In Solr, this basic paginated searching is supported using the `start` and `rows` parameters, and performance of this common behaviour can be tuned by utilizing the <<query-settings-in-solrconfig.adoc#QuerySettingsinSolrConfig-queryResultCache,`queryResultCache`>> and adjusting the <<query-settings-in-solrconfig.adoc#QuerySettingsinSolrConfig-queryResultWindowSize,`queryResultWindowSize`>> configuration options based on your expected page sizes.+In Solr, this basic paginated searching is supported using the `start` and `rows` parameters, and performance of this common behaviour can be tuned by utilizing the <<query-settings-in-solrconfig.adoc#queryresultcache,`queryResultCache`>> and adjusting the <<query-settings-in-solrconfig.adoc#queryresultwindowsize,`queryResultWindowSize`>> configuration options based on your expected page sizes.=== Basic Pagination Examples@@ -103,7 +103,7 @@ There are a few important constraints to be aware of when using `cursorMark` par* If `id` is your uniqueKey field, then sort params like `id asc` and `name asc, id desc` would both work fine, but `name asc` by itself would not. Sorts including <<working-with-dates.adoc#working-with-dates,Date Math>> based functions that involve calculations relative to `NOW` will cause confusing results, since every document will get a new sort value on every subsequent request. This can easily result in cursors that never end, and constantly return the same documents over and over – even if the documents are never updated.+-In this situation, choose & re-use a fixed value for the <<working-with-dates.adoc#WorkingwithDates-NOW,`NOW` request param>> in all of your cursor requests.+In this situation, choose & re-use a fixed value for the <<working-with-dates.adoc#now,`NOW` request param>> in all of your cursor requests.Cursor mark values are computed based on the sort values of each document in the result, which means multiple documents with identical sort values will produce identical Cursor mark values if one of them is the last document on a page of results. In that situation, the subsequent request using that `cursorMark` would not know which of the documents with the identical mark values should be skipped. Requiring that the uniqueKey field be used as a clause in the sort criteria guarantees that a deterministic ordering will be returned, and that every `cursorMark` value will identify a unique point in the sequence of documents.diff --git a/solr/solr-ref-guide/src/performance-statistics-reference.adoc b/solr/solr-ref-guide/src/performance-statistics-reference.adocindex 50bc6011b64..99878504578 100644--- a/solr/solr-ref-guide/src/performance-statistics-reference.adoc+++ b/solr/solr-ref-guide/src/performance-statistics-reference.adoc@@ -24,7 +24,7 @@ The same statistics are also exposed via the <<mbean-request-handler.adoc#mbean-These statistics are per core. When you are running in SolrCloud mode these statistics would co-relate to each performance of an individual replica.-== Request Handlers+== Request Handler Statistics=== Update Request Handler@@ -93,7 +93,7 @@ Both Update Request Handler and Search Request Handler along with handlers like|transaction_logs_total_size |Total size of all the TLogs created so far from the beginning of the Solr instance.|===-== Caches+== Cache Statistics=== Document Cachediff --git a/solr/solr-ref-guide/src/phonetic-matching.adoc b/solr/solr-ref-guide/src/phonetic-matching.adocindex 0e7c81afcf7..6cd419cf9e7 100644--- a/solr/solr-ref-guide/src/phonetic-matching.adoc+++ b/solr/solr-ref-guide/src/phonetic-matching.adoc@@ -22,11 +22,9 @@ Phonetic matching algorithms may be used to encode tokens so that two differentFor overviews of and comparisons between algorithms, see http://en.wikipedia.org/wiki/Phonetic_algorithm and http://ntz-develop.blogspot.com/2011/03/phonetic-algorithms.html--[[PhoneticMatching-Beider-MorsePhoneticMatching_BMPM_]]== Beider-Morse Phonetic Matching (BMPM)-For examples of how to use this encoding in your analyzer, see <<filter-descriptions.adoc#FilterDescriptions-Beider-MorseFilter,Beider Morse Filter>> in the Filter Descriptions section.+For examples of how to use this encoding in your analyzer, see <<filter-descriptions.adoc#beider-morse-filter,Beider Morse Filter>> in the Filter Descriptions section.Beider-Morse Phonetic Matching (BMPM) is a "soundalike" tool that lets you search using a new phonetic matching system. BMPM helps you search for personal names (or just surnames) in a Solr/Lucene index, and is far superior to the existing phonetic codecs, such as regular soundex, metaphone, caverphone, etc.@@ -59,7 +57,7 @@ For more information, see here: http://stevemorse.org/phoneticinfo.htm and http:== Daitch-Mokotoff Soundex-To use this encoding in your analyzer, see <<filter-descriptions.adoc#FilterDescriptions-Daitch-MokotoffSoundexFilter,Daitch-Mokotoff Soundex Filter>> in the Filter Descriptions section.+To use this encoding in your analyzer, see <<filter-descriptions.adoc#daitch-mokotoff-soundex-filter,Daitch-Mokotoff Soundex Filter>> in the Filter Descriptions section.The Daitch-Mokotoff Soundex algorithm is a refinement of the Russel and American Soundex algorithms, yielding greater accuracy in matching especially Slavic and Yiddish surnames with similar pronunciation but differences in spelling.@@ -76,13 +74,13 @@ For more information, see http://en.wikipedia.org/wiki/Daitch%E2%80%93Mokotoff_S== Double Metaphone-To use this encoding in your analyzer, see <<filter-descriptions.adoc#FilterDescriptions-DoubleMetaphoneFilter,Double Metaphone Filter>> in the Filter Descriptions section. Alternatively, you may specify `encoding="DoubleMetaphone"` with the <<filter-descriptions.adoc#FilterDescriptions-PhoneticFilter,Phonetic Filter>>, but note that the Phonetic Filter version will *not* provide the second ("alternate") encoding that is generated by the Double Metaphone Filter for some tokens.+To use this encoding in your analyzer, see <<filter-descriptions.adoc#double-metaphone-filter,Double Metaphone Filter>> in the Filter Descriptions section. Alternatively, you may specify `encoding="DoubleMetaphone"` with the <<filter-descriptions.adoc#phonetic-filter,Phonetic Filter>>, but note that the Phonetic Filter version will *not* provide the second ("alternate") encoding that is generated by the Double Metaphone Filter for some tokens.Encodes tokens using the double metaphone algorithm by Lawrence Philips. See the original article at http://www.drdobbs.com/the-double-metaphone-search-algorithm/184401251?pgno=2== Metaphone-To use this encoding in your analyzer, specify `encoding="Metaphone"` with the <<filter-descriptions.adoc#FilterDescriptions-PhoneticFilter,Phonetic Filter>>.+To use this encoding in your analyzer, specify `encoding="Metaphone"` with the <<filter-descriptions.adoc#phonetic-filter,Phonetic Filter>>.Encodes tokens using the Metaphone algorithm by Lawrence Philips, described in "Hanging on the Metaphone" in Computer Language, Dec. 1990.@@ -91,7 +89,7 @@ Another reference for more information is http://www.drdobbs.com/the-double-meta== Soundex-To use this encoding in your analyzer, specify `encoding="Soundex"` with the <<filter-descriptions.adoc#FilterDescriptions-PhoneticFilter,Phonetic Filter>>.+To use this encoding in your analyzer, specify `encoding="Soundex"` with the <<filter-descriptions.adoc#phonetic-filter,Phonetic Filter>>.Encodes tokens using the Soundex algorithm, which is used to relate similar names, but can also be used as a general purpose scheme to find words with similar phonemes.@@ -99,7 +97,7 @@ See also http://en.wikipedia.org/wiki/Soundex.== Refined Soundex-To use this encoding in your analyzer, specify `encoding="RefinedSoundex"` with the <<filter-descriptions.adoc#FilterDescriptions-PhoneticFilter,Phonetic Filter>>.+To use this encoding in your analyzer, specify `encoding="RefinedSoundex"` with the <<filter-descriptions.adoc#phonetic-filter,Phonetic Filter>>.Encodes tokens using an improved version of the Soundex algorithm.@@ -107,7 +105,7 @@ See http://en.wikipedia.org/wiki/Soundex.== Caverphone-To use this encoding in your analyzer, specify `encoding="Caverphone"` with the <<filter-descriptions.adoc#FilterDescriptions-PhoneticFilter,Phonetic Filter>>.+To use this encoding in your analyzer, specify `encoding="Caverphone"` with the <<filter-descriptions.adoc#phonetic-filter,Phonetic Filter>>.Caverphone is an algorithm created by the Caversham Project at the University of Otago. The algorithm is optimised for accents present in the southern part of the city of Dunedin, New Zealand.@@ -115,7 +113,7 @@ See http://en.wikipedia.org/wiki/Caverphone and the Caverphone 2.0 specification== Kölner Phonetik a.k.a. Cologne Phonetic-To use this encoding in your analyzer, specify `encoding="ColognePhonetic"` with the <<filter-descriptions.adoc#FilterDescriptions-PhoneticFilter,Phonetic Filter>>.+To use this encoding in your analyzer, specify `encoding="ColognePhonetic"` with the <<filter-descriptions.adoc#phonetic-filter,Phonetic Filter>>.The Kölner Phonetik, an algorithm published by Hans Joachim Postel in 1969, is optimized for the German language.@@ -123,7 +121,7 @@ See http://de.wikipedia.org/wiki/K%C3%B6lner_Phonetik== NYSIIS-To use this encoding in your analyzer, specify `encoding="Nysiis"` with the <<filter-descriptions.adoc#FilterDescriptions-PhoneticFilter,Phonetic Filter>>.+To use this encoding in your analyzer, specify `encoding="Nysiis"` with the <<filter-descriptions.adoc#phonetic-filter,Phonetic Filter>>.NYSIIS is an encoding used to relate similar names, but can also be used as a general purpose scheme to find words with similar phonemes.diff --git a/solr/solr-ref-guide/src/post-tool.adoc b/solr/solr-ref-guide/src/post-tool.adocindex e0391af836f..1cbaa92f8e3 100644--- a/solr/solr-ref-guide/src/post-tool.adoc+++ b/solr/solr-ref-guide/src/post-tool.adoc@@ -20,7 +20,7 @@Solr includes a simple command line tool for POSTing various types of content to a Solr server.-The tool is `bin/post`. The bin/post tool is a Unix shell script; for Windows (non-Cygwin) usage, see the <<PostTool-WindowsSupport,Windows section>> below.+The tool is `bin/post`. The bin/post tool is a Unix shell script; for Windows (non-Cygwin) usage, see the section <<Post Tool Windows Support>> below.To run it, open a window and enter:@@ -116,7 +116,7 @@ Index a tab-separated file into `gettingstarted`:bin/post -c signals -params "separator=%09" -type text/csv data.tsv-----The content type (`-type`) parameter is required to treat the file as the proper type, otherwise it will be ignored and a WARNING logged as it does not know what type of content a .tsv file is. The <<uploading-data-with-index-handlers.adoc#UploadingDatawithIndexHandlers-CSVFormattedIndexUpdates,CSV handler>> supports the `separator` parameter, and is passed through using the `-params` setting.+The content type (`-type`) parameter is required to treat the file as the proper type, otherwise it will be ignored and a WARNING logged as it does not know what type of content a .tsv file is. The <<uploading-data-with-index-handlers.adoc#csv-formatted-index-updates,CSV handler>> supports the `separator` parameter, and is passed through using the `-params` setting.=== Indexing JSON@@ -159,8 +159,7 @@ Index a pdf as the user solr with password `SolrRocks`:bin/post -u solr:SolrRocks -c gettingstarted a.pdf-----[[PostTool-WindowsSupport]]-== Windows Support+== Post Tool Windows Support`bin/post` exists currently only as a Unix shell script, however it delegates its work to a cross-platform capable Java program. The <<SimplePostTool>> can be run directly in supported environments, including Windows.diff --git a/solr/solr-ref-guide/src/query-settings-in-solrconfig.adoc b/solr/solr-ref-guide/src/query-settings-in-solrconfig.adocindex 1a6b315ea0a..09a8f0a4753 100644--- a/solr/solr-ref-guide/src/query-settings-in-solrconfig.adoc+++ b/solr/solr-ref-guide/src/query-settings-in-solrconfig.adoc@@ -29,7 +29,6 @@ These settings are all configured in child elements of the `<query>` element in</query>-----[[QuerySettingsinSolrConfig-Caches]]== CachesSolr caches are associated with a specific instance of an Index Searcher, a specific view of an index that doesn't change during the lifetime of that searcher. As long as that Index Searcher is being used, any items in its cache will be valid and available for reuse. Caching in Solr differs from caching in many other applications in that cached Solr objects do not expire after a time interval; instead, they remain valid for the lifetime of the Index Searcher.@@ -54,7 +53,6 @@ FastLRUCache and LFUCache support `showItems` attribute. This is the number of cDetails of each cache are described below.-[[QuerySettingsinSolrConfig-filterCache]]=== filterCacheThis cache is used by `SolrIndexSearcher` for filters (DocSets) for unordered sets of all documents that match a query. The numeric attributes control the number of entries in the cache.@@ -71,7 +69,6 @@ Solr also uses this cache for faceting when the configuration parameter `facet.mautowarmCount="128"/>-----[[QuerySettingsinSolrConfig-queryResultCache]]=== queryResultCacheThis cache holds the results of previous searches: ordered lists of document IDs (DocList) based on a query, a sort, and the range of documents requested.@@ -87,7 +84,6 @@ The `queryResultCache` has an additional (optional) setting to limit the maximummaxRamMB="1000"/>-----[[QuerySettingsinSolrConfig-documentCache]]=== documentCacheThis cache holds Lucene Document objects (the stored fields for each document). Since Lucene internal document IDs are transient, this cache is not auto-warmed. The size for the `documentCache` should always be greater than `max_results` times the `max_concurrent_queries`, to ensure that Solr does not need to refetch a document during a request. The more fields you store in your documents, the higher the memory usage of this cache will be.@@ -100,7 +96,6 @@ This cache holds Lucene Document objects (the stored fields for each document).autowarmCount="0"/>-----[[QuerySettingsinSolrConfig-UserDefinedCaches]]=== User Defined CachesYou can also define named caches for your own application code to use. You can locate and use your cache object by name by calling the `SolrIndexSearcher` methods `getCache()`, `cacheLookup()` and `cacheInsert()`.@@ -116,10 +111,8 @@ You can also define named caches for your own application code to use. You can lIf you want auto-warming of your cache, include a `regenerator` attribute with the fully qualified name of a class that implements `solr.search.CacheRegenerator`. You can also use the `NoOpRegenerator`, which simply repopulates the cache with old items. Define it with the `regenerator` parameter as`: regenerator="solr.NoOpRegenerator"`.-[[QuerySettingsinSolrConfig-QuerySizingandWarming]]== Query Sizing and Warming-[[QuerySettingsinSolrConfig-maxBooleanClauses]]=== maxBooleanClausesThis sets the maximum number of clauses allowed in a boolean query. This can affect range or prefix queries that expand to a query with a large number of boolean terms. If this limit is exceeded, an exception is thrown.@@ -134,7 +127,6 @@ This sets the maximum number of clauses allowed in a boolean query. This can affThis option modifies a global property that effects all Solr cores. If multiple `solrconfig.xml` files disagree on this property, the value at any point in time will be based on the last Solr core that was initialized.====-[[QuerySettingsinSolrConfig-enableLazyFieldLoading]]=== enableLazyFieldLoadingIf this parameter is set to true, then fields that are not directly requested will be loaded lazily as needed. This can boost performance if the most common queries only need a small subset of fields, especially if infrequently accessed fields are large in size.@@ -144,7 +136,6 @@ If this parameter is set to true, then fields that are not directly requested wi<enableLazyFieldLoading>true</enableLazyFieldLoading>-----[[QuerySettingsinSolrConfig-useFilterForSortedQuery]]=== useFilterForSortedQueryThis parameter configures Solr to use a filter to satisfy a search. If the requested sort does not include "score", the `filterCache` will be checked for a filter matching the query. For most situations, this is only useful if the same search is requested often with different sort options and none of them ever use "score".@@ -154,7 +145,6 @@ This parameter configures Solr to use a filter to satisfy a search. If the reque<useFilterForSortedQuery>true</useFilterForSortedQuery>-----[[QuerySettingsinSolrConfig-queryResultWindowSize]]=== queryResultWindowSizeUsed with the `queryResultCache`, this will cache a superset of the requested number of document IDs. For example, if the a search in response to a particular query requests documents 10 through 19, and `queryWindowSize` is 50, documents 0 through 49 will be cached.@@ -164,7 +154,6 @@ Used with the `queryResultCache`, this will cache a superset of the requested nu<queryResultWindowSize>20</queryResultWindowSize>-----[[QuerySettingsinSolrConfig-queryResultMaxDocsCached]]=== queryResultMaxDocsCachedThis parameter sets the maximum number of documents to cache for any entry in the `queryResultCache`.@@ -174,7 +163,6 @@ This parameter sets the maximum number of documents to cache for any entry in th<queryResultMaxDocsCached>200</queryResultMaxDocsCached>-----[[QuerySettingsinSolrConfig-useColdSearcher]]=== useColdSearcherThis setting controls whether search requests for which there is not a currently registered searcher should wait for a new searcher to warm up (false) or proceed immediately (true). When set to "false", requests will block until the searcher has warmed its caches.@@ -184,7 +172,6 @@ This setting controls whether search requests for which there is not a currently<useColdSearcher>false</useColdSearcher>-----[[QuerySettingsinSolrConfig-maxWarmingSearchers]]=== maxWarmingSearchersThis parameter sets the maximum number of searchers that may be warming up in the background at any given time. Exceeding this limit will raise an error. For read-only slaves, a value of two is reasonable. Masters should probably be set a little higher.@@ -194,10 +181,9 @@ This parameter sets the maximum number of searchers that may be warming up in th<maxWarmingSearchers>2</maxWarmingSearchers>-----[[QuerySettingsinSolrConfig-Query-RelatedListeners]]== Query-Related Listeners-As described in the section on <<QuerySettingsinSolrConfig-Caches,Caches>>, new Index Searchers are cached. It's possible to use the triggers for listeners to perform query-related tasks. The most common use of this is to define queries to further "warm" the Index Searchers while they are starting. One benefit of this approach is that field caches are pre-populated for faster sorting.+As described in the section on <<Caches>>, new Index Searchers are cached. It's possible to use the triggers for listeners to perform query-related tasks. The most common use of this is to define queries to further "warm" the Index Searchers while they are starting. One benefit of this approach is that field caches are pre-populated for faster sorting.Good query selection is key with this type of listener. It's best to choose your most common and/or heaviest queries and include not just the keywords used, but any other parameters such as sorting or filtering requests.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.adocindex 947c76017f2..9f9f0412ec7 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@@ -22,14 +22,12 @@ SolrCloud supports elasticity, high availability, and fault tolerance in reads aWhat this means, basically, is that when you have a large cluster, you can always make requests to the cluster: Reads will return results whenever possible, even if some nodes are down, and Writes will be acknowledged only if they are durable; i.e., you won't lose data.-[[ReadandWriteSideFaultTolerance-ReadSideFaultTolerance]]== Read Side Fault ToleranceIn a SolrCloud cluster each individual node load balances read requests across all the replicas in collection. You still need a load balancer on the 'outside' that talks to the cluster, or you need a smart client which understands how to read and interact with Solr's metadata in ZooKeeper and only requests the ZooKeeper ensemble's address to start discovering to which nodes it should send requests. (Solr provides a smart Java SolrJ client called {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/impl/CloudSolrClient.html[CloudSolrClient].)Even if some nodes in the cluster are offline or unreachable, a Solr node will be able to correctly respond to a search request as long as it can communicate with at least one replica of every shard, or one replica of every _relevant_ shard if the user limited the search via the `shards` or `\_route_` parameters. The more replicas there are of every shard, the more likely that the Solr cluster will be able to handle search results in the event of node failures.-[[ReadandWriteSideFaultTolerance-zkConnected]]=== zkConnectedA Solr node will return the results of a search request as long as it can communicate with at least one replica of every shard that it knows about, even if it can _not_ communicate with ZooKeeper at the time it receives the request. This is normally the preferred behavior from a fault tolerance standpoint, but may result in stale or incorrect results if there have been major changes to the collection structure that the node has not been informed of via ZooKeeper (i.e., shards may have been added or removed, or split into sub-shards)@@ -56,7 +54,6 @@ A `zkConnected` header is included in every search response indicating if the no}-----[[ReadandWriteSideFaultTolerance-shards.tolerant]]=== shards.tolerantIn the event that one or more shards queried are completely unavailable, then Solr's default behavior is to fail the request. However, there are many use-cases where partial results are acceptable and so Solr provides a boolean `shards.tolerant` parameter (default `false`).@@ -89,12 +86,10 @@ Example response with `partialResults` flag set to 'true':}-----[[ReadandWriteSideFaultTolerance-WriteSideFaultTolerance]]== Write Side Fault ToleranceSolrCloud is designed to replicate documents to ensure redundancy for your data, and enable you to send update requests to any node in the cluster. That node will determine if it hosts the leader for the appropriate shard, and if not it will forward the request to the the leader, which will then forward it to all existing replicas, using versioning to make sure every replica has the most up-to-date version. If the leader goes down, another replica can take its place. This architecture enables you to be certain that your data can be recovered in the event of a disaster, even if you are using <<near-real-time-searching.adoc#near-real-time-searching,Near Real Time Searching>>.-[[ReadandWriteSideFaultTolerance-Recovery]]=== RecoveryA Transaction Log is created for each node so that every change to content or organization is noted. The log is used to determine which content in the node should be included in a replica. When a new replica is created, it refers to the Leader and the Transaction Log to know which content to include. If it fails, it retries.@@ -105,7 +100,6 @@ If a leader goes down, it may have sent requests to some replicas and not othersIf an update fails because cores are reloading schemas and some have finished but others have not, the leader tells the nodes that the update failed and starts the recovery procedure.-[[ReadandWriteSideFaultTolerance-AchievedReplicationFactor]]=== Achieved Replication FactorWhen using a replication factor greater than one, an update request may succeed on the shard leader but fail on one or more of the replicas. For instance, consider a collection with one shard and a replication factor of three. In this case, you have a shard leader and two additional replicas. If an update request succeeds on the leader but fails on both replicas, for whatever reason, the update request is still considered successful from the perspective of the client. The replicas that missed the update will sync with the leader when they recover.diff --git a/solr/solr-ref-guide/src/requestdispatcher-in-solrconfig.adoc b/solr/solr-ref-guide/src/requestdispatcher-in-solrconfig.adocindex e20b55ccc4f..6271cb68b9f 100644--- a/solr/solr-ref-guide/src/requestdispatcher-in-solrconfig.adoc+++ b/solr/solr-ref-guide/src/requestdispatcher-in-solrconfig.adoc@@ -22,7 +22,6 @@ The `requestDispatcher` element of `solrconfig.xml` controls the way the Solr HTIncluded are parameters for defining if it should handle `/select` urls (for Solr 1.1 compatibility), if it will support remote streaming, the maximum size of file uploads and how it will respond to HTTP cache headers in requests.-[[RequestDispatcherinSolrConfig-handleSelectElement]]== handleSelect Element[IMPORTANT]@@ -41,7 +40,6 @@ In recent versions of Solr, a `/select` requestHandler is defined by default, so</requestDispatcher>-----[[RequestDispatcherinSolrConfig-requestParsersElement]]== requestParsers ElementThe `<requestParsers>` sub-element controls values related to parsing requests. This is an empty XML element that doesn't have any content, only attributes.@@ -67,7 +65,7 @@ The attribute `addHttpRequestToContext` can be used to indicate that the originaaddHttpRequestToContext="false" />-----The below command is an example of how to enable RemoteStreaming and BodyStreaming through <<config-api.adoc#ConfigAPI-CreatingandUpdatingCommonProperties,Config API>>:+The below command is an example of how to enable RemoteStreaming and BodyStreaming through <<config-api.adoc#creating-and-updating-common-properties,Config API>>:[source,bash]----@@ -77,7 +75,6 @@ curl http://localhost:8983/solr/gettingstarted/config -H 'Content-type:applicati}'-----[[RequestDispatcherinSolrConfig-httpCachingElement]]== httpCaching ElementThe `<httpCaching>` element controls HTTP cache control headers. Do not confuse these settings with Solr's internal cache configuration. This element controls caching of HTTP responses as defined by the W3C HTTP specifications.@@ -102,7 +99,6 @@ This value of this attribute is sent as the value of the `ETag` header. Changing</httpCaching>-----[[RequestDispatcherinSolrConfig-cacheControlElement]]=== cacheControl ElementIn addition to these attributes, `<httpCaching>` accepts one child element: `<cacheControl>`. The content of this element will be sent as the value of the Cache-Control header on HTTP responses. This header is used to modify the default caching behavior of the requesting client. The possible values for the Cache-Control header are defined by the HTTP 1.1 specification in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9[Section 14.9].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.adocindex 46d9c9ebece..10fababcf1c 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@@ -26,7 +26,6 @@ A _search component_ is a feature of search, such as highlighting or faceting. TThese are often referred to as "requestHandler" and "searchComponent", which is how they are defined in `solrconfig.xml`.-[[RequestHandlersandSearchComponentsinSolrConfig-RequestHandlers]]== Request HandlersEvery request handler is defined with a name and a class. The name of the request handler is referenced with the request to Solr, typically as a path. For example, if Solr is installed at ` http://localhost:8983/solr/ `and you have a collection named "```gettingstarted```", you can make a request using URLs like this:@@ -44,7 +43,6 @@ Request handlers can also process requests for nested paths of their names, forIt is also possible to configure defaults for request handlers with a section called `initParams`. These defaults can be used when you want to have common properties that will be used by each separate handler. For example, if you intend to create several request handlers that will all request the same list of fields in the response, you can configure an `initParams` section with your list of fields. For more information about `initParams`, see the section <<initparams-in-solrconfig.adoc#initparams-in-solrconfig,InitParams in SolrConfig>>.-[[RequestHandlersandSearchComponentsinSolrConfig-SearchHandlers]]=== SearchHandlersThe primary request handler defined with Solr by default is the "SearchHandler", which handles search queries. The request handler is defined, and then a list of defaults for the handler are defined with a `defaults` list.@@ -91,33 +89,28 @@ In this example, the filter query "inStock:true" will always be added to every q+In this example, facet fields have been defined which limits the facets that will be returned by Solr. If the client requests facets, the facets defined with a configuration like this are the only facets they will see.-The final section of a request handler definition is `components`, which defines a list of search components that can be used with a request handler. They are only registered with the request handler. How to define a search component is discussed further on in the section on <<RequestHandlersandSearchComponentsinSolrConfig-SearchComponents,Search Components>>. The `components` element can only be used with a request handler that is a SearchHandler.+The final section of a request handler definition is `components`, which defines a list of search components that can be used with a request handler. They are only registered with the request handler. How to define a search component is discussed further on in the section on <<Search Components>> below. The `components` element can only be used with a request handler that is a SearchHandler.The `solrconfig.xml` file includes many other examples of SearchHandlers that can be used or modified as needed.-[[RequestHandlersandSearchComponentsinSolrConfig-UpdateRequestHandlers]]=== UpdateRequestHandlersThe UpdateRequestHandlers are request handlers which process updates to the index.In this guide, we've covered these handlers in detail in the section <<uploading-data-with-index-handlers.adoc#uploading-data-with-index-handlers,Uploading Data with Index Handlers>>.-[[RequestHandlersandSearchComponentsinSolrConfig-ShardHandlers]]=== ShardHandlersIt is possible to configure a request handler to search across shards of a cluster, used with distributed search. More information about distributed search and how to configure the shardHandler is in the section <<distributed-search-with-index-sharding.adoc#distributed-search-with-index-sharding,Distributed Search with Index Sharding>>.-[[RequestHandlersandSearchComponentsinSolrConfig-ImplicitRequestHandlers]]=== Implicit Request HandlersSolr includes many out-of-the-box request handlers that are not configured in `solrconfig.xml`, and so are referred to as "implicit" - see <<implicit-requesthandlers.adoc#implicit-requesthandlers,Implicit RequestHandlers>>.-[[RequestHandlersandSearchComponentsinSolrConfig-SearchComponents]]== Search ComponentsSearch components define the logic that is used by the SearchHandler to perform queries for users.-[[RequestHandlersandSearchComponentsinSolrConfig-DefaultComponents]]=== Default ComponentsThere are several default search components that work with all SearchHandlers without any additional configuration. If no components are defined (with the exception of `first-components` and `last-components` - see below), these are executed by default, in the following order:@@ -138,7 +131,6 @@ There are several default search components that work with all SearchHandlers wiIf you register a new search component with one of these default names, the newly defined component will be used instead of the default.-[[RequestHandlersandSearchComponentsinSolrConfig-First-ComponentsandLast-Components]]=== First-Components and Last-ComponentsIt's possible to define some components as being used before (with `first-components`) or after (with `last-components`) the default components listed above.@@ -158,7 +150,6 @@ It's possible to define some components as being used before (with `first-compon</arr>-----[[RequestHandlersandSearchComponentsinSolrConfig-Components]]=== ComponentsIf you define `components`, the default components (see above) will not be executed, and `first-components` and `last-components` are disallowed:@@ -172,7 +163,6 @@ If you define `components`, the default components (see above) will not be execu</arr>-----[[RequestHandlersandSearchComponentsinSolrConfig-OtherUsefulComponents]]=== Other Useful ComponentsMany of the other useful components are described in sections of this Guide for the features they support. These are:diff --git a/solr/solr-ref-guide/src/response-writers.adoc b/solr/solr-ref-guide/src/response-writers.adocindex 947c8ea91ea..2c6113b47d3 100644--- a/solr/solr-ref-guide/src/response-writers.adoc+++ b/solr/solr-ref-guide/src/response-writers.adoc@@ -25,23 +25,22 @@ Solr supports a variety of Response Writers to ensure that query responses can bThe `wt` parameter selects the Response Writer to be used. The list below describe shows the most common settings for the `wt` parameter, with links to further sections that discuss them in more detail.-* <<ResponseWriters-CSVResponseWriter,csv>>-* <<ResponseWriters-GeoJSONResponseWriter,geojson>>-* <<ResponseWriters-BinaryResponseWriter,javabin>>-* <<ResponseWriters-JSONResponseWriter,json>>-* <<ResponseWriters-PHPResponseWriterandPHPSerializedResponseWriter,php>>-* <<ResponseWriters-PHPResponseWriterandPHPSerializedResponseWriter,phps>>-* <<ResponseWriters-PythonResponseWriter,python>>-* <<ResponseWriters-RubyResponseWriter,ruby>>-* <<ResponseWriters-SmileResponseWriter,smile>>-* <<ResponseWriters-VelocityResponseWriter,velocity>>-* <<ResponseWriters-XLSXResponseWriter,xlsx>>-* <<ResponseWriters-TheStandardXMLResponseWriter,xml>>-* <<ResponseWriters-TheXSLTResponseWriter,xslt>>---[[ResponseWriters-TheStandardXMLResponseWriter]]-== The Standard XML Response Writer+* <<CSV Response Writer,csv>>+* <<GeoJSON Response Writer,geojson>>+* <<Binary Response Writer,javabin>>+* <<JSON Response Writer,json>>+* <<php-writer,php>>+* <<php-writer,phps>>+* <<Python Response Writer,python>>+* <<Ruby Response Writer,ruby>>+* <<Smile Response Writer,smile>>+* <<Velocity Response Writer,velocity>>+* <<XLSX Response Writer,xlsx>>+* <<Standard XML Response Writer,xml>>+* <<XSLT Response Writer,xslt>>+++== Standard XML Response WriterThe XML Response Writer is the most general purpose and reusable Response Writer currently included with Solr. It is the format used in most discussions and documentation about the response of Solr queries.@@ -49,7 +48,6 @@ Note that the XSLT Response Writer can be used to convert the XML produced by thThe behavior of the XML Response Writer can be driven by the following query parameters.-[[ResponseWriters-TheversionParameter]]=== The version ParameterThe `version` parameter determines the XML protocol used in the response. Clients are strongly encouraged to _always_ specify the protocol version, so as to ensure that the format of the response they receive does not change unexpectedly if the Solr server is upgraded and a new default format is introduced.@@ -58,8 +56,7 @@ The only currently supported version value is `2.2`. The format of the `responseThe default value is the latest supported.-[[ResponseWriters-ThestylesheetParameter]]-=== The stylesheet Parameter+=== stylesheet ParameterThe `stylesheet` parameter can be used to direct Solr to include a `<?xml-stylesheet type="text/xsl" href="..."?>` declaration in the XML response it returns.@@ -70,27 +67,23 @@ The default behavior is not to return any stylesheet declaration at all.Use of the `stylesheet` parameter is discouraged, as there is currently no way to specify external stylesheets, and no stylesheets are provided in the Solr distributions. This is a legacy parameter, which may be developed further in a future release.====-[[ResponseWriters-TheindentParameter]]-=== The indent Parameter+=== indent ParameterIf the `indent` parameter is used, and has a non-blank value, then Solr will make some attempts at indenting its XML response to make it more readable by humans.The default behavior is not to indent.-[[ResponseWriters-TheXSLTResponseWriter]]-== The XSLT Response Writer+== XSLT Response WriterThe XSLT Response Writer applies an XML stylesheet to output. It can be used for tasks such as formatting results for an RSS feed.-[[ResponseWriters-trParameter]]=== tr ParameterThe XSLT Response Writer accepts one parameter: the `tr` parameter, which identifies the XML transformation to use. The transformation must be found in the Solr `conf/xslt` directory.The Content-Type of the response is set according to the `<xsl:output>` statement in the XSLT transform, for example: `<xsl:output media-type="text/html"/>`-[[ResponseWriters-Configuration]]-=== Configuration+=== XSLT ConfigurationThe example below, from the `sample_techproducts_configs` <<response-writers.adoc#response-writers,config set>> in the Solr distribution, shows how the XSLT Response Writer is configured.@@ -108,7 +101,6 @@ The example below, from the `sample_techproducts_configs` <<response-writers.adoA value of 5 for `xsltCacheLifetimeSeconds` is good for development, to see XSLT changes quickly. For production you probably want a much higher value.-[[ResponseWriters-JSONResponseWriter]]== JSON Response WriterA very commonly used Response Writer is the `JsonResponseWriter`, which formats output in JavaScript Object Notation (JSON), a lightweight data interchange format specified in specified in RFC 4627. Setting the `wt` parameter to `json` invokes this Response Writer.@@ -158,10 +150,8 @@ The default mime type for the JSON writer is `application/json`, however this ca</queryResponseWriter>-----[[ResponseWriters-JSON-SpecificParameters]]=== JSON-Specific Parameters-[[ResponseWriters-json.nl]]==== json.nlThis parameter controls the output format of NamedLists, where order is more important than access by name. NamedList is currently used for field faceting data.@@ -196,7 +186,6 @@ NamedList is represented as an array of Name Type Value JSON objects.+With input of `NamedList("a"=1, "bar"="foo", null=3, null=null)`, the output would be `[{"name":"a","type":"int","value":1}, {"name":"bar","type":"str","value":"foo"}, {"name":null,"type":"int","value":3}, {"name":null,"type":"null","value":null}]`.-[[ResponseWriters-json.wrf]]==== json.wrf`json.wrf=function` adds a wrapper-function around the JSON response, useful in AJAX with dynamic script tags for specifying a JavaScript callback function.@@ -204,17 +193,14 @@ With input of `NamedList("a"=1, "bar"="foo", null=3, null=null)`, the output wou* http://www.xml.com/pub/a/2005/12/21/json-dynamic-script-tag.html* http://www.theurer.cc/blog/2005/12/15/web-services-json-dump-your-proxy/-[[ResponseWriters-BinaryResponseWriter]]== Binary Response WriterThis is a custom binary format used by Solr for inter-node communication as well as client-server communication. SolrJ uses this as the default for indexing as well as querying. See <<client-apis.adoc#client-apis,Client APIs>> for more details.-[[ResponseWriters-GeoJSONResponseWriter]]== GeoJSON Response WriterReturns Solr results in http://geojson.org[GeoJSON] augmented with Solr-specific JSON. To use this, set `wt=geojson` and `geojson.field` to the name of a spatial Solr field. Not all spatial fields types are supported, and you'll get an error if you use an unsupported one.-[[ResponseWriters-PythonResponseWriter]]== Python Response WriterSolr has an optional Python response format that extends its JSON output in the following ways to allow the response to be safely evaluated by the python interpreter:@@ -225,7 +211,7 @@ Solr has an optional Python response format that extends its JSON output in the* newlines are escaped* null changed to None-[[ResponseWriters-PHPResponseWriterandPHPSerializedResponseWriter]]+[[php-writer]]== PHP Response Writer and PHP Serialized Response WriterSolr has a PHP response format that outputs an array (as PHP code) which can be evaluated. Setting the `wt` parameter to `php` invokes the PHP Response Writer.@@ -250,7 +236,6 @@ $result = unserialize($serializedResult);print_r($result);-----[[ResponseWriters-RubyResponseWriter]]== Ruby Response WriterSolr has an optional Ruby response format that extends its JSON output in the following ways to allow the response to be safely evaluated by Ruby's interpreter:@@ -274,14 +259,12 @@ puts 'number of matches = ' + rsp['response']['numFound'].to_srsp['response']['docs'].each { |doc| puts 'name field = ' + doc['name'\] }-----[[ResponseWriters-CSVResponseWriter]]== CSV Response WriterThe CSV response writer returns a list of documents in comma-separated values (CSV) format. Other information that would normally be included in a response, such as facet information, is excluded.The CSV response writer supports multi-valued fields, as well as<<transforming-result-documents.adoc#transforming-result-documents,pseudo-fields>>, and the output of this CSV format is compatible with Solr's https://wiki.apache.org/solr/UpdateCSV[CSV update format].-[[ResponseWriters-CSVParameters]]=== CSV ParametersThese parameters specify the CSV format that will be returned. You can accept the default values or specify your own.@@ -297,7 +280,6 @@ These parameters specify the CSV format that will be returned. You can accept th|csv.null |Defaults to a zero length string. Use this parameter when a document has no value for a particular field.|===-[[ResponseWriters-Multi-ValuedFieldCSVParameters]]=== Multi-Valued Field CSV ParametersThese parameters specify how multi-valued fields are encoded. Per-field overrides for these values can be done using `f.<fieldname>.csv.separator=|`.@@ -310,8 +292,7 @@ These parameters specify how multi-valued fields are encoded. Per-field override|csv.mv.separator |Defaults to the `csv.separator` value.|===-[[ResponseWriters-Example]]-=== Example+=== CSV Writer Example`\http://localhost:8983/solr/techproducts/select?q=ipod&fl=id,cat,name,popularity,price,score&wt=csv` returns:@@ -323,19 +304,17 @@ F8V7067-APL-KIT,"electronics,connector",Belkin Mobile Power Cord for iPod w/ DocMA147LL/A,"electronics,music",Apple 60 GB iPod with Video Playback Black,10,399.0,0.2446348-----[[ResponseWriters-VelocityResponseWriter]]+[[velocity-writer]]== Velocity Response WriterThe `VelocityResponseWriter` processes the Solr response and request context through Apache Velocity templating.-See <<velocity-response-writer.adoc#velocity-response-writer,Velocity Response Writer>> section for details.+See the <<velocity-response-writer.adoc#velocity-response-writer,Velocity Response Writer>> section for details.-[[ResponseWriters-SmileResponseWriter]]== Smile Response WriterThe Smile format is a JSON-compatible binary format, described in detail here: http://wiki.fasterxml.com/SmileFormat.-[[ResponseWriters-XLSXResponseWriter]]== XLSX Response WriterUse this to get the response as a spreadsheet in the .xlsx (Microsoft Excel) format. It accepts parameters in the form `colwidth.<field-name>` and `colname.<field-name>` which helps you customize the column widths and column names.diff --git a/solr/solr-ref-guide/src/rule-based-authorization-plugin.adoc b/solr/solr-ref-guide/src/rule-based-authorization-plugin.adocindex 4ce41fef518..3b84dc64be6 100644--- a/solr/solr-ref-guide/src/rule-based-authorization-plugin.adoc+++ b/solr/solr-ref-guide/src/rule-based-authorization-plugin.adoc@@ -28,7 +28,7 @@ Once defined through the API, roles are stored in `security.json`.== Enable the Authorization Plugin-The plugin must be enabled in `security.json`. This file and where to put it in your system is described in detail in the section <<authentication-and-authorization-plugins.adoc#AuthenticationandAuthorizationPlugins-EnablePluginswithsecurity.json,Enable Plugins with security.json>>.+The plugin must be enabled in `security.json`. This file and where to put it in your system is described in detail in the section <<authentication-and-authorization-plugins.adoc#enable-plugins-with-security-json,Enable Plugins with security.json>>.This file has two parts, the `authentication` part and the `authorization` part. The `authentication` part stores information about the class being used for authentication.@@ -104,8 +104,8 @@ The pre-defined permissions are:** OVERSEERSTATUS** CLUSTERSTATUS** REQUESTSTATUS-* *update*: this permission is allowed to perform any update action on any collection. This includes sending documents for indexing (using an <<requesthandlers-and-searchcomponents-in-solrconfig.adoc#RequestHandlersandSearchComponentsinSolrConfig-UpdateRequestHandlers,update request handler>>). This applies to all collections by default (`collection:"*"`).-* *read*: this permission is allowed to perform any read action on any collection. This includes querying using search handlers (using <<requesthandlers-and-searchcomponents-in-solrconfig.adoc#RequestHandlersandSearchComponentsinSolrConfig-SearchHandlers,request handlers>>) such as `/select`, `/get`, `/browse`, `/tvrh`, `/terms`, `/clustering`, `/elevate`, `/export`, `/spell`, `/clustering`, and `/sql`. This applies to all collections by default ( `collection:"*"` ).+* *update*: this permission is allowed to perform any update action on any collection. This includes sending documents for indexing (using an <<requesthandlers-and-searchcomponents-in-solrconfig.adoc#updaterequesthandlers,update request handler>>). This applies to all collections by default (`collection:"*"`).+* *read*: this permission is allowed to perform any read action on any collection. This includes querying using search handlers (using <<requesthandlers-and-searchcomponents-in-solrconfig.adoc#searchhandlers,request handlers>>) such as `/select`, `/get`, `/browse`, `/tvrh`, `/terms`, `/clustering`, `/elevate`, `/export`, `/spell`, `/clustering`, and `/sql`. This applies to all collections by default ( `collection:"*"` ).* *all*: Any requests coming to Solr.== Authorization APIdiff --git a/solr/solr-ref-guide/src/rule-based-replica-placement.adoc b/solr/solr-ref-guide/src/rule-based-replica-placement.adocindex deb72435ef2..2464606e052 100644--- a/solr/solr-ref-guide/src/rule-based-replica-placement.adoc+++ b/solr/solr-ref-guide/src/rule-based-replica-placement.adoc@@ -71,7 +71,7 @@ The nodes are sorted first and the rules are used to sort them. This ensures tha== Rules for New Shards-The rules are persisted along with collection state. So, when a new replica is created, the system will assign replicas satisfying the rules. When a new shard is created as a result of using the Collection API's <<collections-api.adoc#CollectionsAPI-createshard,CREATESHARD command>>, ensure that you have created rules specific for that shard name. Rules can be altered using the <<collections-api.adoc#CollectionsAPI-modifycollection,MODIFYCOLLECTION command>>. However, it is not required to do so if the rules do not specify explicit shard names. For example, a rule such as `shard:shard1,replica:*,ip_3:168:`, will not apply to any new shard created. But, if your rule is `replica:*,ip_3:168`, then it will apply to any new shard created.+The rules are persisted along with collection state. So, when a new replica is created, the system will assign replicas satisfying the rules. When a new shard is created as a result of using the Collection API's <<collections-api.adoc#createshard,CREATESHARD command>>, ensure that you have created rules specific for that shard name. Rules can be altered using the <<collections-api.adoc#modifycollection,MODIFYCOLLECTION command>>. However, it is not required to do so if the rules do not specify explicit shard names. For example, a rule such as `shard:shard1,replica:*,ip_3:168:`, will not apply to any new shard created. But, if your rule is `replica:*,ip_3:168`, then it will apply to any new shard created.The same is applicable to shard splitting. Shard splitting is treated exactly the same way as shard creation. Even though `shard1_1` and `shard1_2` may be created from `shard1`, the rules treat them as distinct, unrelated shards.@@ -176,4 +176,4 @@ Rules are specified per collection during collection creation as request parametsnitch=class:EC2Snitch&rule=shard:*,replica:1,dc:dc1&rule=shard:*,replica:<2,dc:dc3-----These rules are persisted in `clusterstate.json` in ZooKeeper and are available throughout the lifetime of the collection. This enables the system to perform any future node allocation without direct user interaction. The rules added during collection creation can be modified later using the <<collections-api.adoc#CollectionsAPI-modifycollection,MODIFYCOLLECTION>> API.+These rules are persisted in `clusterstate.json` in ZooKeeper and are available throughout the lifetime of the collection. This enables the system to perform any future node allocation without direct user interaction. The rules added during collection creation can be modified later using the <<collections-api.adoc#modifycollection,MODIFYCOLLECTION>> API.diff --git a/solr/solr-ref-guide/src/running-solr-on-hdfs.adoc b/solr/solr-ref-guide/src/running-solr-on-hdfs.adocindex 9f8e2dc300b..6ca5670a5e1 100644--- a/solr/solr-ref-guide/src/running-solr-on-hdfs.adoc+++ b/solr/solr-ref-guide/src/running-solr-on-hdfs.adoc@@ -28,13 +28,11 @@ To use HDFS rather than a local filesystem, you must be using Hadoop 2.x and you* Modify `solr.in.sh` (or `solr.in.cmd` on Windows) to pass the JVM arguments automatically when using `bin/solr` without having to set them manually.* Define the properties in `solrconfig.xml`. These configuration changes would need to be repeated for every collection, so is a good option if you only want some of your collections stored in HDFS.-[[RunningSolronHDFS-StartingSolronHDFS]]== Starting Solr on HDFS-[[RunningSolronHDFS-StandaloneSolrInstances]]=== Standalone Solr Instances-For standalone Solr instances, there are a few parameters you should be sure to modify before starting Solr. These can be set in `solrconfig.xml`(more on that <<RunningSolronHDFS-HdfsDirectoryFactoryParameters,below>>), or passed to the `bin/solr` script at startup.+For standalone Solr instances, there are a few parameters you should be sure to modify before starting Solr. These can be set in `solrconfig.xml`(more on that <<HdfsDirectoryFactory Parameters,below>>), or passed to the `bin/solr` script at startup.* You need to use an `HdfsDirectoryFactory` and a data dir of the form `hdfs://host:port/path`* You need to specify an UpdateLog location of the form `hdfs://host:port/path`@@ -50,9 +48,8 @@ bin/solr start -Dsolr.directoryFactory=HdfsDirectoryFactory-Dsolr.updatelog=hdfs://host:port/path-----This example will start Solr in standalone mode, using the defined JVM properties (explained in more detail <<RunningSolronHDFS-HdfsDirectoryFactoryParameters,below>>).+This example will start Solr in standalone mode, using the defined JVM properties (explained in more detail <<HdfsDirectoryFactory Parameters,below>>).-[[RunningSolronHDFS-SolrCloudInstances]]=== SolrCloud InstancesIn SolrCloud mode, it's best to leave the data and update log directories as the defaults Solr comes with and simply specify the `solr.hdfs.home`. All dynamically created collections will create the appropriate directories automatically under the `solr.hdfs.home` root directory.@@ -70,7 +67,6 @@ bin/solr start -c -Dsolr.directoryFactory=HdfsDirectoryFactoryThis command starts Solr in SolrCloud mode, using the defined JVM properties.-[[RunningSolronHDFS-Modifyingsolr.in.sh_nix_orsolr.in.cmd_Windows_]]=== Modifying solr.in.sh (*nix) or solr.in.cmd (Windows)The examples above assume you will pass JVM arguments as part of the start command every time you use `bin/solr` to start Solr. However, `bin/solr` looks for an include file named `solr.in.sh` (`solr.in.cmd` on Windows) to set environment variables. By default, this file is found in the `bin` directory, and you can modify it to permanently add the `HdfsDirectoryFactory` settings and ensure they are used every time Solr is started.@@ -85,7 +81,6 @@ For example, to set JVM arguments to always use HDFS when running in SolrCloud m-Dsolr.hdfs.home=hdfs://host:port/path \-----[[RunningSolronHDFS-TheBlockCache]]== The Block CacheFor performance, the HdfsDirectoryFactory uses a Directory that will cache HDFS blocks. This caching mechanism is meant to replace the standard file system cache that Solr utilizes so much. By default, this cache is allocated off heap. This cache will often need to be quite large and you may need to raise the off heap memory limit for the specific JVM you are running Solr in. For the Oracle/OpenJDK JVMs, the follow is an example command line parameter that you can use to raise the limit when starting Solr:@@ -95,18 +90,15 @@ For performance, the HdfsDirectoryFactory uses a Directory that will cache HDFS-XX:MaxDirectMemorySize=20g-----[[RunningSolronHDFS-HdfsDirectoryFactoryParameters]]== HdfsDirectoryFactory ParametersThe `HdfsDirectoryFactory` has a number of settings that are defined as part of the `directoryFactory` configuration.-[[RunningSolronHDFS-SolrHDFSSettings]]=== Solr HDFS Settings`solr.hdfs.home`::A root location in HDFS for Solr to write collection data to. Rather than specifying an HDFS location for the data directory or update log directory, use this to specify one root location and have everything automatically created within this HDFS location. The structure of this parameter is `hdfs://host:port/path/solr`.-[[RunningSolronHDFS-BlockCacheSettings]]=== Block Cache Settings`solr.hdfs.blockcache.enabled`::@@ -124,7 +116,6 @@ Number of memory slabs to allocate. Each slab is 128 MB in size. The default is`solr.hdfs.blockcache.global`::Enable/Disable using one global cache for all SolrCores. The settings used will be from the first HdfsDirectoryFactory created. The default is `true`.-[[RunningSolronHDFS-NRTCachingDirectorySettings]]=== NRTCachingDirectory Settings`solr.hdfs.nrtcachingdirectory.enable`:: true |@@ -136,13 +127,11 @@ NRTCachingDirectory max segment size for merges. The default is `16`.`solr.hdfs.nrtcachingdirectory.maxcachedmb`::NRTCachingDirectory max cache size. The default is `192`.-[[RunningSolronHDFS-HDFSClientConfigurationSettings]]=== HDFS Client Configuration Settings`solr.hdfs.confdir`::Pass the location of HDFS client configuration files - needed for HDFS HA for example.-[[RunningSolronHDFS-KerberosAuthenticationSettings]]=== Kerberos Authentication SettingsHadoop can be configured to use the Kerberos protocol to verify user identity when trying to access core services like HDFS. If your HDFS directories are protected using Kerberos, then you need to configure Solr's HdfsDirectoryFactory to authenticate using Kerberos in order to read and write to HDFS. To enable Kerberos authentication from Solr, you need to set the following parameters:@@ -157,8 +146,7 @@ This file will need to be present on all Solr servers at the same path provided`solr.hdfs.security.kerberos.principal`::The Kerberos principal that Solr should use to authenticate to secure Hadoop; the format of a typical Kerberos V5 principal is: `primary/instance@realm`.-[[RunningSolronHDFS-Example]]-== Example+== Example solrconfig.xml for HDFSHere is a sample `solrconfig.xml` configuration for storing Solr indexes on HDFS:@@ -189,7 +177,6 @@ If using Kerberos, you will need to add the three Kerberos related properties to</directoryFactory>-----[[RunningSolronHDFS-AutomaticallyAddReplicasinSolrCloud]]== Automatically Add Replicas in SolrCloudOne benefit to running Solr in HDFS is the ability to automatically add new replicas when the Overseer notices that a shard has gone down. Because the "gone" index shards are stored in HDFS, the a new core will be created and the new core will point to the existing indexes in HDFS.@@ -205,7 +192,6 @@ The minimum time (in ms) to wait for initiating replacement of a replica after f`autoReplicaFailoverBadNodeExpiration`::The delay (in ms) after which a replica marked as down would be unmarked. The default is `60000`.-[[RunningSolronHDFS-TemporarilydisableautoAddReplicasfortheentirecluster]]=== Temporarily Disable autoAddReplicas for the Entire ClusterWhen doing offline maintenance on the cluster and for various other use cases where an admin would like to temporarily disable auto addition of replicas, the following APIs will disable and re-enable autoAddReplicas for *all collections in the cluster*:diff --git a/solr/solr-ref-guide/src/running-solr.adoc b/solr/solr-ref-guide/src/running-solr.adocindex ecc41122577..f18183e16b4 100644--- a/solr/solr-ref-guide/src/running-solr.adoc+++ b/solr/solr-ref-guide/src/running-solr.adoc@@ -114,7 +114,7 @@ Solr also provides a number of useful examples to help you learn about key featubin/solr -e techproducts-----Currently, the available examples you can run are: techproducts, dih, schemaless, and cloud. See the section <<solr-control-script-reference.adoc#SolrControlScriptReference-RunningwithExampleConfigurations,Running with Example Configurations>> for details on each example.+Currently, the available examples you can run are: techproducts, dih, schemaless, and cloud. See the section <<solr-control-script-reference.adoc#running-with-example-configurations,Running with Example Configurations>> for details on each example..Getting Started with SolrCloud[NOTE]@@ -171,7 +171,7 @@ You may want to add a few sample documents before trying to index your own conteIn the `bin/` directory is the post script, a command line tool which can be used to index different types of documents. Do not worry too much about the details for now. The <<indexing-and-basic-data-operations.adoc#indexing-and-basic-data-operations,Indexing and Basic Data Operations>> section has all the details on indexing.-To see some information about the usage of `bin/post`, use the `-help` option. Windows users, see the section for <<post-tool.adoc#PostTool-WindowsSupport,Post Tool on Windows>>.+To see some information about the usage of `bin/post`, use the `-help` option. Windows users, see the section for <<post-tool.adoc#post-tool-windows-support,Post Tool on Windows>>.`bin/post` can post various types of content to Solr, including files in Solr's native XML and JSON formats, CSV files, a directory tree of rich documents, or even a simple short web crawl. See the examples at the end of `bin/post -help` for various commands to easily get started posting your content into Solr.diff --git a/solr/solr-ref-guide/src/schema-api.adoc b/solr/solr-ref-guide/src/schema-api.adocindex 893936fe3cc..a12eeb5d4fa 100644--- a/solr/solr-ref-guide/src/schema-api.adoc+++ b/solr/solr-ref-guide/src/schema-api.adoc@@ -52,7 +52,7 @@ The base address for the API is `\http://<host>:<port>/solr/<collection_name>`.bin/solr -e cloud -noprompt-----== API Entry Points+== Schema API Entry Points* `/schema`: <<Retrieve the Entire Schema,retrieve>> the schema, or <<Modify the Schema,modify>> the schema to add, remove, or replace fields, dynamic fields, copy fields, or field types* `/schema/fields`: <<List Fields,retrieve information>> about all defined fields or a specific named field@@ -408,14 +408,12 @@ The query parameters should be added to the API request after '?'.`wt`::Defines the format of the response. The options are *json*, *xml* or *schema.xml*. If not specified, JSON will be returned by default.-[[SchemaAPI-OUTPUT]]==== Retrieve Schema Response*Output Content*The output will include all fields, field types, dynamic rules and copy field rules, in the format requested (JSON or XML). The schema name and version are also included.-[[SchemaAPI-EXAMPLES]]==== Retrieve Schema ExamplesGet the entire schema in JSON.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.adocindex a16979b783d..4f265912191 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@@ -85,7 +85,7 @@ If you have started Solr with managed schema enabled and you would like to switc.. Add a `ClassicIndexSchemaFactory` definition as shown above. Reload the core(s).-If you are using SolrCloud, you may need to modify the files via ZooKeeper. The `bin/solr` script provides an easy way to download the files from ZooKeeper and upload them back after edits. See the section <<solr-control-script-reference.adoc#SolrControlScriptReference-ZooKeeperOperations,ZooKeeper Operations>> for more information.+If you are using SolrCloud, you may need to modify the files via ZooKeeper. The `bin/solr` script provides an easy way to download the files from ZooKeeper and upload them back after edits. See the section <<solr-control-script-reference.adoc#zookeeper-operations,ZooKeeper Operations>> for more information.[TIP]====diff --git a/solr/solr-ref-guide/src/segments-info.adoc b/solr/solr-ref-guide/src/segments-info.adocindex c5a4395b89b..b0d72fe318f 100644--- a/solr/solr-ref-guide/src/segments-info.adoc+++ b/solr/solr-ref-guide/src/segments-info.adoc@@ -22,4 +22,4 @@ The Segments Info screen lets you see a visualization of the various segments inimage::images/segments-info/segments_info.png[image,width=486,height=250]-This information may be useful for people to help make decisions about the optimal <<indexconfig-in-solrconfig.adoc#IndexConfiginSolrConfig-MergingIndexSegments,merge settings>> for their data.+This information may be useful for people to help make decisions about the optimal <<indexconfig-in-solrconfig.adoc#merging-index-segments,merge settings>> for their data.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.adocindex d2dbcf7dd65..3d0a87d97dc 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@@ -36,10 +36,9 @@ If a leader goes down, one of the other replicas is automatically elected as theWhen a document is sent to a Solr node for indexing, the system first determines which Shard that document belongs to, and then which node is currently hosting the leader for that shard. The document is then forwarded to the current leader for indexing, and the leader forwards the update to all of the other replicas.-[[ShardsandIndexingDatainSolrCloud-DocumentRouting]]== Document Routing-Solr offers the ability to specify the router implementation used by a collection by specifying the `router.name` parameter when <<collections-api.adoc#CollectionsAPI-create,creating your collection>>.+Solr offers the ability to specify the router implementation used by a collection by specifying the `router.name` parameter when <<collections-api.adoc#create,creating your collection>>.If you use the (default) "```compositeId```" router, you can send documents with a prefix in the document ID which will be used to calculate the hash Solr uses to determine the shard a document is sent to for indexing. The prefix can be anything you'd like it to be (it doesn't have to be the shard name, for example), but it must be consistent so Solr behaves consistently. For example, if you wanted to co-locate documents for a customer, you could use the customer name or ID as the prefix. If your customer is "IBM", for example, with a document with the ID "12345", you would insert the prefix into the document id field: "IBM!12345". The exclamation mark ('!') is critical here, as it distinguishes the prefix used to determine which shard to direct the document to.@@ -55,16 +54,14 @@ If you do not want to influence how documents are stored, you don't need to specIf you created the collection and defined the "implicit" router at the time of creation, you can additionally define a `router.field` parameter to use a field from each document to identify a shard where the document belongs. If the field specified is missing in the document, however, the document will be rejected. You could also use the `\_route_` parameter to name a specific shard.-[[ShardsandIndexingDatainSolrCloud-ShardSplitting]]== Shard SplittingWhen you create a collection in SolrCloud, you decide on the initial number shards to be used. But it can be difficult to know in advance the number of shards that you need, particularly when organizational requirements can change at a moment's notice, and the cost of finding out later that you chose wrong can be high, involving creating new cores and re-indexing all of your data.The ability to split shards is in the Collections API. It currently allows splitting a shard into two pieces. The existing shard is left as-is, so the split action effectively makes two copies of the data as new shards. You can delete the old shard at a later time when you're ready.-More details on how to use shard splitting is in the section on the Collection API's <<collections-api.adoc#CollectionsAPI-splitshard,SPLITSHARD command>>.+More details on how to use shard splitting is in the section on the Collection API's <<collections-api.adoc#splitshard,SPLITSHARD command>>.-[[ShardsandIndexingDatainSolrCloud-IgnoringCommitsfromClientApplicationsinSolrCloud]]== Ignoring Commits from Client Applications in SolrCloudIn most cases, when running in SolrCloud mode, indexing client applications should not send explicit commit requests. Rather, you should configure auto commits with `openSearcher=false` and auto soft-commits to make recent updates visible in search requests. This ensures that auto commits occur on a regular schedule in the cluster.diff --git a/solr/solr-ref-guide/src/solr-control-script-reference.adoc b/solr/solr-ref-guide/src/solr-control-script-reference.adocindex 45a9e80e969..368aacc2422 100644--- a/solr/solr-ref-guide/src/solr-control-script-reference.adoc+++ b/solr/solr-ref-guide/src/solr-control-script-reference.adoc@@ -83,7 +83,7 @@ The available options are:* dih* schemaless+-See the section <<SolrControlScriptReference-RunningwithExampleConfigurations,Running with Example Configurations>> below for more details on the example configurations.+See the section <<Running with Example Configurations>> below for more details on the example configurations.+*Example*: `bin/solr start -e schemaless`@@ -185,7 +185,6 @@ When starting in SolrCloud mode, the interactive script session will prompt youFor more information about starting Solr in SolrCloud mode, see also the section <<getting-started-with-solrcloud.adoc#getting-started-with-solrcloud,Getting Started with SolrCloud>>.-[[SolrControlScriptReference-RunningwithExampleConfigurations]]==== Running with Example Configurations`bin/solr start -e <name>`@@ -297,7 +296,6 @@ Solr process 39827 running on port 8865"collections":"2"}}-----[[SolrControlScriptReference-Healthcheck]]=== HealthcheckThe `healthcheck` command generates a JSON-formatted health report for a collection when running in SolrCloud mode. The health report provides information about the state of every replica for all shards in a collection, including the number of committed documents and its current state.@@ -306,7 +304,6 @@ The `healthcheck` command generates a JSON-formatted health report for a collect`bin/solr healthcheck -help`-[[SolrControlScriptReference-AvailableParameters.2]]==== Healthcheck Parameters`-c <collection>`::@@ -371,7 +368,6 @@ Below is an example healthcheck request and response using a non-standard ZooKee"leader":true}]}]}-----[[SolrControlScriptReference-CollectionsandCores]]== Collections and CoresThe `bin/solr` script can also help you create new collections (in SolrCloud mode) or cores (in standalone mode), or delete collections.@@ -566,7 +562,6 @@ If the `-updateIncludeFileOnly` option is set to *true*, then only the settingsIf the `-updateIncludeFileOnly` option is set to *false*, then the settings in `bin/solr.in.sh` or `bin\solr.in.cmd` will be updated, and `security.json` will be removed. However, the `basicAuth.conf` file is not removed with either option.-[[SolrControlScriptReference-ZooKeeperOperations]]== ZooKeeper OperationsThe `bin/solr` script allows certain operations affecting ZooKeeper. These operations are for SolrCloud mode only. The operations are available as sub-commands, which each have their own set of options.@@ -577,7 +572,6 @@ The `bin/solr` script allows certain operations affecting ZooKeeper. These operaNOTE: Solr should have been started at least once before issuing these commands to initialize ZooKeeper with the znodes Solr expects. Once ZooKeeper is initialized, Solr doesn't need to be running on any node to use these commands.-[[SolrControlScriptReference-UploadaConfigurationSet]]=== Upload a Configuration SetUse the `zk upconfig` command to upload one of the pre-configured configuration set or a customized configuration set to ZooKeeper.@@ -618,10 +612,9 @@ bin/solr zk upconfig -z 111.222.333.444:2181 -n mynewconfig -d /path/to/configse.Reload Collections When Changing Configurations[WARNING]====-This command does *not* automatically make changes effective! It simply uploads the configuration sets to ZooKeeper. You can use the Collection API's <<collections-api.adoc#CollectionsAPI-reload,RELOAD command>> to reload any collections that uses this configuration set.+This command does *not* automatically make changes effective! It simply uploads the configuration sets to ZooKeeper. You can use the Collection API's <<collections-api.adoc#reload,RELOAD command>> to reload any collections that uses this configuration set.====-[[SolrControlScriptReference-DownloadaConfigurationSet]]=== Download a Configuration SetUse the `zk downconfig` command to download a configuration set from ZooKeeper to the local filesystem.@@ -791,12 +784,10 @@ An example of this command with the parameters is:`bin/solr zk ls /collections`-[[SolrControlScriptReference-Createaznode_supportschroot_]]=== Create a znode (supports chroot)Use the `zk mkroot` command to create a znode. The primary use-case for this command to support ZooKeeper's "chroot" concept. However, it can also be used to create arbitrary paths.-[[SolrControlScriptReference-AvailableParameters.9]]==== Create znode Parameters`<path>`::diff --git a/solr/solr-ref-guide/src/solr-glossary.adoc b/solr/solr-ref-guide/src/solr-glossary.adocindex 1feed2f3710..de27081fa74 100644--- a/solr/solr-ref-guide/src/solr-glossary.adoc+++ b/solr/solr-ref-guide/src/solr-glossary.adoc@@ -33,7 +33,7 @@ Where possible, terms are linked to relevant parts of the Solr Reference Guide f[[SolrGlossary-A]]=== A-[[atomicupdates]]<<updating-parts-of-documents.adoc#UpdatingPartsofDocuments-AtomicUpdates,Atomic updates>>::+[[atomicupdates]]<<updating-parts-of-documents.adoc#atomic-updates,Atomic updates>>::An approach to updating only one or more fields of a document, instead of reindexing the entire document.@@ -120,7 +120,7 @@ A JVM instance running Solr. Also known as a Solr server.[[SolrGlossary-O]]=== O-[[optimisticconcurrency]]<<updating-parts-of-documents.adoc#UpdatingPartsofDocuments-OptimisticConcurrency,Optimistic concurrency>>::+[[optimisticconcurrency]]<<updating-parts-of-documents.adoc#optimistic-concurrency,Optimistic concurrency>>::Also known as "optimistic locking", this is an approach that allows for updates to documents currently in the index while retaining locking or version control.[[overseer]]Overseer::diff --git a/solr/solr-ref-guide/src/spell-checking.adoc b/solr/solr-ref-guide/src/spell-checking.adocindex adb784a6e69..b46c8a1e096 100644--- a/solr/solr-ref-guide/src/spell-checking.adoc+++ b/solr/solr-ref-guide/src/spell-checking.adoc@@ -212,7 +212,7 @@ This parameter turns on SpellCheck suggestions for the request. If *true*, then[[SpellChecking-Thespellcheck.qorqParameter]]=== The spellcheck.q or q Parameter-This parameter specifies the query to spellcheck. If `spellcheck.q` is defined, then it is used; otherwise the original input query is used. The `spellcheck.q` parameter is intended to be the original query, minus any extra markup like field names, boosts, and so on. If the `q` parameter is specified, then the `SpellingQueryConverter` class is used to parse it into tokens; otherwise the <<tokenizers.adoc#Tokenizers-WhiteSpaceTokenizer,`WhitespaceTokenizer`>> is used. The choice of which one to use is up to the application. Essentially, if you have a spelling "ready" version in your application, then it is probably better to use `spellcheck.q`. Otherwise, if you just want Solr to do the job, use the `q` parameter.+This parameter specifies the query to spellcheck. If `spellcheck.q` is defined, then it is used; otherwise the original input query is used. The `spellcheck.q` parameter is intended to be the original query, minus any extra markup like field names, boosts, and so on. If the `q` parameter is specified, then the `SpellingQueryConverter` class is used to parse it into tokens; otherwise the <<tokenizers.adoc#white-space-tokenizer,`WhitespaceTokenizer`>> is used. The choice of which one to use is up to the application. Essentially, if you have a spelling "ready" version in your application, then it is probably better to use `spellcheck.q`. Otherwise, if you just want Solr to do the job, use the `q` parameter.[NOTE]====diff --git a/solr/solr-ref-guide/src/stream-decorators.adoc b/solr/solr-ref-guide/src/stream-decorators.adocindex e65f18adb2a..4db4a8278c9 100644--- a/solr/solr-ref-guide/src/stream-decorators.adoc+++ b/solr/solr-ref-guide/src/stream-decorators.adoc@@ -382,7 +382,7 @@ cartesianProduct(}-----As you can see in the examples above, the `cartesianProduct` function does support flattening tuples across multiple fields and/or evaluators.+As you can see in the examples above, the `cartesianProduct` function does support flattening tuples across multiple fields and/or evaluators.== classify@@ -615,8 +615,6 @@ eval(expr)In the example above the `eval` expression reads the first tuple from the underlying expression. It then compiles andexecutes the string Streaming Expression in the epxr_s field.--[[StreamingExpressions-executor]]== executorThe `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.@@ -984,7 +982,6 @@ The worker nodes can be from the same collection as the data, or they can be a d* `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]@@ -1000,10 +997,9 @@ The worker nodes can be from the same collection as the data, or they can be a dThe 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 is a simple priority scheduler for the <<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.@@ -1011,14 +1007,12 @@ Each time the `priority` function is called, it checks the higher priority taskThe `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+=== priority Parameters* `topic expression`: (Mandatory) the high priority task queue* `topic expression`: (Mandatory) the lower priority task queue-[[StreamingExpressions-Syntax.26]]-=== Syntax+=== priority Syntax[source,text]----@@ -1092,7 +1086,7 @@ The example about shows the rollup function wrapping the search function. Notice== scoreNodes-See section in <<graph-traversal.adoc#GraphTraversal-UsingthescoreNodesFunctiontoMakeaRecommendation,graph traversal>>.+See section in <<graph-traversal.adoc#using-the-scorenodes-function-to-make-a-recommendation,graph traversal>>.== selectdiff --git a/solr/solr-ref-guide/src/streaming-expressions.adoc b/solr/solr-ref-guide/src/streaming-expressions.adocindex 5ea3dd928dd..1474aaae397 100644--- a/solr/solr-ref-guide/src/streaming-expressions.adoc+++ b/solr/solr-ref-guide/src/streaming-expressions.adoc@@ -46,7 +46,6 @@ Streams from outside systems can be joined with streams originating from Solr anBoth streaming expressions and the streaming API are considered experimental, and the APIs are subject to change.====-[[StreamingExpressions-StreamLanguageBasics]]== Stream Language BasicsStreaming Expressions are comprised of streaming functions which work with a Solr collection. They emit a stream of tuples (key/value Maps).@@ -55,7 +54,6 @@ Many of the provided streaming functions are designed to work with entire resultSome streaming functions act as stream sources to originate the stream flow. Other streaming functions act as stream decorators to wrap other stream functions and perform operations on the stream of tuples. Many streams functions can be parallelized across a worker collection. This can be particularly powerful for relational algebra functions.-[[StreamingExpressions-StreamingRequestsandResponses]]=== Streaming Requests and ResponsesSolr has a `/stream` request handler that takes streaming expression requests and returns the tuples as a JSON stream. This request handler is implicitly defined, meaning there is nothing that has to be defined in `solrconfig.xml` - see <<implicit-requesthandlers.adoc#implicit-requesthandlers,Implicit RequestHandlers>>.@@ -112,7 +110,6 @@ StreamFactory streamFactory = new StreamFactory().withCollectionZkHost("collectiParallelStream pstream = (ParallelStream)streamFactory.constructStream("parallel(collection1, group(search(collection1, q=\"*:*\", fl=\"id,a_s,a_i,a_f\", sort=\"a_s asc,a_f asc\", partitionKeys=\"a_s\"), by=\"a_s asc\"), workers=\"2\", zkHost=\""+zkHost+"\", sort=\"a_s asc\")");-----[[StreamingExpressions-DataRequirements]]=== Data RequirementsBecause 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.diff --git a/solr/solr-ref-guide/src/taking-solr-to-production.adoc b/solr/solr-ref-guide/src/taking-solr-to-production.adocindex 97634101529..fe7ed082ed8 100644--- a/solr/solr-ref-guide/src/taking-solr-to-production.adoc+++ b/solr/solr-ref-guide/src/taking-solr-to-production.adoc@@ -20,17 +20,14 @@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.-[[TakingSolrtoProduction-ServiceInstallationScript]]== Service Installation ScriptSolr includes a service installation script (`bin/install_solr_service.sh`) to help you install Solr as a service on Linux. Currently, the script only supports CentOS, Debian, Red Hat, SUSE and Ubuntu Linux distributions. Before running the script, you need to determine a few parameters about your setup. Specifically, you need to decide where to install Solr and which system user should be the owner of the Solr files and process.-[[TakingSolrtoProduction-Planningyourdirectorystructure]]=== Planning Your Directory StructureWe recommend separating your live Solr files, such as logs and index files, from the files included in the Solr distribution bundle, as that makes it easier to upgrade Solr and is considered a good practice to follow as a system administrator.-[[TakingSolrtoProduction-SolrInstallationDirectory]]==== Solr Installation DirectoryBy default, the service installation script will extract the distribution archive into `/opt`. You can change this location using the `-i` option when running the installation script. The script will also create a symbolic link to the versioned directory of Solr. For instance, if you run the installation script for Solr {solr-docs-version}.0, then the following directory structure will be used:@@ -43,19 +40,16 @@ By default, the service installation script will extract the distribution archivUsing a symbolic link insulates any scripts from being dependent on the specific Solr version. If, down the road, you need to upgrade to a later version of Solr, you can just update the symbolic link to point to the upgraded version of Solr. We’ll use `/opt/solr` to refer to the Solr installation directory in the remaining sections of this page.-[[TakingSolrtoProduction-SeparateDirectoryforWritableFiles]]==== Separate Directory for Writable FilesYou should also separate writable Solr files into a different directory; by default, the installation script uses `/var/solr`, but you can override this location using the `-d` option. With this approach, the files in `/opt/solr` will remain untouched and all files that change while Solr is running will live under `/var/solr`.-[[TakingSolrtoProduction-CreatetheSolruser]]=== Create the Solr UserRunning Solr as `root` is not recommended for security reasons, and the <<solr-control-script-reference.adoc#solr-control-script-reference,control script>> start command will refuse to do so. Consequently, you should determine the username of a system user that will own all of the Solr files and the running Solr process. By default, the installation script will create the *solr* user, but you can override this setting using the -u option. If your organization has specific requirements for creating new user accounts, then you should create the user before running the script. The installation script will make the Solr user the owner of the `/opt/solr` and `/var/solr` directories.You are now ready to run the installation script.-[[TakingSolrtoProduction-RuntheSolrInstallationScript]]=== Run the Solr Installation ScriptTo run the script, you'll need to download the latest Solr distribution archive and then do the following:@@ -97,12 +91,10 @@ If you do not want to start the service immediately, pass the `-n` option. You cWe'll cover some additional configuration settings you can make to fine-tune your Solr setup in a moment. Before moving on, let's take a closer look at the steps performed by the installation script. This gives you a better overview and will help you understand important details about your Solr installation when reading other pages in this guide; such as when a page refers to Solr home, you'll know exactly where that is on your system.-[[TakingSolrtoProduction-SolrHomeDirectory]]==== Solr Home DirectoryThe Solr home directory (not to be confused with the Solr installation directory) is where Solr manages core directories with index files. By default, the installation script uses `/var/solr/data`. If the `-d` option is used on the install script, then this will change to the `data` subdirectory in the location given to the -d option. Take a moment to inspect the contents of the Solr home directory on your system. If you do not <<using-zookeeper-to-manage-configuration-files.adoc#using-zookeeper-to-manage-configuration-files,store `solr.xml` in ZooKeeper>>, the home directory must contain a `solr.xml` file. When Solr starts up, the Solr Control Script passes the location of the home directory using the `-Dsolr.solr.home=...` system property.-[[TakingSolrtoProduction-Environmentoverridesincludefile]]==== Environment Overrides Include FileThe service installation script creates an environment specific include file that overrides defaults used by the `bin/solr` script. The main advantage of using an include file is that it provides a single location where all of your environment-specific overrides are defined. Take a moment to inspect the contents of the `/etc/default/solr.in.sh` file, which is the default path setup by the installation script. If you used the `-s` option on the install script to change the name of the service, then the first part of the filename will be different. For a service named `solr-demo`, the file will be named `/etc/default/solr-demo.in.sh`. There are many settings that you can override using this file. However, at a minimum, this script needs to define the `SOLR_PID_DIR` and `SOLR_HOME` variables, such as:@@ -115,7 +107,6 @@ SOLR_HOME=/var/solr/dataThe `SOLR_PID_DIR` variable sets the directory where the <<solr-control-script-reference.adoc#solr-control-script-reference,control script>> will write out a file containing the Solr server’s process ID.-[[TakingSolrtoProduction-Logsettings]]==== Log SettingsSolr uses Apache Log4J for logging. The installation script copies `/opt/solr/server/resources/log4j.properties` to `/var/solr/log4j.properties`. Take a moment to verify that the Solr include file is configured to send logs to the correct location by checking the following settings in `/etc/default/solr.in.sh`:@@ -128,7 +119,6 @@ SOLR_LOGS_DIR=/var/solr/logsFor more information about Log4J configuration, please see: <<configuring-logging.adoc#configuring-logging,Configuring Logging>>-[[TakingSolrtoProduction-init.dscript]]==== init.d ScriptWhen running a service like Solr on Linux, it’s common to setup an init.d script so that system administrators can control Solr using the service tool, such as: `service solr start`. The installation script creates a very basic init.d script to help you get started. Take a moment to inspect the `/etc/init.d/solr` file, which is the default script name setup by the installation script. If you used the `-s` option on the install script to change the name of the service, then the filename will be different. Notice that the following variables are setup for your environment based on the parameters passed to the installation script:@@ -149,7 +139,6 @@ service solr startThe `/etc/init.d/solr` script also supports the **stop**, **restart**, and *status* commands. Please keep in mind that the init script that ships with Solr is very basic and is intended to show you how to setup Solr as a service. However, it’s also common to use more advanced tools like *supervisord* or *upstart* to control Solr as a service on Linux. While showing how to integrate Solr with tools like supervisord is beyond the scope of this guide, the `init.d/solr` script should provide enough guidance to help you get started. Also, the installation script sets the Solr service to start automatically when the host machine initializes.-[[TakingSolrtoProduction-ProgressCheck]]=== Progress CheckIn the next section, we cover some additional environment settings to help you fine-tune your production setup. However, before we move on, let's review what we've achieved thus far. Specifically, you should be able to control Solr using `/etc/init.d/solr`. Please verify the following commands work with your setup:@@ -174,10 +163,8 @@ Solr process PID running on port 8983If the `status` command is not successful, look for error messages in `/var/solr/logs/solr.log`.-[[TakingSolrtoProduction-Finetuneyourproductionsetup]]== Fine-Tune Your Production Setup-[[TakingSolrtoProduction-MemoryandGCSettings]]=== Memory and GC SettingsBy default, the `bin/solr` script sets the maximum Java heap size to 512M (-Xmx512m), which is fine for getting started with Solr. For production, you’ll want to increase the maximum heap size based on the memory requirements of your search application; values between 10 and 20 gigabytes are not uncommon for production servers. When you need to change the memory settings for your Solr server, use the `SOLR_JAVA_MEM` variable in the include file, such as:@@ -189,13 +176,11 @@ SOLR_JAVA_MEM="-Xms10g -Xmx10g"Also, the <<solr-control-script-reference.adoc#solr-control-script-reference,Solr Control Script>> comes with a set of pre-configured Java Garbage Collection settings that have shown to work well with Solr for a number of different workloads. However, these settings may not work well for your specific use of Solr. Consequently, you may need to change the GC settings, which should also be done with the `GC_TUNE` variable in the `/etc/default/solr.in.sh` include file. For more information about tuning your memory and garbage collection settings, see: <<jvm-settings.adoc#jvm-settings,JVM Settings>>.-[[TakingSolrtoProduction-Out-of-MemoryShutdownHook]]==== Out-of-Memory Shutdown HookThe `bin/solr` script registers the `bin/oom_solr.sh` script to be called by the JVM if an OutOfMemoryError occurs. The `oom_solr.sh` script will issue a `kill -9` to the Solr process that experiences the `OutOfMemoryError`. This behavior is recommended when running in SolrCloud mode so that ZooKeeper is immediately notified that a node has experienced a non-recoverable error. Take a moment to inspect the contents of the `/opt/solr/bin/oom_solr.sh` script so that you are familiar with the actions the script will perform if it is invoked by the JVM.-[[TakingSolrtoProduction-SolrCloud]]-=== SolrCloud+=== Going to Production with SolrCloudTo run Solr in SolrCloud mode, you need to set the `ZK_HOST` variable in the include file to point to your ZooKeeper ensemble. Running the embedded ZooKeeper is not supported in production environments. For instance, if you have a ZooKeeper ensemble hosted on the following three hosts on the default client port 2181 (zk1, zk2, and zk3), then you would set:@@ -206,7 +191,6 @@ ZK_HOST=zk1,zk2,zk3When the `ZK_HOST` variable is set, Solr will launch in "cloud" mode.-[[TakingSolrtoProduction-ZooKeeperchroot]]==== ZooKeeper chrootIf you're using a ZooKeeper instance that is shared by other systems, it's recommended to isolate the SolrCloud znode tree using ZooKeeper's chroot support. For instance, to ensure all znodes created by SolrCloud are stored under `/solr`, you can put `/solr` on the end of your `ZK_HOST` connection string, such as:@@ -225,12 +209,9 @@ bin/solr zk mkroot /solr -z <ZK_node>:<ZK_PORT>[NOTE]====-If you also want to bootstrap ZooKeeper with existing `solr_home`, you can instead use the `zkcli.sh` / `zkcli.bat` `bootstrap` command, which will also create the chroot path if it does not exist. See <<command-line-utilities.adoc#command-line-utilities,Command Line Utilities>> for more info.-====-[[TakingSolrtoProduction-SolrHostname]]=== Solr HostnameUse the `SOLR_HOST` variable in the include file to set the hostname of the Solr server.@@ -242,7 +223,6 @@ SOLR_HOST=solr1.example.comSetting the hostname of the Solr server is recommended, especially when running in SolrCloud mode, as this determines the address of the node when it registers with ZooKeeper.-[[TakingSolrtoProduction-Overridesettingsinsolrconfig.xml]]=== Override Settings in solrconfig.xmlSolr allows configuration properties to be overridden using Java system properties passed at startup using the `-Dproperty=value` syntax. For instance, in `solrconfig.xml`, the default auto soft commit settings are set to:@@ -268,7 +248,6 @@ The `bin/solr` script simply passes options starting with `-D` on to the JVM durSOLR_OPTS="$SOLR_OPTS -Dsolr.autoSoftCommit.maxTime=10000"-----[[TakingSolrtoProduction-RunningmultipleSolrnodesperhost]]== Running Multiple Solr Nodes Per HostThe `bin/solr` script is capable of running multiple instances on one machine, but for a *typical* installation, this is not a recommended setup. Extra CPU and memory resources are required for each additional instance. A single instance is easily capable of handling multiple indexes.diff --git a/solr/solr-ref-guide/src/the-terms-component.adoc b/solr/solr-ref-guide/src/the-terms-component.adocindex 69e1b07ba8e..c8b51ca8b7a 100644--- a/solr/solr-ref-guide/src/the-terms-component.adoc+++ b/solr/solr-ref-guide/src/the-terms-component.adoc@@ -22,12 +22,10 @@ The Terms Component provides access to the indexed terms in a field and the numbIn a sense, this search component provides fast field-faceting over the whole index, not restricted by the base query or any filters. The document frequencies returned are the number of documents that match the term, including any documents that have been marked for deletion but not yet removed from the index.-[[TheTermsComponent-ConfiguringtheTermsComponent]]== Configuring the Terms ComponentBy default, the Terms Component is already configured in `solrconfig.xml` for each collection.-[[TheTermsComponent-DefiningtheTermsComponent]]=== Defining the Terms ComponentDefining the Terms search component is straightforward: simply give it a name and use the class `solr.TermsComponent`.@@ -39,7 +37,6 @@ Defining the Terms search component is straightforward: simply give it a name anThis makes the component available for use, but by itself will not be useable until included with a request handler.-[[TheTermsComponent-UsingtheTermsComponentinaRequestHandler]]=== Using the Terms Component in a Request HandlerThe terms component is included with the `/terms` request handler, which is among Solr's out-of-the-box request handlers - see <<implicit-requesthandlers.adoc#implicit-requesthandlers,Implicit RequestHandlers>>.@@ -48,7 +45,6 @@ Note that the defaults for this request handler set the parameter "terms" to truYou could add this component to another handler if you wanted to, and pass "terms=true" in the HTTP request in order to get terms back. If it is only defined in a separate handler, you must use that handler when querying in order to get terms and not regular documents as results.-[[TheTermsComponent-TermsComponentParameters]]=== Terms Component ParametersThe parameters below allow you to control what terms are returned. You can also configure any of these with the request handler if you'd like to set them permanently. Or, you can add them to the query request. These parameters are:@@ -159,12 +155,10 @@ The response to a terms request is a list of the terms and their document frequeYou may also be interested in the {solr-javadocs}/solr-core/org/apache/solr/handler/component/TermsComponent.html[TermsComponent javadoc].-[[TheTermsComponent-Examples]]-== Examples+== Terms Component ExamplesAll of the following sample queries work with Solr's "`bin/solr -e techproducts`" example.-[[TheTermsComponent-GetTop10Terms]]=== Get Top 10 TermsThis query requests the first ten terms in the name field: `\http://localhost:8983/solr/techproducts/terms?terms.fl=name`@@ -195,8 +189,6 @@ Results:</response>------[[TheTermsComponent-GetFirst10TermsStartingwithLetter_a_]]=== Get First 10 Terms Starting with Letter 'a'This query requests the first ten terms in the name field, in index order (instead of the top 10 results by document count): `\http://localhost:8983/solr/techproducts/terms?terms.fl=name&terms.lower=a&terms.sort=index`@@ -227,7 +219,6 @@ Results:</response>-----[[TheTermsComponent-SolrJinvocation]]=== SolrJ Invocation[source,java]@@ -245,7 +236,6 @@ Results:List<Term> terms = request.process(getSolrClient()).getTermsResponse().getTerms("terms_s");-----[[TheTermsComponent-UsingtheTermsComponentforanAuto-SuggestFeature]]== Using the Terms Component for an Auto-Suggest FeatureIf the <<suggester.adoc#suggester,Suggester>> doesn't suit your needs, you can use the Terms component in Solr to build a similar feature for your own search application. Simply submit a query specifying whatever characters the user has typed so far as a prefix. For example, if the user has typed "at", the search engine's interface would submit the following query:@@ -288,7 +278,6 @@ Result:}-----[[TheTermsComponent-DistributedSearchSupport]]== Distributed Search SupportThe TermsComponent also supports distributed indexes. For the `/terms` request handler, you must provide the following two parameters:diff --git a/solr/solr-ref-guide/src/tokenizers.adoc b/solr/solr-ref-guide/src/tokenizers.adocindex 7a8bdeb37f4..7718723baed 100644--- a/solr/solr-ref-guide/src/tokenizers.adoc+++ b/solr/solr-ref-guide/src/tokenizers.adoc@@ -49,7 +49,6 @@ The following sections describe the tokenizer factory classes included in this rFor user tips about Solr's tokenizers, see http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters.-[[Tokenizers-StandardTokenizer]]== Standard TokenizerThis tokenizer splits the text field into tokens, treating whitespace and punctuation as delimiters. Delimiter characters are discarded, with the following exceptions:@@ -80,7 +79,6 @@ The Standard Tokenizer supports http://unicode.org/reports/tr29/#Word_Boundaries*Out:* "Please", "email", "john.doe", "foo.com", "by", "03", "09", "re", "m37", "xq"-[[Tokenizers-ClassicTokenizer]]== Classic TokenizerThe Classic Tokenizer preserves the same behavior as the Standard Tokenizer of Solr versions 3.1 and previous. It does not use the http://unicode.org/reports/tr29/#Word_Boundaries[Unicode standard annex UAX#29] word boundary rules that the Standard Tokenizer uses. This tokenizer splits the text field into tokens, treating whitespace and punctuation as delimiters. Delimiter characters are discarded, with the following exceptions:@@ -110,7 +108,6 @@ The Classic Tokenizer preserves the same behavior as the Standard Tokenizer of S*Out:* "Please", "email", "[email protected]", "by", "03-09", "re", "m37-xq"-[[Tokenizers-KeywordTokenizer]]== Keyword TokenizerThis tokenizer treats the entire text field as a single token.@@ -132,7 +129,6 @@ This tokenizer treats the entire text field as a single token.*Out:* "Please, email [email protected] by 03-09, re: m37-xq."-[[Tokenizers-LetterTokenizer]]== Letter TokenizerThis tokenizer creates tokens from strings of contiguous letters, discarding all non-letter characters.@@ -154,7 +150,6 @@ This tokenizer creates tokens from strings of contiguous letters, discarding all*Out:* "I", "can", "t"-[[Tokenizers-LowerCaseTokenizer]]== Lower Case TokenizerTokenizes the input stream by delimiting at non-letters and then converting all letters to lowercase. Whitespace and non-letters are discarded.@@ -176,7 +171,6 @@ Tokenizes the input stream by delimiting at non-letters and then converting all*Out:* "i", "just", "love", "my", "iphone"-[[Tokenizers-N-GramTokenizer]]== N-Gram TokenizerReads the field text and generates n-gram tokens of sizes in the given range.@@ -219,7 +213,6 @@ With an n-gram size range of 4 to 5:*Out:* "bicy", "bicyc", "icyc", "icycl", "cycl", "cycle", "ycle"-[[Tokenizers-EdgeN-GramTokenizer]]== Edge N-Gram TokenizerReads the field text and generates edge n-gram tokens of sizes in the given range.@@ -279,7 +272,6 @@ Edge n-gram range of 2 to 5, from the back side:*Out:* "oo", "loo", "aloo", "baloo"-[[Tokenizers-ICUTokenizer]]== ICU TokenizerThis tokenizer processes multilingual text and tokenizes it appropriately based on its script attribute.@@ -319,7 +311,6 @@ To use this tokenizer, you must add additional .jars to Solr's classpath (as des====-[[Tokenizers-PathHierarchyTokenizer]]== Path Hierarchy TokenizerThis tokenizer creates synonyms from file path hierarchies.@@ -347,7 +338,6 @@ This tokenizer creates synonyms from file path hierarchies.*Out:* "c:", "c:/usr", "c:/usr/local", "c:/usr/local/apache"-[[Tokenizers-RegularExpressionPatternTokenizer]]== Regular Expression Pattern TokenizerThis tokenizer uses a Java regular expression to break the input text stream into tokens. The expression provided by the pattern argument can be interpreted either as a delimiter that separates tokens, or to match patterns that should be extracted from the text as tokens.@@ -407,7 +397,6 @@ Extract part numbers which are preceded by "SKU", "Part" or "Part Number", case*Out:* "1234", "5678", "126-987"-[[Tokenizers-SimplifiedRegularExpressionPatternTokenizer]]== Simplified Regular Expression Pattern TokenizerThis tokenizer is similar to the `PatternTokenizerFactory` described above, but uses Lucene {lucene-javadocs}/core/org/apache/lucene/util/automaton/RegExp.html[`RegExp`] pattern matching to construct distinct tokens for the input stream. The syntax is more limited than `PatternTokenizerFactory`, but the tokenization is quite a bit faster.@@ -431,7 +420,6 @@ To match tokens delimited by simple whitespace characters:</analyzer>-----[[Tokenizers-SimplifiedRegularExpressionPatternSplittingTokenizer]]== Simplified Regular Expression Pattern Splitting TokenizerThis tokenizer is similar to the `SimplePatternTokenizerFactory` described above, but uses Lucene {lucene-javadocs}/core/org/apache/lucene/util/automaton/RegExp.html[`RegExp`] pattern matching to identify sequences of characters that should be used to split tokens. The syntax is more limited than `PatternTokenizerFactory`, but the tokenization is quite a bit faster.@@ -455,7 +443,6 @@ To match tokens delimited by simple whitespace characters:</analyzer>-----[[Tokenizers-UAX29URLEmailTokenizer]]== UAX29 URL Email TokenizerThis tokenizer splits the text field into tokens, treating whitespace and punctuation as delimiters. Delimiter characters are discarded, with the following exceptions:@@ -491,7 +478,6 @@ The UAX29 URL Email Tokenizer supports http://unicode.org/reports/tr29/#Word_Bou*Out:* "Visit", "http://accarol.com/contact.htm?from=external&a=10", "or", "e", "mail", "[email protected]"-[[Tokenizers-WhiteSpaceTokenizer]]== White Space TokenizerSimple tokenizer that splits the text stream on whitespace and returns sequences of non-whitespace characters as tokens. Note that any punctuation _will_ be included in the tokens.diff --git a/solr/solr-ref-guide/src/transforming-result-documents.adoc b/solr/solr-ref-guide/src/transforming-result-documents.adocindex 9e1d4adcfe9..754060db295 100644--- a/solr/solr-ref-guide/src/transforming-result-documents.adoc+++ b/solr/solr-ref-guide/src/transforming-result-documents.adoc@@ -126,14 +126,14 @@ A default style can be configured by specifying an "args" parameter in your conf=== [child] - ChildDocTransformerFactory-This transformer returns all <<uploading-data-with-index-handlers.adoc#UploadingDatawithIndexHandlers-NestedChildDocuments,descendant documents>> of each parent document matching your query in a flat list nested inside the matching parent document. This is useful when you have indexed nested child documents and want to retrieve the child documents for the relevant parent documents for any type of search query.+This transformer returns all <<uploading-data-with-index-handlers.adoc#nested-child-documents,descendant documents>> of each parent document matching your query in a flat list nested inside the matching parent document. This is useful when you have indexed nested child documents and want to retrieve the child documents for the relevant parent documents for any type of search query.[source,plain]----fl=id,[child parentFilter=doc_type:book childFilter=doc_type:chapter limit=100]-----Note that this transformer can be used even though the query itself is not a <<other-parsers.adoc#OtherParsers-BlockJoinQueryParsers,Block Join query>>.+Note that this transformer can be used even though the query itself is not a <<other-parsers.adoc#block-join-query-parsers,Block Join query>>.When using this transformer, the `parentFilter` parameter must be specified, and works the same as in all Block Join Queries, additional optional parameters are:diff --git a/solr/solr-ref-guide/src/update-request-processors.adoc b/solr/solr-ref-guide/src/update-request-processors.adocindex cbc60139826..a11d74ad34a 100644--- a/solr/solr-ref-guide/src/update-request-processors.adoc+++ b/solr/solr-ref-guide/src/update-request-processors.adoc@@ -142,10 +142,10 @@ However executing a processor only on the forwarding nodes is a great way of dis.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#write-side-fault-tolerance,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*.====-=== Atomic Updates+=== Atomic Update Processor FactoryIf the `AtomicUpdateProcessorFactory` is in the update chain before the `DistributedUpdateProcessor`, the incoming document to the chain will be a partial document.diff --git a/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc b/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adocindex 040da8626db..43314574bbb 100644--- a/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc+++ b/solr/solr-ref-guide/src/updatehandlers-in-solrconfig.adoc@@ -27,12 +27,10 @@ The settings in this section are configured in the `<updateHandler>` element in</updateHandler>-----[[UpdateHandlersinSolrConfig-Commits]]== CommitsData sent to Solr is not searchable until it has been _committed_ to the index. The reason for this is that in some cases commits can be slow and they should be done in isolation from other possible commit requests to avoid overwriting data. So, it's preferable to provide control over when data is committed. Several options are available to control the timing of commits.-[[UpdateHandlersinSolrConfig-commitandsoftCommit]]=== commit and softCommitIn Solr, a `commit` is an action which asks Solr to "commit" those changes to the Lucene index files. By default commit actions result in a "hard commit" of all the Lucene index files to stable storage (disk). When a client includes a `commit=true` parameter with an update request, this ensures that all index segments affected by the adds & deletes on an update are written to disk as soon as index updates are completed.@@ -41,7 +39,6 @@ If an additional flag `softCommit=true` is specified, then Solr performs a 'softFor more information about Near Real Time operations, see <<near-real-time-searching.adoc#near-real-time-searching,Near Real Time Searching>>.-[[UpdateHandlersinSolrConfig-autoCommit]]=== autoCommitThese settings control how often pending updates will be automatically pushed to the index. An alternative to `autoCommit` is to use `commitWithin`, which can be defined when making the update request to Solr (i.e., when pushing documents), or in an update RequestHandler.@@ -77,7 +74,6 @@ You can also specify 'soft' autoCommits in the same way that you can specify 'so</autoSoftCommit>-----[[UpdateHandlersinSolrConfig-commitWithin]]=== commitWithinThe `commitWithin` settings allow forcing document commits to happen in a defined time period. This is used most frequently with <<near-real-time-searching.adoc#near-real-time-searching,Near Real Time Searching>>, and for that reason the default is to perform a soft commit. This does not, however, replicate new documents to slave servers in a master/slave environment. If that's a requirement for your implementation, you can force a hard commit by adding a parameter, as in this example:@@ -91,7 +87,6 @@ The `commitWithin` settings allow forcing document commits to happen in a defineWith this configuration, when you call `commitWithin` as part of your update message, it will automatically perform a hard commit every time.-[[UpdateHandlersinSolrConfig-EventListeners]]== Event ListenersThe UpdateHandler section is also where update-related event listeners can be configured. These can be triggered to occur after any commit (`event="postCommit"`) or only after optimize commands (`event="postOptimize"`).@@ -113,7 +108,6 @@ Any arguments to pass to the program. The default is none.`env`::Any environment variables to set. The default is none.-[[UpdateHandlersinSolrConfig-TransactionLog]]== Transaction LogAs described in the section <<realtime-get.adoc#realtime-get,RealTime Get>>, a transaction log is required for that feature. It is configured in the `updateHandler` section of `solrconfig.xml`.@@ -127,7 +121,7 @@ Realtime Get currently relies on the update log feature, which is enabled by def</updateLog>-----Three additional expert-level configuration settings affect indexing performance and how far a replica can fall behind on updates before it must enter into full recovery - see the section on <<read-and-write-side-fault-tolerance.adoc#ReadandWriteSideFaultTolerance-WriteSideFaultTolerance,write side fault tolerance>> for more information:+Three additional expert-level configuration settings affect indexing performance and how far a replica can fall behind on updates before it must enter into full recovery - see the section on <<read-and-write-side-fault-tolerance.adoc#write-side-fault-tolerance,write side fault tolerance>> for more information:`numRecordsToKeep`::The number of update records to keep per log. The default is `100`.diff --git a/solr/solr-ref-guide/src/updating-parts-of-documents.adoc b/solr/solr-ref-guide/src/updating-parts-of-documents.adocindex 5ff8a2827ee..e6b51753734 100644--- a/solr/solr-ref-guide/src/updating-parts-of-documents.adoc+++ b/solr/solr-ref-guide/src/updating-parts-of-documents.adoc@@ -20,15 +20,14 @@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.-The first is __<<UpdatingPartsofDocuments-AtomicUpdates,atomic updates>>__. This approach allows changing only one or more fields of a document without having to re-index the entire document.+The first is _<<Atomic Updates,atomic updates>>_. This approach allows changing only one or more fields of a document without having to re-index the entire document.-The second approach is known as __<<UpdatingPartsofDocuments-In-PlaceUpdates,in-place updates>>__. This approach is similar to atomic updates (is a subset of atomic updates in some sense), but can be used only for updating single valued non-indexed and non-stored docValue-based numeric fields.+The second approach is known as _<<In-Place Updates,in-place updates>>_. This approach is similar to atomic updates (is a subset of atomic updates in some sense), but can be used only for updating single valued non-indexed and non-stored docValue-based numeric fields.-The third approach is known as _<<UpdatingPartsofDocuments-OptimisticConcurrency,optimistic concurrency>>_ or __optimistic locking__. It is a feature of many NoSQL databases, and allows conditional updating a document based on its version. This approach includes semantics and rules for how to deal with version matches or mis-matches.+The third approach is known as _<<Optimistic Concurrency,optimistic concurrency>>_ or _optimistic locking_. It is a feature of many NoSQL databases, and allows conditional updating a document based on its version. This approach includes semantics and rules for how to deal with version matches or mis-matches.Atomic Updates (and in-place updates) and Optimistic Concurrency may be used as independent strategies for managing changes to documents, or they may be combined: you can use optimistic concurrency to conditionally apply an atomic update.-[[UpdatingPartsofDocuments-AtomicUpdates]]== Atomic UpdatesSolr supports several modifiers that atomically update values of a document. This allows updating only specific fields, which can help speed indexing processes in an environment where speed of index additions is critical to the application.@@ -52,7 +51,6 @@ Removes all occurrences of the specified regex from a multiValued field. May be`inc`::Increments a numeric value by a specific amount. Must be specified as a single numeric value.-[[UpdatingPartsofDocuments-FieldStorage]]=== Field StorageThe core functionality of atomically updating a document requires that all fields in your schema must be configured as stored (`stored="true"`) or docValues (`docValues="true"`) except for fields which are `<copyField/>` destinations, which must be configured as `stored="false"`. Atomic updates are applied to the document represented by the existing stored field values. All data in copyField destinations fields must originate from ONLY copyField sources.@@ -61,8 +59,7 @@ If `<copyField/>` destinations are configured as stored, then Solr will attemptThere are other kinds of derived fields that must also be set so they aren't stored. Some spatial field types use derived fields. Examples of this are solr.BBoxField and solr.LatLonType. CurrencyFieldType also uses derived fields. These types create additional fields which are normally specified by a dynamic field definition. That dynamic field definition must be not stored, or indexing will fail.-[[UpdatingPartsofDocuments-Example]]-=== Example+=== Example Updating Part of a DocumentIf the following document exists in our collection:@@ -102,7 +99,6 @@ The resulting document in our collection will be:}-----[[UpdatingPartsofDocuments-In-PlaceUpdates]]== In-Place UpdatesIn-place updates are very similar to atomic updates; in some sense, this is a subset of atomic updates. In regular atomic updates, the entire document is re-indexed internally during the application of the update. However, in this approach, only the fields to be updated are affected and the rest of the documents are not re-indexed internally. Hence, the efficiency of updating in-place is unaffected by the size of the documents that are updated (i.e., number of fields, size of fields, etc.). Apart from these internal differences, there is no functional difference between atomic updates and in-place updates.@@ -121,8 +117,7 @@ Set or replace the field value(s) with the specified value(s). May be specified`inc`::Increments a numeric value by a specific amount. Must be specified as a single numeric value.-[[UpdatingPartsofDocuments-Example.1]]-=== Example+=== In-Place Update ExampleIf the price and popularity fields are defined in the schema as:@@ -169,17 +164,16 @@ The resulting document in our collection will be:}-----[[UpdatingPartsofDocuments-OptimisticConcurrency]]== Optimistic ConcurrencyOptimistic Concurrency is a feature of Solr that can be used by client applications which update/replace documents to ensure that the document they are replacing/updating has not been concurrently modified by another client application. This feature works by requiring a `\_version_` field on all documents in the index, and comparing that to a `\_version_` specified as part of the update command. By default, Solr's Schema includes a `\_version_` field, and this field is automatically added to each new document.In general, using optimistic concurrency involves the following work flow:-1. A client reads a document. In Solr, one might retrieve the document with the `/get` handler to be sure to have the latest version.-2. A client changes the document locally.-3. The client resubmits the changed document to Solr, for example, perhaps with the `/update` handler.-4. If there is a version conflict (HTTP error code 409), the client starts the process over.+. A client reads a document. In Solr, one might retrieve the document with the `/get` handler to be sure to have the latest version.+. A client changes the document locally.+. The client resubmits the changed document to Solr, for example, perhaps with the `/update` handler.+. If there is a version conflict (HTTP error code 409), the client starts the process over.When the client resubmits a changed document to Solr, the `\_version_` can be included with the update to invoke optimistic concurrency control. Specific semantics are used to define when the document should be updated or when to report a conflict.@@ -233,7 +227,6 @@ $ curl 'http://localhost:8983/solr/techproducts/query?q=*:*&fl=id,_version_'For more information, please also see https://www.youtube.com/watch?v=WYVM6Wz-XTw[Yonik Seeley's presentation on NoSQL features in Solr 4] from Apache Lucene EuroCon 2012.-[[UpdatingPartsofDocuments-DocumentCentricVersioningConstraints]]== Document Centric Versioning ConstraintsOptimistic Concurrency is extremely powerful, and works very efficiently because it uses an internally assigned, globally unique values for the `\_version_` field. However, In some situations users may want to configure their own document specific version field, where the version values are assigned on a per-document basis by an external system, and have Solr reject updates that attempt to replace a document with an "older" version. In situations like this the {solr-javadocs}/solr-core/org/apache/solr/update/processor/DocBasedVersionConstraintsProcessorFactory.html[`DocBasedVersionConstraintsProcessorFactory`] can be useful.@@ -252,9 +245,7 @@ Once configured, this update processor will reject (HTTP error code 409) any att.versionField vs `\_version_`[IMPORTANT]====-The `\_version_` field used by Solr for its normal optimistic concurrency also has important semantics in how updates are distributed to replicas in SolrCloud, and *MUST* be assigned internally by Solr. Users can not re-purpose that field and specify it as the `versionField` for use in the `DocBasedVersionConstraintsProcessorFactory` configuration.-====`DocBasedVersionConstraintsProcessorFactory` supports two additional configuration params which are optional:diff --git a/solr/solr-ref-guide/src/upgrading-solr.adoc b/solr/solr-ref-guide/src/upgrading-solr.adocindex 6a60b8d7a50..a1db074f31f 100644--- a/solr/solr-ref-guide/src/upgrading-solr.adoc+++ b/solr/solr-ref-guide/src/upgrading-solr.adoc@@ -45,7 +45,7 @@ If you are already using Solr 6.5, Solr 6.6 should not present any major problem** The metrics "avgRequestsPerMinute", "5minRateRequestsPerMinute" and "15minRateRequestsPerMinute" have been replaced by corresponding per-second rates viz. "avgRequestsPerSecond", "5minRateRequestsPerSecond" and "15minRateRequestsPerSecond" for consistency with stats output in other parts of Solr.* A new highlighter named UnifiedHighlighter has been added. You are encouraged to try out the UnifiedHighlighter by setting `hl.method=unified` and report feedback. It might become the default in 7.0. It's more efficient/faster than the other highlighters, especially compared to the original Highlighter. That said, some options aren't supported yet. It will get more features in time, especially with your input. See HighlightParams.java for a listing of highlight parameters annotated with which highlighters use them. `hl.useFastVectorHighlighter` is now considered deprecated in lieu of `hl.method=fastVector`.* The <<query-settings-in-solrconfig.adoc#query-settings-in-solrconfig,`maxWarmingSearchers` parameter>> now defaults to 1, and more importantly commits will now block if this limit is exceeded instead of throwing an exception (a good thing). Consequently there is no longer a risk in overlapping commits. Nonetheless users should continue to avoid excessive committing. Users are advised to remove any pre-existing maxWarmingSearchers entries from their solrconfig.xml files.-* The <<other-parsers.adoc#OtherParsers-ComplexPhraseQueryParser,Complex Phrase query parser>> now supports leading wildcards. Beware of its possible heaviness, users are encouraged to use ReversedWildcardFilter in index time analysis.+* The <<other-parsers.adoc#complex-phrase-query-parser,Complex Phrase query parser>> now supports leading wildcards. Beware of its possible heaviness, users are encouraged to use ReversedWildcardFilter in index time analysis.* The JMX metric "avgTimePerRequest" (and the corresponding metric in the metrics API for each handler) used to be a simple non-decaying average based on total cumulative time and the number of requests. New Codahale Metrics implementation applies exponential decay to this value, which heavily biases the average towards the last 5 minutes.* Index-time boosts are now deprecated. As a replacement, index-time scoring factors should be indexed in a separate field and combined with the query score using a function query. These boosts will be removed in Solr 7.0.* Parallel SQL now uses Apache Calcite as its SQL framework. As part of this change the default aggregation mode has been changed to facet rather than map_reduce. There have also been changes to the SQL aggregate response and some SQL syntax changes. Consult the <<parallel-sql-interface.adoc#parallel-sql-interface,Parallel SQL Interface>> documentation for full details.@@ -57,7 +57,7 @@ If you are already using Solr 6.5, Solr 6.6 should not present any major problem* `SolrClient.shutdown()` has been removed, use {solr-javadocs}/solr-solrj/org/apache/solr/client/solrj/SolrClient.html[`SolrClient.close()`] instead.* The deprecated `zkCredientialsProvider` element in `solrcloud` section of `solr.xml` is now removed. Use the correct spelling (<<zookeeper-access-control.adoc#zookeeper-access-control,`zkCredentialsProvider`>>) instead.* Internal/expert - `ResultContext` was significantly changed and expanded to allow for multiple full query results (`DocLists`) per Solr request. `TransformContext` was rendered redundant and was removed. See https://issues.apache.org/jira/browse/SOLR-7957[SOLR-7957] for details.-* Several changes have been made regarding the "<<other-schema-elements.adoc#OtherSchemaElements-Similarity,`Similarity`>>" used in Solr, in order to provide better default behavior for new users. There are 3 key impacts of these changes on existing users who upgrade:+* Several changes have been made regarding the "<<other-schema-elements.adoc#similarity,`Similarity`>>" used in Solr, in order to provide better default behavior for new users. There are 3 key impacts of these changes on existing users who upgrade:** `DefaultSimilarityFactory` has been removed. If you currently have `DefaultSimilarityFactory` explicitly referenced in your `schema.xml`, edit your config to use the functionally identical `ClassicSimilarityFactory`. See https://issues.apache.org/jira/browse/SOLR-8239[SOLR-8239] for more details.** The implicit default Similarity used when no `<similarity/>` is configured in `schema.xml` has been changed to `SchemaSimilarityFactory`. Users who wish to preserve back-compatible behavior should either explicitly configure `ClassicSimilarityFactory`, or ensure that the `luceneMatchVersion` for the collection is less then 6.0. See https://issues.apache.org/jira/browse/SOLR-8270[SOLR-8270] + http://SOLR-8271[SOLR-8271] for details.** `SchemaSimilarityFactory` has been modified to use `BM25Similarity` as the default for `fieldTypes` that do not explicitly declare a Similarity. The legacy behavior of using `ClassicSimilarity` as the default will occur if the `luceneMatchVersion` for the collection is less then 6.0, or the `'defaultSimFromFieldType'` configuration option may be used to specify any default of your choosing. See https://issues.apache.org/jira/browse/SOLR-8261[SOLR-8261] + https://issues.apache.org/jira/browse/SOLR-8329[SOLR-8329] for more details.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.adocindex 6a8ad9967c7..ff59d617b27 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@@ -25,7 +25,6 @@ The recommended way to configure and use request handlers is with path based namA single unified update request handler supports XML, CSV, JSON, and javabin update requests, delegating to the appropriate `ContentStreamLoader` based on the `Content-Type` of the <<content-streams.adoc#content-streams,ContentStream>>.-[[UploadingDatawithIndexHandlers-UpdateRequestHandlerConfiguration]]== UpdateRequestHandler ConfigurationThe default configuration file has the update request handler configured by default.@@ -35,12 +34,10 @@ The default configuration file has the update request handler configured by defa<requestHandler name="/update" class="solr.UpdateRequestHandler" />-----[[UploadingDatawithIndexHandlers-XMLFormattedIndexUpdates]]== XML Formatted Index UpdatesIndex update commands can be sent as XML message to the update handler using `Content-type: application/xml` or `Content-type: text/xml`.-[[UploadingDatawithIndexHandlers-AddingDocuments]]=== Adding DocumentsThe XML schema recognized by the update handler for adding documents is very straightforward:@@ -84,11 +81,9 @@ If the document schema defines a unique key, then by default an `/update` operatIf you have a unique key field, but you feel confident that you can safely bypass the uniqueness check (e.g., 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-[[UploadingDatawithIndexHandlers-CommitandOptimizeOperations]]-==== Commit and Optimize Operations+==== Commit and Optimize During UpdatesThe `<commit>` operation writes all documents loaded since the last commit to one or more segment files on the disk. Before a commit has been issued, newly indexed content is not visible to searches. The commit operation opens a new searcher, and triggers any event listeners that have been configured.@@ -114,7 +109,6 @@ Here are examples of <commit> and <optimize> using optional attributes:<optimize waitSearcher="false"/>-----[[UploadingDatawithIndexHandlers-DeleteOperations]]==== Delete OperationsDocuments can be deleted from the index in two ways. "Delete by ID" deletes the document with the specified ID, and can be used only if a UniqueID field has been defined in the schema. "Delete by Query" deletes all documents matching a specified query, although `commitWithin` is ignored for a Delete by Query. A single delete message can contain multiple delete operations.@@ -136,12 +130,10 @@ When using the Join query parser in a Delete By Query, you should use the `score====-[[UploadingDatawithIndexHandlers-RollbackOperations]]==== Rollback OperationsThe rollback command rolls back all add and deletes made to the index since the last commit. It neither calls any event listeners nor creates a new searcher. Its syntax is simple: `<rollback/>`.-[[UploadingDatawithIndexHandlers-UsingcurltoPerformUpdates]]=== Using curl to Perform UpdatesYou can use the `curl` utility to perform any of the above commands, using its `--data-binary` option to append the XML message to the `curl` command, and generating a HTTP POST request. For example:@@ -168,7 +160,7 @@ For posting XML messages contained in a file, you can use the alternative form:curl http://localhost:8983/solr/my_collection/update -H "Content-Type: text/xml" --data-binary @myfile.xml-----Short requests can also be sent using a HTTP GET command, if enabled in <<requestdispatcher-in-solrconfig.adoc#RequestDispatcherinSolrConfig-requestParsersElement,RequestDispatcher in SolrConfig>> element, URL-encoding the request, as in the following. Note the escaping of "<" and ">":+Short requests can also be sent using a HTTP GET command, if enabled in <<requestdispatcher-in-solrconfig.adoc#requestparsers-element,RequestDispatcher in SolrConfig>> element, URL-encoding the request, as in the following. Note the escaping of "<" and ">":[source,bash]----@@ -189,7 +181,6 @@ Responses from Solr take the form shown here:The status field will be non-zero in case of failure.-[[UploadingDatawithIndexHandlers-UsingXSLTtoTransformXMLIndexUpdates]]=== Using XSLT to Transform XML Index UpdatesThe UpdateRequestHandler allows you to index any arbitrary XML using the `<tr>` parameter to apply an https://en.wikipedia.org/wiki/XSLT[XSL transformation]. You must have an XSLT stylesheet in the `conf/xslt` directory of your <<config-sets.adoc#config-sets,config set>> that can transform the incoming data to the expected `<add><doc/></add>` format, and use the `tr` parameter to specify the name of that stylesheet.@@ -250,23 +241,20 @@ You can also use the stylesheet in `XsltUpdateRequestHandler` to transform an incurl "http://localhost:8983/solr/my_collection/update?commit=true&tr=updateXml.xsl" -H "Content-Type: text/xml" --data-binary @myexporteddata.xml-----[[UploadingDatawithIndexHandlers-JSONFormattedIndexUpdates]]== JSON Formatted Index UpdatesSolr can accept JSON that conforms to a defined structure, or can accept arbitrary JSON-formatted documents. If sending arbitrarily formatted JSON, there are some additional parameters that need to be sent with the update request, described below in the section <<transforming-and-indexing-custom-json.adoc#transforming-and-indexing-custom-json,Transforming and Indexing Custom JSON>>.-[[UploadingDatawithIndexHandlers-Solr-StyleJSON]]=== Solr-Style JSONJSON formatted update requests may be sent to Solr's `/update` handler using `Content-Type: application/json` or `Content-Type: text/json`.JSON formatted updates can take 3 basic forms, described in depth below:-* <<UploadingDatawithIndexHandlers-AddingaSingleJSONDocument,A single document to add>>, expressed as a top level JSON Object. To differentiate this from a set of commands, the `json.command=false` request parameter is required.-* <<UploadingDatawithIndexHandlers-AddingMultipleJSONDocuments,A list of documents to add>>, expressed as a top level JSON Array containing a JSON Object per document.-* <<UploadingDatawithIndexHandlers-SendingJSONUpdateCommands,A sequence of update commands>>, expressed as a top level JSON Object (aka: Map).+* <<Adding a Single JSON Document,A single document to add>>, expressed as a top level JSON Object. To differentiate this from a set of commands, the `json.command=false` request parameter is required.+* <<Adding Multiple JSON Documents,A list of documents to add>>, expressed as a top level JSON Array containing a JSON Object per document.+* <<Sending JSON Update Commands,A sequence of update commands>>, expressed as a top level JSON Object (aka: Map).-[[UploadingDatawithIndexHandlers-AddingaSingleJSONDocument]]==== Adding a Single JSON DocumentThe simplest way to add Documents via JSON is to send each document individually as a JSON Object, using the `/update/json/docs` path:@@ -280,7 +268,6 @@ curl -X POST -H 'Content-Type: application/json' 'http://localhost:8983/solr/my_}'-----[[UploadingDatawithIndexHandlers-AddingMultipleJSONDocuments]]==== Adding Multiple JSON DocumentsAdding multiple documents at one time via JSON can be done via a JSON Array of JSON Objects, where each object represents a document:@@ -307,7 +294,6 @@ A sample JSON file is provided at `example/exampledocs/books.json` and containscurl 'http://localhost:8983/solr/techproducts/update?commit=true' --data-binary @example/exampledocs/books.json -H 'Content-type:application/json'-----[[UploadingDatawithIndexHandlers-SendingJSONUpdateCommands]]==== Sending JSON Update CommandsIn general, the JSON update syntax supports all of the update commands that the XML update handler supports, through a straightforward mapping. Multiple commands, adding and deleting documents, may be contained in one message:@@ -377,7 +363,6 @@ You can also specify `\_version_` with each "delete":You can specify the version of deletes in the body of the update request as well.-[[UploadingDatawithIndexHandlers-JSONUpdateConveniencePaths]]=== JSON Update Convenience PathsIn addition to the `/update` handler, there are a few additional JSON specific request handler paths available by default in Solr, that implicitly override the behavior of some request parameters:@@ -395,13 +380,11 @@ In addition to the `/update` handler, there are a few additional JSON specific rThe `/update/json` path may be useful for clients sending in JSON formatted update commands from applications where setting the Content-Type proves difficult, while the `/update/json/docs` path can be particularly convenient for clients that always want to send in documents – either individually or as a list – without needing to worry about the full JSON command syntax.-[[UploadingDatawithIndexHandlers-CustomJSONDocuments]]=== Custom JSON DocumentsSolr can support custom JSON. This is covered in the section <<transforming-and-indexing-custom-json.adoc#transforming-and-indexing-custom-json,Transforming and Indexing Custom JSON>>.-[[UploadingDatawithIndexHandlers-CSVFormattedIndexUpdates]]== CSV Formatted Index UpdatesCSV formatted update requests may be sent to Solr's `/update` handler using `Content-Type: application/csv` or `Content-Type: text/csv`.@@ -413,7 +396,6 @@ A sample CSV file is provided at `example/exampledocs/books.csv` that you can uscurl 'http://localhost:8983/solr/my_collection/update?commit=true' --data-binary @example/exampledocs/books.csv -H 'Content-type:application/csv'-----[[UploadingDatawithIndexHandlers-CSVUpdateParameters]]=== CSV Update ParametersThe CSV handler allows the specification of many parameters in the URL in the form: `f._parameter_._optional_fieldname_=_value_` .@@ -498,7 +480,6 @@ Add the given offset (as an integer) to the `rowid` before adding it to the docu+Example: `rowidOffset=10`-[[UploadingDatawithIndexHandlers-IndexingTab-Delimitedfiles]]=== Indexing Tab-Delimited filesThe same feature used to index CSV documents can also be easily used to index tab-delimited files (TSV files) and even handle backslash escaping rather than CSV encapsulation.@@ -517,7 +498,6 @@ This file could then be imported into Solr by setting the `separator` to tab (%0curl 'http://localhost:8983/solr/my_collection/update/csv?commit=true&separator=%09&escape=%5c' --data-binary @/tmp/result.txt-----[[UploadingDatawithIndexHandlers-CSVUpdateConveniencePaths]]=== CSV Update Convenience PathsIn addition to the `/update` handler, there is an additional CSV specific request handler path available by default in Solr, that implicitly override the behavior of some request parameters:@@ -530,16 +510,14 @@ In addition to the `/update` handler, there is an additional CSV specific requesThe `/update/csv` path may be useful for clients sending in CSV formatted update commands from applications where setting the Content-Type proves difficult.-[[UploadingDatawithIndexHandlers-NestedChildDocuments]]== Nested Child Documents-Solr indexes nested documents in blocks as a way to model documents containing other documents, such as a blog post parent document and comments as child documents -- or products as parent documents and sizes, colors, or other variations as child documents. At query time, the <<other-parsers.adoc#OtherParsers-BlockJoinQueryParsers,Block Join Query Parsers>> can search these relationships. In terms of performance, indexing the relationships between documents may be more efficient than attempting to do joins only at query time, since the relationships are already stored in the index and do not need to be computed.+Solr indexes nested documents in blocks as a way to model documents containing other documents, such as a blog post parent document and comments as child documents -- or products as parent documents and sizes, colors, or other variations as child documents. At query time, the <<other-parsers.adoc#block-join-query-parsers,Block Join Query Parsers>> can search these relationships. In terms of performance, indexing the relationships between documents may be more efficient than attempting to do joins only at query time, since the relationships are already stored in the index and do not need to be computed.-Nested documents may be indexed via either the XML or JSON data syntax (or using <<using-solrj.adoc#using-solrj,SolrJ)>> - but regardless of syntax, you must include a field that identifies the parent document as a parent; it can be any field that suits this purpose, and it will be used as input for the <<other-parsers.adoc#OtherParsers-BlockJoinQueryParsers,block join query parsers>>.+Nested documents may be indexed via either the XML or JSON data syntax (or using <<using-solrj.adoc#using-solrj,SolrJ)>> - but regardless of syntax, you must include a field that identifies the parent document as a parent; it can be any field that suits this purpose, and it will be used as input for the <<other-parsers.adoc#block-join-query-parsers,block join query parsers>>.To support nested documents, the schema must include an indexed/non-stored field `\_root_`. The value of that field is populated automatically and is the same for all documents in the block, regardless of the inheritance depth.-[[UploadingDatawithIndexHandlers-XMLExamples]]=== XML ExamplesFor example, here are two documents and their child documents:@@ -570,7 +548,6 @@ For example, here are two documents and their child documents:In this example, we have indexed the parent documents with the field `content_type`, which has the value "parentDocument". We could have also used a boolean field, such as `isParent`, with a value of "true", or any other similar approach.-[[UploadingDatawithIndexHandlers-JSONExamples]]=== JSON ExamplesThis example is equivalent to the XML example above, note the special `\_childDocuments_` key need to indicate the nested documents in JSON.diff --git a/solr/solr-ref-guide/src/using-javascript.adoc b/solr/solr-ref-guide/src/using-javascript.adocindex 25aabf8f745..d2247fb25e2 100644--- a/solr/solr-ref-guide/src/using-javascript.adoc+++ b/solr/solr-ref-guide/src/using-javascript.adoc@@ -22,7 +22,7 @@ Using Solr from JavaScript clients is so straightforward that it deserves a specHTTP requests can be sent to Solr using the standard `XMLHttpRequest` mechanism.-Out of the box, Solr can send <<response-writers.adoc#ResponseWriters-JSONResponseWriter,JavaScript Object Notation (JSON) responses>>, which are easily interpreted in JavaScript. Just add `wt=json` to the request URL to have responses sent as JSON.+Out of the box, Solr can send <<response-writers.adoc#json-response-writer,JavaScript Object Notation (JSON) responses>>, which are easily interpreted in JavaScript. Just add `wt=json` to the request URL to have responses sent as JSON.For more information and an excellent example, read the SolJSON page on the Solr Wiki:diff --git a/solr/solr-ref-guide/src/using-python.adoc b/solr/solr-ref-guide/src/using-python.adocindex e790ec9f61b..84a7b4cbaec 100644--- a/solr/solr-ref-guide/src/using-python.adoc+++ b/solr/solr-ref-guide/src/using-python.adoc@@ -18,7 +18,7 @@// 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.+Solr includes an output format specifically for <<response-writers.adoc#python-response-writer,Python>>, but <<response-writers.adoc#json-response-writer,JSON output>> is a little more robust.== Simple Pythondiff --git a/solr/solr-ref-guide/src/using-solr-from-ruby.adoc b/solr/solr-ref-guide/src/using-solr-from-ruby.adocindex ef5454c5b15..0b7033604b9 100644--- a/solr/solr-ref-guide/src/using-solr-from-ruby.adoc+++ b/solr/solr-ref-guide/src/using-solr-from-ruby.adoc@@ -18,7 +18,7 @@// 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+Solr has an optional Ruby response format that extends the <<response-writers.adoc#json-response-writer,JSON output>> to allow the response to be safely eval'd by Ruby's interpreterThis Ruby response format differs from JSON in the following ways: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.adocindex c7a9bd72a1a..31b49f2ba0a 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@@ -76,7 +76,7 @@ To update or change your SolrCloud configuration files:== Preparing ZooKeeper before First Cluster Start-If you will share the same ZooKeeper instance with other applications you should use a _chroot_ in ZooKeeper. Please see <<taking-solr-to-production.adoc#TakingSolrtoProduction-ZooKeeperchroot,ZooKeeper chroot>> for instructions.+If you will share the same ZooKeeper instance with other applications you should use a _chroot_ in ZooKeeper. Please see <<taking-solr-to-production.adoc#zookeeper-chroot,ZooKeeper chroot>> for instructions.There are certain configuration files containing cluster wide configuration. Since some of these are crucial for the cluster to function properly, you may need to upload such files to ZooKeeper before starting your Solr cluster for the first time. Examples of such configuration files (not exhaustive) are `solr.xml`, `security.json` and `clusterprops.json`.diff --git a/solr/solr-ref-guide/src/velocity-search-ui.adoc b/solr/solr-ref-guide/src/velocity-search-ui.adocindex 0cb46975455..cc2fb473009 100644--- a/solr/solr-ref-guide/src/velocity-search-ui.adoc+++ b/solr/solr-ref-guide/src/velocity-search-ui.adoc@@ -18,11 +18,11 @@// 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.+Solr includes a sample search UI based on the <<response-writers.adoc#velocity-writer,VelocityResponseWriter>> (also known as Solritas) that demonstrates several useful features, such as searching, faceting, highlighting, autocomplete, and geospatial searching.When using the `sample_techproducts_configs` config set, you can access the Velocity sample Search UI: `\http://localhost:8983/solr/techproducts/browse`.The Velocity Search UIimage::images/velocity-search-ui/techproducts_browse.png[image,width=500]-For more information about the Velocity Response Writer, see the <<response-writers.adoc#ResponseWriters-VelocityResponseWriter,Response Writer page>>.+For more information about the Velocity Response Writer, see the <<response-writers.adoc#velocity-writer,Response Writer page>>.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.adocindex c85cfa6c342..9208775433f 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@@ -75,7 +75,7 @@ In the above example, the raw amount field will use the `"*_l_ns"` dynamic field.Atomic Updates won't work if dynamic sub-fields are stored[NOTE]====-As noted on <<updating-parts-of-documents.adoc#UpdatingPartsofDocuments-FieldStorage,Updating Parts of Documents>>, stored dynamic sub-fields will cause indexing to fail when you use Atomic Updates. To avoid this problem, specify `stored="false"` on those dynamic fields.+As noted on <<updating-parts-of-documents.adoc#field-storage,Updating Parts of Documents>>, stored dynamic sub-fields will cause indexing to fail when you use Atomic Updates. To avoid this problem, specify `stored="false"` on those dynamic fields.====== Exchange Ratesdiff --git a/solr/solr-ref-guide/src/working-with-dates.adoc b/solr/solr-ref-guide/src/working-with-dates.adocindex 31d0f1f6da8..5f28f61e23a 100644--- a/solr/solr-ref-guide/src/working-with-dates.adoc+++ b/solr/solr-ref-guide/src/working-with-dates.adoc@@ -18,7 +18,6 @@// specific language governing permissions and limitations// under the License.-[[WorkingwithDates-DateFormatting]]== Date FormattingSolr's date fields (`TrieDateField`, `DatePointField` and `DateRangeField`) represent "dates" as a point in time with millisecond precision. The format used is a restricted form of the canonical representation of dateTime in the http://www.w3.org/TR/xmlschema-2/#dateTime[XML Schema specification] – a restricted subset of https://en.wikipedia.org/wiki/ISO_8601[ISO-8601]. For those familiar with Java 8, Solr uses https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html#ISO_INSTANT[DateTimeFormatter.ISO_INSTANT] for formatting, and parsing too with "leniency".@@ -48,7 +47,6 @@ There must be a leading `'-'` for dates prior to year 0000, and Solr will format.Query escaping may be required[WARNING]====-As you can see, the date format includes colon characters separating the hours, minutes, and seconds. Because the colon is a special character to Solr's most common query parsers, escaping is sometimes required, depending on exactly what you are trying to do.This is normally an invalid query: `datefield:1972-05-20T17:33:18.772Z`@@ -57,10 +55,8 @@ These are valid queries: +`datefield:1972-05-20T17\:33\:18.772Z` +`datefield:"1972-05-20T17:33:18.772Z"` +`datefield:[1972-05-20T17:33:18.772Z TO *]`-====-[[WorkingwithDates-DateRangeFormatting]]=== Date Range FormattingSolr's `DateRangeField` supports the same point in time date syntax described above (with _date math_ described below) and more to express date ranges. One class of examples is truncated dates, which represent the entire date span to the precision indicated. The other class uses the range syntax (`[ TO ]`). Here are some examples:@@ -74,12 +70,10 @@ Solr's `DateRangeField` supports the same point in time date syntax described abLimitations: The range syntax doesn't support embedded date math. If you specify a date instance supported by TrieDateField with date math truncating it, like `NOW/DAY`, you still get the first millisecond of that day, not the entire day's range. Exclusive ranges (using `{` & `}`) work in _queries_ but not for _indexing_ ranges.-[[WorkingwithDates-DateMath]]== Date MathSolr's date field types also supports _date math_ expressions, which makes it easy to create times relative to fixed moments in time, include the current time which can be represented using the special value of "```NOW```".-[[WorkingwithDates-DateMathSyntax]]=== Date Math SyntaxDate math expressions consist either adding some quantity of time in a specified unit, or rounding the current time by a specified unit. expressions can be chained and are evaluated left to right.@@ -104,10 +98,8 @@ Note that while date math is most commonly used relative to `NOW` it can be appl`1972-05-20T17:33:18.772Z+6MONTHS+3DAYS/DAY`-[[WorkingwithDates-RequestParametersThatAffectDateMath]]=== Request Parameters That Affect Date Math-[[WorkingwithDates-NOW]]==== NOWThe `NOW` parameter is used internally by Solr to ensure consistent date math expression parsing across multiple nodes in a distributed request. But it can be specified to instruct Solr to use an arbitrary moment in time (past or future) to override for all situations where the the special value of "```NOW```" would impact date math expressions.@@ -118,7 +110,6 @@ Example:`q=solr&fq=start_date:[* TO NOW]&NOW=1384387200000`-[[WorkingwithDates-TZ]]==== TZBy default, all date math expressions are evaluated relative to the UTC TimeZone, but the `TZ` parameter can be specified to override this behaviour, by forcing all date based addition and rounding to be relative to the specified http://docs.oracle.com/javase/8/docs/api/java/util/TimeZone.html[time zone].@@ -161,7 +152,6 @@ http://localhost:8983/solr/my_collection/select?q=*:*&facet.range=my_date_field&...-----[[WorkingwithDates-MoreDateRangeFieldDetails]]== More DateRangeField Details`DateRangeField` is almost a drop-in replacement for places where `TrieDateField` is used. The only difference is that Solr's XML or SolrJ response formats will expose the stored data as a String instead of a Date. The underlying index data for this field will be a bit larger. Queries that align to units of time a second on up should be faster than TrieDateField, especially if it's in UTC. But the main point of DateRangeField as its name suggests is to allow indexing date ranges. To do that, simply supply strings in the format shown above. It also supports specifying 3 different relational predicates between the indexed data, and the query range: `Intersects` (default), `Contains`, `Within`. You can specify the predicate by querying using the `op` local-params parameter like so: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.adocindex 3aa0195dc3b..ac42636ca62 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@@ -18,7 +18,6 @@// specific language governing permissions and limitations// under the License.-[[WorkingwithExternalFilesandProcesses-TheExternalFileFieldType]]== The ExternalFileField TypeThe `ExternalFileField` type makes it possible to specify the values for a field in a file outside the Solr index. For such a field, the file contains mappings from a key field to the field value. Another way to think of this is that, instead of specifying the field in documents as they are indexed, Solr finds values for this field in the external file.@@ -41,7 +40,6 @@ The `keyField` attribute defines the key that will be defined in the external fiThe `valType` attribute specifies the actual type of values that will be found in the file. The type specified must be either a float field type, so valid values for this attribute are `pfloat`, `float` or `tfloat`. This attribute can be omitted.-[[WorkingwithExternalFilesandProcesses-FormatoftheExternalFile]]=== Format of the External FileThe file itself is located in Solr's index directory, which by default is `$SOLR_HOME/data`. The name of the file should be `external___fieldname__` or `external___fieldname__.*`. For the example above, then, the file could be named `external_entryRankFile` or `external_entryRankFile.txt`.@@ -62,10 +60,9 @@ doc40=42The keys listed in this file do not need to be unique. The file does not need to be sorted, but Solr will be able to perform the lookup faster if it is.-[[WorkingwithExternalFilesandProcesses-ReloadinganExternalFile]]=== Reloading an External File-It's possible to define an event listener to reload an external file when either a searcher is reloaded or when a new searcher is started. See the section <<query-settings-in-solrconfig.adoc#QuerySettingsinSolrConfig-Query-RelatedListeners,Query-Related Listeners>> for more information, but a sample definition in `solrconfig.xml` might look like this:+It's possible to define an event listener to reload an external file when either a searcher is reloaded or when a new searcher is started. See the section <<query-settings-in-solrconfig.adoc#query-related-listeners,Query-Related Listeners>> for more information, but a sample definition in `solrconfig.xml` might look like this:[source,xml]----@@ -73,15 +70,14 @@ It's possible to define an event listener to reload an external file when either<listener event="firstSearcher" class="org.apache.solr.schema.ExternalFileFieldReloader"/>-----[[WorkingwithExternalFilesandProcesses-ThePreAnalyzedFieldType]]== The PreAnalyzedField TypeThe `PreAnalyzedField` type provides a way to send to Solr serialized token streams, optionally with independent stored values of a field, and have this information stored and indexed without any additional text processing applied in Solr. This is useful if user wants to submit field content that was already processed by some existing external text processing pipeline (e.g., it has been tokenized, annotated, stemmed, synonyms inserted, etc.), while using all the rich attributes that Lucene's TokenStream provides (per-token attributes).The serialization format is pluggable using implementations of PreAnalyzedParser interface. There are two out-of-the-box implementations:-* <<WorkingwithExternalFilesandProcesses-JsonPreAnalyzedParser,JsonPreAnalyzedParser>>: as the name suggests, it parses content that uses JSON to represent field's content. This is the default parser to use if the field type is not configured otherwise.-* <<WorkingwithExternalFilesandProcesses-SimplePreAnalyzedParser,SimplePreAnalyzedParser>>: uses a simple strict plain text format, which in some situations may be easier to create than JSON.+* <<JsonPreAnalyzedParser>>: as the name suggests, it parses content that uses JSON to represent field's content. This is the default parser to use if the field type is not configured otherwise.+* <<SimplePreAnalyzedParser>>: uses a simple strict plain text format, which in some situations may be easier to create than JSON.There is only one configuration parameter, `parserImpl`. The value of this parameter should be a fully qualified class name of a class that implements PreAnalyzedParser interface. The default value of this parameter is `org.apache.solr.schema.JsonPreAnalyzedParser`.@@ -97,7 +93,6 @@ By default, the query-time analyzer for fields of this type will be the same as</fieldType>-----[[WorkingwithExternalFilesandProcesses-JsonPreAnalyzedParser]]=== JsonPreAnalyzedParserThis is the default serialization format used by PreAnalyzedField type. It uses a top-level JSON map with the following keys:@@ -115,8 +110,7 @@ This is the default serialization format used by PreAnalyzedField type. It usesAny other top-level key is silently ignored.-[[WorkingwithExternalFilesandProcesses-Tokenstreamserialization]]-==== Token stream serialization+==== Token Stream SerializationThe token stream is expressed as a JSON list of JSON maps. The map for each token consists of the following keys and values:@@ -136,8 +130,7 @@ The token stream is expressed as a JSON list of JSON maps. The map for each tokeAny other key is silently ignored.-[[WorkingwithExternalFilesandProcesses-Example]]-==== Example+==== JsonPreAnalyzedParser Example[source,json]----@@ -152,13 +145,11 @@ Any other key is silently ignored.}-----[[WorkingwithExternalFilesandProcesses-SimplePreAnalyzedParser]]=== SimplePreAnalyzedParserThe fully qualified class name to use when specifying this format via the `parserImpl` configuration parameter is `org.apache.solr.schema.SimplePreAnalyzedParser`.-[[WorkingwithExternalFilesandProcesses-Syntax]]-==== Syntax+==== SimplePreAnalyzedParser SyntaxThe serialization format supported by this parser is as follows:@@ -192,8 +183,7 @@ Special characters in "text" values can be escaped using the escape character `\Please note that Unicode sequences (e.g. `\u0001`) are not supported.-[[WorkingwithExternalFilesandProcesses-Supportedattributenames]]-==== Supported attribute names+==== Supported AttributesThe following token attributes are supported, and identified with short symbolic names:@@ -212,8 +202,7 @@ The following token attributes are supported, and identified with short symbolicToken positions are tracked and implicitly added to the token stream - the start and end offsets consider only the term text and whitespace, and exclude the space taken by token attributes.-[[WorkingwithExternalFilesandProcesses-Exampletokenstreams]]-==== Example token streams+==== Example Token Streams// TODO: in cwiki each of these examples was in it's own "panel" ... do we want something like that here?// TODO: these examples match what was in cwiki, but I'm honestly not sure if the formatting there was correct to start?