Apache Solr open-source search software
SOLR-14444: add required/default tables to all params, part II (#211)
Cassandra Targettda1267a56d5d
diff --git a/solr/solr-ref-guide/src/initparams.adoc b/solr/solr-ref-guide/src/initparams.adocindex d2143473279..10c66410692 100644--- a/solr/solr-ref-guide/src/initparams.adoc+++ b/solr/solr-ref-guide/src/initparams.adoc@@ -21,7 +21,7 @@ The `<initParams>` section of `solrconfig.xml` allows you to define request handThere are a couple of use cases where this might be desired:-* Some handlers are implicitly defined in code (see <<implicit-requesthandlers.adoc#,Implicit Request Handlers>>) and there should be a way to add/append/override some of the implicitly defined properties.+* Some handlers are implicitly defined in code (see <<implicit-requesthandlers.adoc#,Implicit Request Handlers>>) and there should be a way to add, append, or override some of the implicitly defined properties.* There are a few properties that are used across handlers.This helps you keep only a single definition of those properties and apply them over multiple handlers.@@ -49,10 +49,22 @@ The syntax and semantics are similar to that of a `<requestHandler>`.The following are the attributes:`path`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A comma-separated list of paths which will use the parameters.Wildcards can be used in paths to define nested paths, as described below.`name`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The name of this set of parameters.The name can be used directly in a requestHandler definition if a path is not explicitly named.If you give your `<initParams>` a name, you can refer to the parameters in a `<requestHandler>` that is not defined as a path.@@ -85,7 +97,7 @@ For example, if we have an `<initParams>` that looks like this:</initParams>-----We've defined three paths with this section:+We've defined three paths in the first line of the example:* `/myhandler` declared as a direct path.* `/root/*` with a single asterisk to indicate the parameters should apply to paths that are one level deep.diff --git a/solr/solr-ref-guide/src/join-query-parser.adoc b/solr/solr-ref-guide/src/join-query-parser.adocindex 83d94c29948..11e30aacfd0 100644--- a/solr/solr-ref-guide/src/join-query-parser.adoc+++ b/solr/solr-ref-guide/src/join-query-parser.adoc@@ -50,23 +50,45 @@ Likewise joining between a `StrField` and a `TextField` that uses `LowerCaseFiltThis query parser takes the following parameters:`from`::-The name of a field which contains values to look for in the "to" field.-Can be single or multi-valued, but must have a field type compatible with the field represented in the "to" field.-This parameter is required.+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The name of a field which contains values to look for in the `to` field.+Can be single or multi-valued, but must have a field type compatible with the field represented in the `to` field.`to`::-The name of a field whose value(s) will be checked against those found in the "from" field.-Can be single or multi-valued, but must have a field type compatible with the "from" field.-This parameter is required.+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The name of a field whose value(s) will be checked against those found in the `from` field.+Can be single or multi-valued, but must have a field type compatible with the `from` field.`fromIndex`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++The name of the index to run the "from" query (`v` parameter) on and where "from" values are gathered.Must be located on the same node as the core processing the request.-This parameter is optional; it defaults to the value of the processing core if not specified.+If this parameter is not defined, it defaults to the value of the processing core.See <<Joining Across Single Shard Collections,Joining Across Single Shard Collections>> or <<Cross Collection Join,Cross Collection Join>> below for more information.`score`::-An optional parameter that instructs Solr to return information about the "from" query scores.+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===+++Instructs Solr to return information about the "from" query scores.The value of this parameter controls what type of aggregation information is returned.Options include `avg` (average), `max` (maximum), `min` (minimum), `total` (total), or `none`.+@@ -74,22 +96,27 @@ If `method` is not specified but `score` is, then the `dvWithScore` method is usIf `method` is specified and is not `dvWithScore`, then the `score` value is ignored.See the `method` parameter documentation below for more details.-`method`::-An optional parameter used to determine which of several query implementations should be used by Solr.+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===+++Determines which of several query implementations should be used by Solr.Options are restricted to: `index`, `dvWithScore`, and `topLevelDV`.++If unspecified the default value is `index`, unless the `score` parameter is present which overrides it to `dvWithScore`.Each implementation has its own performance characteristics, and users are encouraged to experiment to determine which implementation is most performant for their use-case.Details and performance heuristics are given below.-+-`index` the default `method` unless the `score` parameter is specified.-Uses the terms index structures to process the request.++`index`::: The default `method` unless the `score` parameter is specified.+It uses the terms index structures to process the request.Performance scales with the cardinality and number of postings (term occurrences) in the "from" field.Consider this method when the "from" field has low cardinality, when the "to" side returns a large number of documents, or when sporadic post-commit slowdowns cannot be tolerated (this is a disadvantage of other methods that `index` avoids).-+-`dvWithScore` returns an optional "score" statistic alongside result documents.-Uses docValues structures if available, but falls back to the field cache when necessary.+`dvWithScore`::: Returns an optional "score" statistic alongside result documents.+It uses docValues structures if available, but falls back to the field cache when necessary.The first access to the field cache slows down the initial requests following a commit and takes up additional space on the JVM heap, so docValues are recommended in most situations.Performance scales linearly with the number of values matched in the "from" field.This method must be used if score information is required, and should also be considered when the "from" query matches few documents, regardless of the number of "to" side documents returned.@@ -100,9 +127,9 @@ This method must be used if score information is required, and should also be coThe `dvWithScore` method doesn't support single value numeric fields.Users migrating from versions prior to 7.0 are encouraged to change field types to string and rebuild indexes during migration.====-+-`topLevelDV` can only be used when `to` and `from` fields have docValues data, and does not currently support numeric fields.-Uses top-level docValues data structures to find results.++`topLevelDV`::: Can only be used when `to` and `from` fields have docValues data, and does not currently support numeric fields.+It uses top-level docValues data structures to find results.These data structures outperform other methods as the number of values matched in the `from` field grows high.But they are also expensive to build and need to be lazily populated after each commit, causing a sometimes-noticeable slowdown on the first query to use them after each commit.If you commit frequently and your use-case can tolerate a static warming query, consider adding one to `solrconfig.xml` so that this work is done as a part of the commit itself and not attached directly to user requests.@@ -163,23 +190,24 @@ For more information, Erick Erickson has written a blog post about join performa== Cross Collection JoinThe Cross Collection Join Filter is a method for the join parser that will execute a query against a remote Solr collection to get back a set of join keys that will be used to as a filter query against the local Solr collection.-The crossCollection join query will create an CrossCollectionQuery object.-The CrossCollectionQuery will first query a remote Solr collection and get back a streaming expression result of the join keys.+The cross collection join query will create an `CrossCollectionQuery` object.+The `CrossCollectionQuery` will first query a remote Solr collection and get back a streaming expression result of the join keys.As the join keys are streamed to the node, a bitset of the matching documents in the local index is built up.This avoids keeping the full set of join keys in memory at any given time.This bitset is then inserted into the filter cache upon successful execution as with the normal behavior of the Solr filter cache.-If the local index is sharded according to the join key field, the cross collection join can leverage a secondary query parser called the "hash_range" query parser.-The hash_range query parser is responsible for returning only the documents that hash to a given range of values.-This allows the CrossCollectionQuery to query the remote Solr collection and return only the join keys that would match a specific shard in the local Solr collection.+If the local index is sharded according to the join key field, the cross collection join can leverage a secondary query parser called the <<other-parsers.adoc#hash-range-query-parser,Hash Range Query Parser>>.+The hash range query parser is responsible for returning only the documents that hash to a given range of values.+This allows the `CrossCollectionQuery` to query the remote Solr collection and return only the join keys that would match a specific shard in the local Solr collection.This has the benefit of making sure that network traffic doesn't increase as the number of shards increases and allows for much greater scalability.-The CrossCollection join query works with both String and Point types of fields.+The cross collection join query works with both string and point types of fields.The fields that are being used for the join key must be single-valued and have docValues enabled.It's advised to shard the local collection by the join key as this allows for the optimization mentioned above to be utilized.-The cross collection join queries should not be generally used as part of the `q` parameter, but rather it is designed to be used as a filter query (`fq` parameter) to ensure proper caching.+Cross collection join queries should not generally be used as part of the `q` parameter.+It is designed to be used as a filter query (`fq` parameter) to ensure proper caching.The remote Solr collection that is being queried should have a single-valued field for the join key with docValues enabled.@@ -187,15 +215,27 @@ The remote Solr collection does not have any specific sharding requirements.=== Join Query Parser Definition in solrconfig.xml-The cross collection join has some configuration options that can be specified in `solrconfig.xml`.+The cross collection join has some configuration options that can be specified in `solrconfig.xml`.`routerField`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++If the documents are routed to shards using the CompositeID router by the join field, then that field name should be specified in the configuration here.- This will allow the parser to optimize the resulting HashRange query.+This will allow the parser to optimize the resulting HashRange query.-`solrUrl`::-If specified, this array of strings specifies the white listed Solr URLs that you can pass to the solrUrl query parameter.-Without this configuration the solrUrl parameter cannot be used.+`allowSolrUrls`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++If specified, this array of strings specifies allow-listed Solr URLs that can be passed to the `solrUrl` query parameter.+Without this configuration the `solrUrl` parameter cannot be used.This restriction is necessary to prevent an attacker from using Solr to explore the network.[source,xml]@@ -211,37 +251,83 @@ This restriction is necessary to prevent an attacker from using Solr to explore=== Cross Collection Join Query Parameters`fromIndex`::-The name of the external Solr collection to be queried to retrieve the set of join key values (required).+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The name of the external Solr collection to be queried to retrieve the set of join key values.`zkHost`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The connection string to be used to connect to ZooKeeper.`zkHost` and `solrUrl` are both optional parameters, and at most one of them should be specified.If neither `zkHost` nor `solrUrl` are specified, the local ZooKeeper cluster will be used.-(optional).`solrUrl`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The URL of the external Solr node to be queried.-Must be a character for character exact match of a whitelisted url.-(optional, disabled by default for security).+Must be a character-for-character exact match of a allow-listed URL that is listed in the `allowSolrUrls` parameter in `solrconfig.xml`.+If the URL does not match, this parameter will be effectively disabled.`from`::-The join key field name in the external collection (required).+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The join key field name in the external collection.`to`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The join key field name in the local collection.`v`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The query substituted in as a local param.This is the query string that will match documents in the remote collection.`routed`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, the cross collection join query will use each shard's hash range to determine the set of join keys to retrieve for that shard.This parameter improves the performance of the cross-collection join, but it depends on the local collection being routed by the `to` field.If this parameter is not specified, the cross collection join query will try to determine the correct value automatically.`ttl`::+++[%autowidth,frame=none]+|===+|Optional |Default: `3600` seconds+|===++The length of time that a cross collection join query in the cache will be considered valid, in seconds.-Defaults to `3600` (one hour).The cross collection join query will not be aware of changes to the remote collection, so if the remote collection is updated, cached cross collection queries may give inaccurate results.After the `ttl` period has expired, the cross collection join query will re-execute the join against the remote collection.diff --git a/solr/solr-ref-guide/src/language-analysis.adoc b/solr/solr-ref-guide/src/language-analysis.adocindex 71f38cf1227..06da7acbd6d 100644--- a/solr/solr-ref-guide/src/language-analysis.adoc+++ b/solr/solr-ref-guide/src/language-analysis.adoc@@ -176,18 +176,53 @@ Compound words are most commonly found in Germanic languages.*Arguments:*-`dictionary`:: (required) The path of a file that contains a list of simple words, one per line.+`dictionary`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The path of a file that contains a list of simple words, one per line.Blank lines and lines that begin with "`#`" are ignored.+See <<resource-loading.adoc#,Resource Loading>> for more information.-`minWordSize`:: (integer, default 5) Any token shorter than this is not decompounded.+`minWordSize`::+++[%autowidth,frame=none]+|===+|Optional |Default: `5`+|===+++Any token shorter than this is not decompounded.-`minSubwordSize`:: (integer, default 2) Subwords shorter than this are not emitted as tokens.+`minSubwordSize`::+++[%autowidth,frame=none]+|===+|Optional |Default: `2`+|===+++Subwords shorter than this are not emitted as tokens.-`maxSubwordSize`:: (integer, default 15) Subwords longer than this are not emitted as tokens.+`maxSubwordSize`::+++[%autowidth,frame=none]+|===+|Optional |Default: `15`+|===+++Subwords longer than this are not emitted as tokens.-`onlyLongestMatch`:: (true/false) If true (the default), only the longest matching subwords will generate new tokens.+`onlyLongestMatch`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++If `true`, only the longest matching subwords will generate new tokens.*Example:*@@ -239,48 +274,123 @@ See `solr/contrib/analysis-extras/README.md` for instructions on which jars you`solr.ICUCollationField` and `solr.CollationField` fields can be created in two ways:-* Based upon a system collator associated with a Locale.+* Based upon a system collator associated with a locale.* Based upon a tailored `RuleBasedCollator` ruleset.-*Arguments for `solr.ICUCollationField`, specified as attributes within the `<fieldtype>` element:*+=== ICUCollationField Attributes-Using a System collator:+*Using a system collator*-`locale`:: (required) http://www.rfc-editor.org/rfc/rfc3066.txt[RFC 3066] locale ID.+`locale`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++http://www.rfc-editor.org/rfc/rfc3066.txt[RFC 3066] locale ID.See http://demo.icu-project.org/icu-bin/locexp[the ICU locale explorer] for a list of supported locales.-`strength`:: Valid values are `primary`, `secondary`, `tertiary`, `quaternary`, or `identical`.+`strength`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Valid values are `primary`, `secondary`, `tertiary`, `quaternary`, or `identical`.See http://userguide.icu-project.org/collation/concepts#TOC-Comparison-Levels[Comparison Levels in ICU Collation Concepts] for more information.-`decomposition`:: Valid values are `no` or `canonical`.+`decomposition`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Valid values are `no` or `canonical`.See http://userguide.icu-project.org/collation/concepts#TOC-Normalization[Normalization in ICU Collation Concepts] for more information.-Using a Tailored ruleset:+*Using a Tailored ruleset*-`custom`:: (required) Path to a UTF-8 text file containing rules supported by the ICU http://icu-project.org/apiref/icu4j/com/ibm/icu/text/RuleBasedCollator.html[`RuleBasedCollator`]+`custom`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++Path to a UTF-8 text file containing rules supported by the ICU http://icu-project.org/apiref/icu4j/com/ibm/icu/text/RuleBasedCollator.html[`RuleBasedCollator`]-`strength`:: Valid values are `primary`, `secondary`, `tertiary`, `quaternary`, or `identical`.+`strength`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Valid values are `primary`, `secondary`, `tertiary`, `quaternary`, or `identical`.See http://userguide.icu-project.org/collation/concepts#TOC-Comparison-Levels[Comparison Levels in ICU Collation Concepts] for more information.-`decomposition`:: Valid values are `no` or `canonical`.+`decomposition`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Valid values are `no` or `canonical`.See http://userguide.icu-project.org/collation/concepts#TOC-Normalization[Normalization in ICU Collation Concepts] for more information.-Expert options:+*Expert options*-`alternate`:: Valid values are `shifted` or `non-ignorable`.-Can be used to ignore punctuation/whitespace.+`alternate`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Valid values are `shifted` or `non-ignorable`.+Can be used to ignore punctuation or whitespace.-`caseLevel`:: (true/false) If true, in combination with `strength="primary"`, accents are ignored but case is taken into account.-The default is `false`.+`caseLevel`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===+++If `true`, in combination with `strength="primary"`, accents are ignored but case is taken into account.See http://userguide.icu-project.org/collation/concepts#TOC-CaseLevel[CaseLevel in ICU Collation Concepts] for more information.-`caseFirst`:: Valid values are `lower` or `upper`.+`caseFirst`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Valid values are `lower` or `upper`.Useful to control which is sorted first when case is not ignored.-`numeric`:: (true/false) If true, digits are sorted according to numeric value, e.g., foobar-9 sorts before foobar-10.-The default is false.+`numeric`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===+++If `true`, digits are sorted according to numeric value, e.g., foobar-9 sorts before foobar-10.-`variableTop`:: Single character or contraction.+`variableTop`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Single character or contraction.Controls what is variable for `alternate`.=== Sorting Text for a Specific Language@@ -399,30 +509,86 @@ As mentioned above, ICU Unicode Collation is better in several ways than JDK ColThe principles of JDK Collation are the same as those of ICU Collation; you just specify `language`, `country` and `variant` arguments instead of the combined `locale` argument.-*Arguments for `solr.CollationField`, specified as attributes within the `<fieldtype>` element:*+=== JDK Collation Attributes-Using a System collator (see http://www.oracle.com/technetwork/java/javase/java8locales-2095355.html[Oracle's list of locales supported in Java]):+*Using a System collator* (see http://www.oracle.com/technetwork/java/javase/java8locales-2095355.html[Oracle's list of locales supported in Java]):-`language`:: (required) http://www.loc.gov/standards/iso639-2/php/code_list.php[ISO-639] language code+`language`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The http://www.loc.gov/standards/iso639-2/php/code_list.php[ISO-639] language code.-`country`:: http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm[ISO-3166] country code+`country`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++The http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm[ISO-3166] country code.-`variant`:: Vendor or browser-specific code+`variant`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Vendor or browser-specific code.-`strength`:: Valid values are `primary`, `secondary`, `tertiary` or `identical`.+`strength`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Valid values are `primary`, `secondary`, `tertiary` or `identical`.See {java-javadocs}java/text/Collator.html[Java Collator javadocs] for more information.-`decomposition`:: Valid values are `no`, `canonical`, or `full`.+`decomposition`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Valid values are `no`, `canonical`, or `full`.See {java-javadocs}java/text/Collator.html[Java Collator javadocs] for more information.-Using a Tailored ruleset:+*Using a Tailored ruleset*:-`custom`:: (required) Path to a UTF-8 text file containing rules supported by the {java-javadocs}java/text/RuleBasedCollator.html[`JDK RuleBasedCollator`]+`custom`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++Path to a UTF-8 text file containing rules supported by the {java-javadocs}java/text/RuleBasedCollator.html[`JDK RuleBasedCollator`].-`strength`:: Valid values are `primary`, `secondary`, `tertiary` or `identical`.+`strength`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Valid values are `primary`, `secondary`, `tertiary` or `identical`.See {java-javadocs}java/text/Collator.html[Java Collator javadocs] for more information.-`decomposition`:: Valid values are `no`, `canonical`, or `full`.+`decomposition`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Valid values are `no`, `canonical`, or `full`.See {java-javadocs}java/text/Collator.html[Java Collator javadocs] for more information..A `solr.CollationField` example:@@ -528,9 +694,12 @@ On the other hand, it can reduce precision because language-specific character d== OpenNLP IntegrationThe `lucene/analysis/opennlp` module provides OpenNLP integration via several analysis components: a tokenizer, a part-of-speech tagging filter, a phrase chunking filter, and a lemmatization filter.-In addition to these analysis components, Solr also provides an update request processor to extract named entities - see <<update-request-processors.adoc#update-processor-factories-that-can-be-loaded-as-plugins,Update Processor Factories That Can Be Loaded as Plugins>>.+In addition to these analysis components, Solr also provides an update request processor to extract named entities.+See also <<update-request-processors.adoc#update-processor-factories-that-can-be-loaded-as-plugins,Update Processor Factories That Can Be Loaded as Plugins>>.-NOTE: The <<OpenNLP Tokenizer>> must be used with all other OpenNLP analysis components, for two reasons: first, the OpenNLP Tokenizer detects and marks the sentence boundaries required by all the OpenNLP filters; and second, since the pre-trained OpenNLP models used by these filters were trained using the corresponding language-specific sentence-detection/tokenization models, the same tokenization, using the same models, must be used at runtime for optimal performance.+NOTE: The <<OpenNLP Tokenizer>> must be used with all other OpenNLP analysis components, for two reasons.+First, the OpenNLP Tokenizer detects and marks the sentence boundaries required by all the OpenNLP filters.+Second, since the pre-trained OpenNLP models used by these filters were trained using the corresponding language-specific sentence-detection/tokenization models, the same tokenization using the same models must be used at runtime for optimal performance.To use the OpenNLP components, you must add additional .jars to Solr's classpath (as described in the section <<solr-plugins.adoc#installing-plugins,Solr Plugins>>).See `solr/contrib/analysis-extras/README.md` for instructions on which jars you need to add.@@ -545,10 +714,24 @@ See the http://opennlp.apache.org/models.html[OpenNLP website] for information o*Arguments:*-`sentenceModel`:: (required) The path of a language-specific OpenNLP sentence detection model file.+`sentenceModel`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The path of a language-specific OpenNLP sentence detection model file.See <<resource-loading.adoc#,Resource Loading>> for more information.-`tokenizerModel`:: (required) The path of a language-specific OpenNLP tokenization model file.+`tokenizerModel`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The path of a language-specific OpenNLP tokenization model file.See <<resource-loading.adoc#,Resource Loading>> for more information.*Example:*@@ -592,7 +775,14 @@ NOTE: Lucene currently does not index token types, so if you want to keep this i*Arguments:*-`posTaggerModel`:: (required) The path of a language-specific OpenNLP POS tagger model file.+`posTaggerModel`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The path of a language-specific OpenNLP POS tagger model file.See <<resource-loading.adoc#,Resource Loading>> for more information.*Examples:*@@ -690,7 +880,14 @@ NOTE: Lucene currently does not index token types, so if you want to keep this i*Arguments:*-`chunkerModel`:: (required) The path of a language-specific OpenNLP phrase chunker model file.+`chunkerModel`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The path of a language-specific OpenNLP phrase chunker model file.See <<resource-loading.adoc#,Resource Loading>> for more information.*Examples*:@@ -758,11 +955,25 @@ See the http://opennlp.apache.org/models.html[OpenNLP website] for information oEither `dictionary` or `lemmatizerModel` must be provided, and both may be provided - see the examples below:-`dictionary`:: (optional) The path of a lemmatization dictionary file.+`dictionary`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++The path of a lemmatization dictionary file.See <<resource-loading.adoc#,Resource Loading>> for more information.The dictionary file must be encoded as UTF-8, with one entry per line, in the form `word[tab]lemma[tab]part-of-speech`, e.g., `wrote[tab]write[tab]VBD`.-`lemmatizerModel`:: (optional) The path of a language-specific OpenNLP lemmatizer model file.+`lemmatizerModel`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++The path of a language-specific OpenNLP lemmatizer model file.See <<resource-loading.adoc#,Resource Loading>> for more information.*Examples:*@@ -842,43 +1053,47 @@ Perform model-based lemmatization only, preserving the original token and emittiThese factories are each designed to work with specific languages.The languages covered here are:-* <<Arabic>>-* <<Bengali>>-* <<Brazilian Portuguese>>-* <<Bulgarian>>-* <<Catalan>>-* <<Traditional Chinese>>-* <<Simplified Chinese>>-* <<Czech>>-* <<Danish>>--* <<Dutch>>-* <<Estonian>>-* <<Finnish>>-* <<French>>-* <<Galician>>-* <<German>>-* <<Greek>>-* <<hebrew-lao-myanmar-khmer,Hebrew, Lao, Myanmar, Khmer>>-* <<Hindi>>-* <<Indonesian>>-* <<Italian>>-* <<Irish>>-* <<Japanese>>-* <<Latvian>>-* <<Norwegian>>-* <<Persian>>-* <<Polish>>-* <<Portuguese>>-* <<Romanian>>-* <<Russian>>-* <<Scandinavian>>-* <<Serbian>>-* <<Spanish>>-* <<Swedish>>-* <<Thai>>-* <<Turkish>>-* <<Ukrainian>>+// Table form allows spread of list across the page+// Only 3 columns so it still looks OK on smaller screens+[cols="1,1,1",frame=none,grid=none,stripes=none]+|===+| <<Arabic>>+| <<Bengali>>+| <<Brazilian Portuguese>>+| <<Bulgarian>>+| <<Catalan>>+| <<Traditional Chinese>>+| <<Simplified Chinese>>+| <<Czech>>+| <<Danish>>+| <<Dutch>>+| <<Estonian>>+| <<Finnish>>+| <<French>>+| <<Galician>>+| <<German>>+| <<Greek>>+| <<hebrew-lao-myanmar-khmer,Hebrew, Lao, Myanmar, Khmer>>+| <<Hindi>>+| <<Indonesian>>+| <<Italian>>+| <<Irish>>+| <<Japanese>>+| <<Latvian>>+| <<Norwegian>>+| <<Persian>>+| <<Polish>>+| <<Portuguese>>+| <<Romanian>>+| <<Russian>>+| <<Scandinavian>>+| <<Serbian>>+| <<Spanish>>+| <<Swedish>>+| <<Thai>>+| <<Turkish>>+| <<Ukrainian>>+|====== Arabic@@ -1055,7 +1270,14 @@ Solr includes a set of contractions for Catalan, which can be stripped using `so*Arguments:*-`language`:: (required) stemmer language, "Catalan" in this case+`language`:+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The stemmer language, `Catalan` in this case.*Example:*@@ -1164,20 +1386,50 @@ In all cases, all non-CJK input is passed through unmodified.*Arguments:*-`han`:: (true/false) If false, Han (Chinese) characters will not form bigrams.-Default is true.+`han`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++If `false`, Han (Chinese) characters will not form bigrams.-`hiragana`:: (true/false) If false, Hiragana (Japanese) characters will not form bigrams.-Default is true.+`hiragana`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++If `false`, Hiragana (Japanese) characters will not form bigrams.-`katakana`:: (true/false) If false, Katakana (Japanese) characters will not form bigrams.-Default is true.+`katakana`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++If `false`, Katakana (Japanese) characters will not form bigrams.-`hangul`:: (true/false) If false, Hangul (Korean) characters will not form bigrams.-Default is true.+`hangul`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++If `false`, Hangul (Korean) characters will not form bigrams.-`outputUnigrams`:: (true/false) If true, in addition to forming bigrams, all characters are also passed through as unigrams.-Default is false.+`outputUnigrams`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===+++If `true`, in addition to forming bigrams, all characters are also passed through as unigrams.See the example under <<Traditional Chinese>>.@@ -1317,7 +1569,14 @@ Also relevant are the <<Scandinavian,Scandinavian normalization filters>>.*Arguments:*-`language`:: (required) stemmer language, "Danish" in this case+`language`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The stemmer language, `Danish` in this case.*Example:*@@ -1363,7 +1622,14 @@ Solr can stem Dutch using the Snowball Porter Stemmer with an argument of `langu*Arguments:*-`language`:: (required) stemmer language, "Dutch" in this case+`language`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The stemmer language, `Dutch` in this case.*Example:*@@ -1409,7 +1675,14 @@ Solr can stem Estonian using the Snowball Porter Stemmer with an argument of `la*Arguments:*-`language`:: (required) stemmer language, "Estonian" in this case+`language`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The stemmer language, `Estonian` in this case.*Example:*@@ -1501,13 +1774,27 @@ This filter can be useful for languages such as French, Catalan, Italian, and Ir*Arguments:*-`articles`:: The pathname of a file that contains a list of articles, one per line, to be stripped.+`articles`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++The pathname of a file that contains a list of articles, one per line, to be stripped.Articles are words such as "le", which are commonly abbreviated, such as in _l'avion_ (the plane).This file should include the abbreviated form, which precedes the apostrophe.-In this case, simply "_l_". If no `articles` attribute is specified, a default set of French articles is used.+In this case, simply "_l_".+If no `articles` attribute is specified, a default set of French articles is used.-`ignoreCase`:: (boolean) If true, the filter ignores the case of words when comparing them to the common word file.-Defaults to `false`+`ignoreCase`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===+++If `true`, the filter ignores the case of words when comparing them to the common word file.*Example:*@@ -1875,7 +2162,14 @@ Solr also includes a set of contractions for Irish which can be stripped using `*Arguments:*-`language`:: (required) stemmer language, "Irish" in this case+`language`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The stemmer language, `Irish` in this case.*Example:*@@ -1940,9 +2234,23 @@ Vertical iteration marks are not supported.*Arguments:*-`normalizeKanji`:: set to `false` to not normalize kanji iteration marks (default is `true`)+`normalizeKanji`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++Set to `false` to not normalize kanji iteration marks.-`normalizeKana`:: set to `false` to not normalize kana iteration marks (default is `true`)+`normalizeKana`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++Set to `false` to not normalize kana iteration marks.==== Japanese Tokenizer@@ -1954,7 +2262,14 @@ Tokenizer for Japanese that uses morphological analysis, and annotates each term*Arguments:*-`mode`:: Use `search` mode to get a noun-decompounding effect useful for search.+`mode`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Use `search` mode to get a noun-decompounding effect useful for search.`search` mode improves segmentation for search at the expense of part-of-speech accuracy.Valid values for `mode` are:+@@ -1964,14 +2279,42 @@ Valid values for `mode` are:+For some applications it might be good to use `search` mode for indexing and `normal` mode for queries to increase precision and prevent parts of compounds from being matched and highlighted.-`userDictionary`:: filename for a user dictionary, which allows overriding the statistical model with your own entries for segmentation, part-of-speech tags and readings without a need to specify weights.+`userDictionary`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Filename for a user dictionary, which allows overriding the statistical model with your own entries for segmentation, part-of-speech tags and readings without a need to specify weights.See `lang/userdict_ja.txt` for a sample user dictionary file.-`userDictionaryEncoding`:: user dictionary encoding (default is UTF-8)+`userDictionaryEncoding`::+++[%autowidth,frame=none]+|===+|Optional |Default: `UTF-8`+|===+++User dictionary encoding.-`discardPunctuation`:: set to `false` to keep punctuation, `true` to discard (the default)+`discardPunctuation`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++Set to `false` to keep punctuation, `true` to discard.-`discardCompoundToken`:: set to `false` to keep original compound tokens with the `search` mode, `true` to discard.+`discardCompoundToken`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Set to `false` to keep original compound tokens with the `search` mode, `true` to discard.==== Japanese Base Form Filter@@ -1980,7 +2323,7 @@ Replaces original terms' text with the corresponding base form (lemma).*Factory class:* `JapaneseBaseFormFilterFactory`-(no arguments)+*Arguments:* None==== Japanese Part Of Speech Stop Filter@@ -1991,10 +2334,15 @@ Removes terms with one of the configured parts-of-speech.*Arguments:*-`tags`:: filename for a list of parts-of-speech for which to remove terms; see `conf/lang/stoptags_ja.txt` in the `sample_techproducts_config` <<config-sets.adoc#,configset>> for an example.--`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.*+`tags`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Filename for a list of parts-of-speech for which to remove terms.+See `conf/lang/stoptags_ja.txt` in the `sample_techproducts_config` <<config-sets.adoc#,configset>> for an example.==== Japanese Katakana Stem Filter@@ -2006,8 +2354,15 @@ Normalizes common katakana spelling variations ending in a long sound character*Arguments:*-`minimumLength`:: terms below this length will not be stemmed.-Default is 4, value must be 2 or more.+`minimumLength`::+++[%autowidth,frame=none]+|===+|Optional |Default: `4`+|===+++Terms below this length will not be stemmed.+Value must be `2` or more.==== CJK Width Filter@@ -2015,7 +2370,7 @@ Folds fullwidth ASCII variants into the equivalent Basic Latin forms, and folds*Factory class:* `CJKWidthFilterFactory`-(no arguments)+*Arguments:* NoneExample:@@ -2154,10 +2509,17 @@ Consider this example:*Arguments:*-`variant`:: Choose the Norwegian language variant to use.+`variant`::+++[%autowidth,frame=none]+|===+|Optional |Default: `nb`+|===+++The Norwegian language variant to use.Valid values are:+-* `nb:` Bokmål (default)+* `nb:` Bokmål* `nn:` Nynorsk* `no:` both@@ -2211,10 +2573,17 @@ The `NorwegianMinimalStemFilterFactory` stems plural forms of Norwegian nouns on*Arguments:*-`variant`:: Choose the Norwegian language variant to use.+`variant`::+++[%autowidth,frame=none]+|===+|Optional |Default: `nb`+|===+++The Norwegian language variant to use.Valid values are:+-* `nb:` Bokmål (default)+* `nb:` Bokmål* `nn:` Nynorsk* `no:` both@@ -2458,7 +2827,14 @@ Solr can stem Romanian using the Snowball Porter Stemmer with an argument of `la*Arguments:*-`language`:: (required) stemmer language, "Romanian" in this case+`language`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The stemmer language, `Romanian` in this case.*Example:*@@ -2632,10 +3008,17 @@ For user tips & advice on using this filter, see https://cwiki.apache.org/conflu*Arguments:*-`haircut`:: Select the extend of normalization.+`haircut`::+++[%autowidth,frame=none]+|===+|Optional |Default: `bald`+|===+++Select the extend of normalization.Valid values are:+-* `bald`: (Default behavior) Cyrillic characters are first converted to Latin; then, Latin characters have their diacritics removed, with the exception of https://en.wikipedia.org/wiki/D_with_stroke[LATIN SMALL LETTER D WITH STROKE] (U+0111) which is converted to "```dj```"+* `bald`: Cyrillic characters are first converted to Latin; then, Latin characters have their diacritics removed, with the exception of https://en.wikipedia.org/wiki/D_with_stroke[LATIN SMALL LETTER D WITH STROKE] (U+0111) which is converted to "```dj```"* `regular`: Only Cyrillic to Latin normalization will be applied, preserving the Latin diatrics*Example:*@@ -2867,7 +3250,15 @@ Lucene also includes an example Ukrainian stopword list, in the `lucene-analyzer*Arguments:*-`dictionary`:: (required) lemmatizer dictionary - the `lucene-analyzers-morfologik` jar contains a Ukrainian dictionary at `org/apache/lucene/analysis/uk/ukrainian.dict`.+`dictionary`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The path to a lemmatizer dictionary.+The `lucene-analyzers-morfologik` jar contains a Ukrainian dictionary at `org/apache/lucene/analysis/uk/ukrainian.dict`.*Example:*diff --git a/solr/solr-ref-guide/src/language-detection.adoc b/solr/solr-ref-guide/src/language-detection.adocindex 70ba97def08..60ab7bf1b9c 100644--- a/solr/solr-ref-guide/src/language-detection.adoc+++ b/solr/solr-ref-guide/src/language-detection.adoc@@ -83,9 +83,15 @@ Here is an example of a minimal OpenNLP `langid` configuration in `solrconfig.xm==== OpenNLP-specific Parameters`langid.model`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++An OpenNLP language detection model.+-The OpenNLP project provides a pre-trained 103 language model on the http://opennlp.apache.org/models.html[OpenNLP site's model dowload page]. Model training instructions are provided on the http://opennlp.apache.org/docs/{ivy-opennlp-version}/manual/opennlp.html#tools.langdetect[OpenNLP website]. This parameter is required.+The OpenNLP project provides a pre-trained 103 language model on the http://opennlp.apache.org/models.html[OpenNLP site's model dowload page]. Model training instructions are provided on the http://opennlp.apache.org/docs/{ivy-opennlp-version}/manual/opennlp.html#tools.langdetect[OpenNLP website].+See <<resource-loading.adoc#,Resource Loading>> for information on where to put the model.@@ -98,25 +104,58 @@ See <<resource-loading.adoc#,Resource Loading>> for information on where to putAs previously mentioned, both implementations of the `langid` UpdateRequestProcessor take the same parameters.`langid`::-When `true`, the default, enables language detection.+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++When `true`, enables language detection.`langid.fl`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++A comma- or space-delimited list of fields to be processed by `langid`.-This parameter is required.`langid.langField`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++Specifies the field for the returned language code.-This parameter is required.`langid.langsField`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Specifies the field for a list of returned language codes.If you use `langid.map.individual`, each detected language will be added to this field.`langid.overwrite`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++Specifies whether the content of the `langField` and `langsField` fields will be overwritten if they already contain values.-The default is `false`.`langid.lcmap`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A space-separated list specifying colon delimited language code mappings to apply to the detected languages.+For example, you might use this to map Chinese, Japanese, and Korean to a common `cjk` code, and map both American and British English to a single `en` code by using `langid.lcmap=ja:cjk zh:cjk ko:cjk en_GB:en en_US:en`.@@ -124,46 +163,101 @@ For example, you might use this to map Chinese, Japanese, and Korean to a commonThis affects both the values put into the `langField` and `langsField` fields, as well as the field suffixes when using `langid.map`, unless overridden by `langid.map.lcmap`.`langid.threshold`::+++[%autowidth,frame=none]+|===+|Optional |Default: `0.5`+|===++Specifies a threshold value between 0 and 1 that the language identification score must reach before `langid` accepts it.+With longer text fields, a high threshold such as `0.8` will give good results.For shorter text fields, you may need to lower the threshold for language identification, though you will be risking somewhat lower quality results.We recommend experimenting with your data to tune your results.-+-The default is `0.5`.`langid.allowlist`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Specifies a list of allowed language identification codes.Use this in combination with `langid.map` to ensure that you only index documents into fields that are in your schema.`langid.map`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++Enables field name mapping.If `true`, Solr will map field names for all fields listed in `langid.fl`.-The default is `false`.`langid.map.fl`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A comma-separated list of fields for `langid.map` that is different than the fields specified in `langid.fl`.`langid.map.keepOrig`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, Solr will copy the field during the field name mapping process, leaving the original field in place.-The default is `false`.`langid.map.individual`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, Solr will detect and map languages for each field individually.-The default is `false`.`langid.map.individual.fl`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A comma-separated list of fields for use with `langid.map.individual` that is different than the fields specified in `langid.fl`.`langid.fallback`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Specifies a language code to use if no language is detected or specified in `langid.fallbackFields`.`langid.fallbackFields`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++If no language is detected that meets the `langid.threshold` score, or if the detected language is not on the `langid.allowlist`, this field specifies language codes to be used as fallback values.+If no appropriate fallback languages are found, Solr will use the language code specified in `langid.fallback`.`langid.map.lcmap`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A space-separated list specifying colon-delimited language code mappings to use when mapping field names.+For example, you might use this to make Chinese, Japanese, and Korean language fields use a common `*_cjk` suffix, and map both American and British English fields to a single `*_en` by using `langid.map.lcmap=ja:cjk zh:cjk ko:cjk en_GB:en en_US:en`.@@ -171,14 +265,31 @@ For example, you might use this to make Chinese, Japanese, and Korean language fA list defined with this parameter will override any configuration set with `langid.lcmap`.`langid.map.pattern`::-By default, fields are mapped as <field>_<language>. To change this pattern, you can specify a Java regular expression in this parameter.+++[%autowidth,frame=none]+|===+|Optional |Default: `<field>_<language>`+|===+++By default, fields are mapped as `<field>_<language>`.+To change this pattern, you can specify a Java regular expression in this parameter.`langid.map.replace`::+++[%autowidth,frame=none]+|===+|Optional |Default: `<field>_<language>`+|===++By default, fields are mapped as `<field>_<language>`.To change this pattern, you can specify a Java replace in this parameter.`langid.enforceSchema`::-If `false`, the `langid` processor does not validate field names against your schema.-This may be useful if you plan to rename or delete fields later in the UpdateChain.+-The default is `true`.+[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++If `false`, the `langid` processor does not validate field names against your schema.+This may be useful if you plan to rename or delete fields later in the update chain.diff --git a/solr/solr-ref-guide/src/luke-request-handler.adoc b/solr/solr-ref-guide/src/luke-request-handler.adocindex f3a2aa396a0..7d3734b1eb9 100644--- a/solr/solr-ref-guide/src/luke-request-handler.adoc+++ b/solr/solr-ref-guide/src/luke-request-handler.adoc@@ -17,36 +17,71 @@// under the License.The Luke Request Handler offers programmatic access to the information provided on the <<schema-browser-screen#schema-browser-screen,Schema Browser>> page of the Admin UI.-It is modeled after the Luke, the Lucene Index Browser by Andrzej Bialecki.-It is an implicit handler, so you don't need to define it.+It is modeled after Luke, the Lucene Index Browser by Andrzej Bialecki.+It is an implicit handler, so you don't need to define it in `solrconfig.xml`.The Luke Request Handler accepts the following parameters:`show`::+++[%autowidth,frame=none]+|===+|Optional |Default: `all`+|===++The data about the index to include in the response.Options are `schema`, `index`, `doc`, `all`.-* `index` describes the high level details about the index.+* `all` returns all fields and high level details about the index.+* `index` returns the high level details about the index without all fields.* `schema` returns details about the `schema` plus the `index` data.* `doc` works in conjunction with `docId` or `id` parameters and returns details about a specific document plus the `index` data.`id`::-Get a document using the uniqueKeyField specified in schema.xml.+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Get a document using the `uniqueKeyField` specified in the schema.`docId`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Get a document using a Lucene documentID.`fl`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Limit the returned values to a set of fields.This is useful if you want to increase the `numTerms` and don't want a massive response.`numTerms`::-How many top terms for each field.-The default is `10`.+++[%autowidth,frame=none]+|===+|Optional |Default: `10`+|===+++The number of top terms for each field.`includeIndexFieldFlags`::-Choose whether /luke should return the index-flags for each field.-Fetching and returning the index-flags for each field in the index has non-zero cost, and can slow down requests to /luke.-+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++Choose whether `/luke` should return the index-flags for each field.+Fetching and returning the index-flags for each field in the index has non-zero cost, and can slow down requests to `/luke`.== LukeRequestHandler Examplesdiff --git a/solr/solr-ref-guide/src/mbean-request-handler.adoc b/solr/solr-ref-guide/src/mbean-request-handler.adocindex 16cc14af771..a2f9945c6c1 100644--- a/solr/solr-ref-guide/src/mbean-request-handler.adoc+++ b/solr/solr-ref-guide/src/mbean-request-handler.adoc@@ -21,19 +21,43 @@ The MBean Request Handler offers programmatic access to the information providedThe MBean Request Handler accepts the following parameters:`key`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Restricts results by object key.`cat`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Restricts results by category name.`stats`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++Specifies whether statistics are returned with results.You can override the `stats` parameter on a per-field basis.The default is `false`.`wt`::+++[%autowidth,frame=none]+|===+|Optional |Default: `json`+|===++The output format.-This operates the same as the <<response-writers.adoc#,`wt` parameter in a query>>. The default is `json`.+This operates the same as the <<response-writers.adoc#,`wt` parameter in a query>>.== MBeanRequestHandler Examplesdiff --git a/solr/solr-ref-guide/src/metrics-reporting.adoc b/solr/solr-ref-guide/src/metrics-reporting.adocindex 33789e92cf1..8854be7ad7b 100644--- a/solr/solr-ref-guide/src/metrics-reporting.adoc+++ b/solr/solr-ref-guide/src/metrics-reporting.adoc@@ -152,30 +152,70 @@ The `<metrics><suppliers>` section of `solr.xml` allows you to define your own iImplementation of a custom metrics supplier is beyond the scope of this guide, but there are other customizations possible with the default implementation, via the elements described below.-<counter>:: This element defines the implementation and configuration of a `Counter` supplier.+`<counter>`::+This element defines the implementation and configuration of a `Counter` supplier.The default implementation does not support any configuration.-<meter>:: This element defines the implementation of a `Meter` supplier.+`<meter>`::+This element defines the implementation of a `Meter` supplier.The default implementation supports an additional parameter:-`<str name="clock">`::: The type of clock to use for calculating EWMA rates.++`<str name="clock">`:::+++[%autowidth,frame=none]+|===+|Optional |Default: `user`+|===+++The type of clock to use for calculating EWMA rates.The supported values are:-* `user`, the default, which uses `System.nanoTime()`+* `user`, which uses `System.nanoTime()`* `cpu`, which uses the current thread's CPU time-<histogram>:: This element defines the implementation of a `Histogram` supplier.+`<histogram>`::+This element defines the implementation of a `Histogram` supplier.This element also supports the `clock` parameter shown above with the `meter` element, and also:-`<str name="reservoir">`::: The fully-qualified class name of the `Reservoir` implementation to use.++`<str name="reservoir">`:::+++[%autowidth,frame=none]+|===+|Optional |Default: `com.codahale.metrics.ExponentiallyDecayingReservoir`+|===+++The fully-qualified class name of the `Reservoir` implementation to use.The default is `com.codahale.metrics.ExponentiallyDecayingReservoir` but there are other options available with the http://metrics.dropwizard.io/{ivy-dropwizard-version}/manual/core.html#histograms[Codahale Metrics library] that Solr uses.-The following parameters are supported, within the mentioned limitations:-* `size`, the reservoir size.-The default is `1028`.-* `alpha`, the decay parameter.-The default is `0.015`.++`<int name="size">`:::+++[%autowidth,frame=none]+|===+|Optional |Default: `1028`+|===+++The reservoir size.++`<double name="alpha">`:::+++[%autowidth,frame=none]+|===+|Optional |Default: `0.015`+|===+++The decay parameter.This is only valid for the `ExponentiallyDecayingReservoir`.-* `window`, the window size, in seconds, and only valid for the `SlidingTimeWindowReservoir`.-The default is `300` (5 minutes).-<timer>:: This element defines an implementation of a `Timer` supplier.+`<long name="window">`:::+++[%autowidth,frame=none]+|===+|Optional |Default: `300` seconds+|===+++The window size, in seconds, and only valid for the `SlidingTimeWindowReservoir`.++`<timer>`::+This element defines an implementation of a `Timer` supplier.The default implementation supports the `clock` and `reservoir` parameters described above.As an example of a section of `solr.xml` that defines some of these custom parameters, the following defines the default `Meter` supplier with a non-default `clock` and the default `Timer` is used with a non-default reservoir:@@ -196,29 +236,49 @@ As an example of a section of `solr.xml` that defines some of these custom param----=== The <metrics> <missingValues> Element-Long-lived metrics values are still reported when the underlying value is unavailable (e.g., "INDEX.sizeInBytes" when-IndexReader is closed).-Short-lived transient metrics (such as cache entries) that are properties of complex gauges-(internally represented as `MetricsMap`) are simply skipped when not available, and neither their names nor values-appear in registries (or in `/admin/metrics` reports).+Long-lived metrics values are still reported when the underlying value is unavailable (e.g., "INDEX.sizeInBytes" when IndexReader is closed).+Short-lived transient metrics (such as cache entries) that are properties of complex gauges (internally represented as `MetricsMap`) are simply skipped when not available, and neither their names nor values appear in registries (or in `/admin/metrics` reports).When a missing value is encountered by default it's reported as null value, regardless of the metrics type.-This can be configured in the `solr.xml:/solr/metrics/missingValues` element, which recognizes the following child elements-(for string elements a JSON payload is supported):+This can be configured in the `solr.xml:/solr/metrics/missingValues` element, which recognizes the following child elements (for string elements a JSON payload is supported):`nullNumber`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The value to use when a missing (null) numeric metrics value is encountered.`notANumber`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The value to use when an invalid numeric value is encountered.`nullString`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The value to use when a missing (null) string metrics is encountered.`nullObject`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The value to use when a missing (null) complex object is encountered.-Example configuration that returns null for missing numbers, -1 for+Example configuration that returns null for missing numbers, `-1` forinvalid numeric values, empty string for missing strings, and a Map for missingcomplex objects:@@ -264,22 +324,47 @@ Reporter configurations are specified in `solr.xml` file in `<metrics><reporter></solr>-----This example configures two reporters: <<Graphite Reporter,Graphite>> and <<SLF4J Reporter,SLF4J>>. See below for more details on how to configure reporters.+This example configures two reporters: <<Graphite Reporter,Graphite>> and <<SLF4J Reporter,SLF4J>>.+See below for more details on how to configure reporters.=== Reporter ArgumentsReporter plugins use the following arguments:`name`::-The unique name of the reporter plugin (required).+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The unique name of the reporter plugin.`class`::-The fully-qualified implementation class of the plugin, which must extend `SolrMetricReporter` (required).+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The fully-qualified implementation class of the plugin, which must extend `SolrMetricReporter`.`group`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++One or more of the predefined groups (see above).`registry`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++One or more of valid fully-qualified registry names.If both `group` and `registry` attributes are specified only the `group` attribute is considered.@@ -290,14 +375,31 @@ Additionally, several implementation-specific initialization arguments can be spThere are some arguments that are common to SLF4J, Ganglia and Graphite reporters:`period`::+++[%autowidth,frame=none]+|===+|Optional |Default: `60` seconds+|===++The period in seconds between reports.-Default value is `60`.`prefix`::+++[%autowidth,frame=none]+|===+|Optional |Default: _empty string_+|===++A prefix to be added to metric names, which may be helpful in logical grouping of related Solr instances, e.g., machine name or cluster name.Default is empty string, i.e., just the registry name and metric name will be used to form a fully-qualified metric name.`filter`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++If not empty then only metric names that start with this value will be reported.Default is no filtering, i.e., all metrics from the selected registry will be reported.@@ -318,17 +420,36 @@ The JMX Reporter uses the `org.apache.solr.metrics.reporters.SolrJmxReporter` clIt takes the following arguments:`domain`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The JMX domain name.If not specified then the registry name will be used.`serviceUrl`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The service URL for a JMX server.If not specified, Solr will attempt to discover if the JVM has an MBean server and will use that address.See below for additional information on this.`agentId`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The agent ID for a JMX server.-Note either `serviceUrl` or `agentId` can be specified but not both - if both are specified then the default MBean server will be used.+Note either `serviceUrl` or `agentId` can be specified but not both.+If both are specified then the default MBean server will be used.Object names created by this reporter are hierarchical, dot-separated but also properly structured to form corresponding hierarchies in e.g., JConsole.This hierarchy consists of the following elements in the top-down order:@@ -352,6 +473,12 @@ The SLF4J Reporter uses the `org.apache.solr.metrics.reporters.SolrSlf4jReporterIt takes the following arguments, in addition to common arguments described <<Reporter Arguments,above>>.`logger`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The name of the logger to use.Default is empty, in which case the group (or the initial part of the registry name that identifies a metrics group) will be used if specified in the plugin configuration.@@ -441,13 +568,31 @@ The http://graphiteapp.org[Graphite] Reporter uses the `org.apache.solr.metrics.It takes the following attributes, in addition to the common attributes <<Reporter Arguments,above>>.`host`::-The host name where Graphite server is running (required).+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The host name where Graphite server is running.`port`::-The port number for the server (required).+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The port number for the server.+`pickled`::+++[%autowidth,frame=none]+|===+s|Required |Default: `false`+|===++If `true`, use "pickled" Graphite protocol which may be more efficient.-Default is `false` (use plain-text protocol).When plain-text protocol is used (`pickled==false`) it's possible to use this reporter to integrate with systems other than Graphite, if they can accept space-separated and line-oriented input over network in the following format:@@ -541,32 +686,73 @@ The `admin/metrics` endpoint provides access to all the metrics for all metric gA few query parameters are available to limit your request to only certain metrics:-`group`:: The metric group to retrieve.-The default is `all` to retrieve all metrics for all groups.+`group`::+++[%autowidth,frame=none]+|===+|Optional |Default: `all`+|===+++The metric group to retrieve.+The value `all` retrieves all metrics for all groups.Other possible values are: `jvm`, `jetty`, `node`, and `core`.More than one group can be specified in a request; multiple group names should be separated by a comma.-`type`:: The type of metric to retrieve.-The default is `all` to retrieve all metric types.+`type`::+++[%autowidth,frame=none]+|===+|Optional |Default: `all`+|===+++The type of metric to retrieve.+The value `all` retrieves all metric types.Other possible values are `counter`, `gauge`, `histogram`, `meter`, and `timer`.More than one type can be specified in a request; multiple types should be separated by a comma.-`prefix`:: The first characters of metric name that will filter the metrics returned to those starting with the provided string.+`prefix`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++The first characters of metric name that will filter the metrics returned to those starting with the provided string.It can be combined with `group` and/or `type` parameters.More than one prefix can be specified in a request; multiple prefixes should be separated by a comma.Prefix matching is also case-sensitive.-`regex`:: A regular expression matching metric names.+`regex`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++A regular expression matching metric names.Note: dot separators in metric names must be escaped, e.g.,`QUERY\./select\..*` is a valid regex that matches all metrics with the `QUERY./select.` prefix.-`property`:: Allows requesting only this metric from any compound metric.+`property`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Allows requesting only this metric from any compound metric.Multiple `property` parameters can be combined to act as an OR request.For example, to only get the 99th and 999th percentile values from all metric types and groups, you can add `&property=p99_ms&property=p999_ms` to your request.This can be combined with `group`, `type`, and `prefix` as necessary.-`key`:: fully-qualified metric name, which specifies one concrete metric instance (parameter can be-specified multiple times to retrieve multiple concrete metrics).+`key`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++The fully-qualified metric name, which specifies one concrete metric instance (parameter can be specified multiple times to retrieve multiple concrete metrics).+Fully-qualified name consists of registry name, colon and metric name, with optional colon and metric property.Colons in names can be escaped using backslash (`\`) character.@@ -579,7 +765,14 @@ Examples:+*NOTE: when this parameter is used, other selection methods listed above are ignored.*-`compact`:: When false, a more verbose format of the response will be returned.+`compact`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++When `false`, a more verbose format of the response will be returned.Instead of a response like this:+[source,json]diff --git a/solr/solr-ref-guide/src/monitoring-with-prometheus-and-grafana.adoc b/solr/solr-ref-guide/src/monitoring-with-prometheus-and-grafana.adocindex cfd8527b85b..f427cb20fb0 100644--- a/solr/solr-ref-guide/src/monitoring-with-prometheus-and-grafana.adoc+++ b/solr/solr-ref-guide/src/monitoring-with-prometheus-and-grafana.adoc@@ -88,67 +88,139 @@ The list of available parameters for the Prometheus Exporter.All parameters can be provided via an environment variable, instead of through the command line.`h`, `--help`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Displays command line help and usage.`-p`, `--port`, `$PORT`::+++[%autowidth,frame=none]+|===+|Optional |Default: `8989`+|===++The port where Prometheus will listen for new data.This port will be used to configure Prometheus.It can be any port not already in use on your server.-The default is `8989`.`-b`, `--baseurl`, `$SOLR_URL`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++The Solr base URL (such as `\http://localhost:8983/solr`) when Solr is running in a user-managed cluster or a single-node installation.If you are running SolrCloud, do not specify this parameter.If neither the `-b` parameter nor the `-z` parameter are defined, the default is `-b \http://localhost:8983/solr`.`-z`, `--zkhost`, `$ZK_HOST`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++The ZooKeeper connect string (such as `localhost:9983`, or `localhost:2181/solr`) when Solr is running SolrCloud.If you are running a user-managed cluster or single-node installation, do not specify this parameter.If neither the `-b` parameter nor the `-z` parameter are defined, the `-b` parameter default is used.`-f`, `--config-file`, `$CONFIG_FILE`::+++[%autowidth,frame=none]+|===+|Optional |Default: `contrib/prometheus-exporter/conf/solr-exporter-config.xml`+|===++The path to the configuration file that defines the Solr metrics to read.-The default is `contrib/prometheus-exporter/conf/solr-exporter-config.xml`.`-n`, `--num-threads`, `$NUM_THREADS`::+++[%autowidth,frame=none]+|===+|Optional |Default: `1`+|===++The number of threads.The `solr-exporter` creates thread pools for requests to Solr.Request latency can be improved by increasing the number of threads.-The default is `1`.`-s`, `--scrape-interval`, `$SCRAPE_INTERVAL`::+++[%autowidth,frame=none]+|===+|Optional |Default: `60` seconds+|===++The number of seconds between collecting metrics from Solr.The `solr-exporter` collects metrics from Solr every few seconds controlled by this setting.These metrics are cached and returned regardless of how frequently prometheus is configured to pull metrics from this tool.The freshness of the metrics can be improved by reducing the scrape interval but do not set it to a very low value because metrics collection can be expensive and can execute arbitrary searches to ping Solr.-The default value is 60 seconds.-The Solr's metrics exposed by `solr-exporter` can be seen at: `\http://localhost:8983/solr/admin/metrics`.+The metrics exposed by `solr-exporter` can be seen at the metrics endpoint: `\http://localhost:8983/solr/admin/metrics`.=== Environment Variable OptionsThe `./bin` scripts provided with the Prometheus Exporter support the use of custom java options through the following environment variables:`JAVA_HEAP`::+++[%autowidth,frame=none]+|===+|Optional |Default: `512m`+|===++Sets the initial (`Xms`) and max (`Xmx`) Java heap size.-The default is `512m`.`JAVA_MEM`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Custom java memory settings (e.g., `-Xms1g -Xmx2g`).This is ignored if `JAVA_HEAP` is provided.`GC_TUNE`::+++[%autowidth,frame=none]+|===+|Optional |Default: `-XX:+UseG1GC`+|===++Custom Java garbage collection settings.-The default is `-XX:+UseG1GC`.`JAVA_OPTS`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Extra JVM options.`ZK_CREDS_AND_ACLS`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Credentials for connecting to a ZooKeeper host that is protected with ACLs.For more information on what to include in this variable, refer to the section <<zookeeper-access-control.adoc#zookeeper-acls-in-solr-scripts,ZooKeeper Access Control>> or the <<getting-metrics-from-a-secured-solrcloud,example below>>.`CLASSPATH_PREFIX`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Location of extra libraries to load when starting the `solr-exporter`.All <<#command-line-parameters,command line parameters>> are able to be provided via environment variables when using the `./bin` scripts.@@ -349,13 +421,44 @@ To do this, we define two additional elements:Defines the query parameter(s) used for the request.This section uses several additional properties to define your query:-`collection`::: The collection to issue the query against.+`collection`:::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++The collection to issue the query against.Only used with SolrCloud clusters.-`core`::: The core to issue the query against.++`core`:::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++The core to issue the query against.Only used with user-managed clusters or single-node installations.-`path`::: The path to the query endpoint where the request will be sent.++`path`:::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++The path to the query endpoint where the request will be sent.Examples include `admin/metrics` or `/select` or `admin/collections`.-`params`::: Additional query parameters.++`params`:::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Additional query parameters.These will vary depending on the request type and the endpoint.For example, if using the Metrics endpoint, you can add parameters to limit the query to a certain group and/or prefix.If you're using the Collections API, the command you want to use would be a parameter.@@ -450,7 +553,6 @@ doing a query for `solr_ping` metric in the Prometheus GUI:.Prometheus Solr Ping expressionimage::images/monitoring-with-prometheus-and-grafana/prometheus-solr-ping.png[image,width=800]-== Sample Grafana DashboardTo use Grafana for visualization, it must be downloaded and deployed separately.diff --git a/solr/solr-ref-guide/src/other-parsers.adoc b/solr/solr-ref-guide/src/other-parsers.adocindex 31c3d6b9717..7068e44ca1b 100644--- a/solr/solr-ref-guide/src/other-parsers.adoc+++ b/solr/solr-ref-guide/src/other-parsers.adoc@@ -36,22 +36,52 @@ Sub-queries along with their typed occurrences indicate how documents will be ma*Parameters*`must`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A list of queries that *must* appear in matching documents and contribute to the score.`must_not`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A list of queries that *must not* appear in matching documents.`should`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A list of queries *should* appear in matching documents.For a BooleanQuery with no `must` queries, one or more `should` queries must match a document for the BooleanQuery to match.`filter`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A list of queries that *must* appear in matching documents.However, unlike `must`, the score of filter queries is ignored.Also, these queries are cached in filter cache.To avoid caching add either `cache=false` as local parameter, or `"cache":"false"` property to underneath Query DLS Object.`excludeTags`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Comma separated list of tags for excluding queries from parameters above.See explanation below.@@ -142,10 +172,21 @@ Under the covers, this query parser makes use of the Span group of queries, e.g.*Parameters*`inOrder`::-Set to true to force phrase queries to match terms in the order specified.-The default is `true`.+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++Set to `true` to force phrase queries to match terms in the order specified.`df`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The default search field.*Examples*@@ -189,9 +230,9 @@ This property is described in more detail in the section <<caches-warming.adoc#q==== Stopwords with Complex Phrase Parser-It is recommended not to use stopword elimination with this query parser.+It is not recommended to use stopword elimination with this query parser.-Lets say we add the terms *the*, *up*, and *to* to `stopwords.txt` for your collection, and index a document containing the text _"Stores up to 15,000 songs, 25,00 photos, or 150 yours of video"_ in a field named "features".+Assume we add the terms *the*, *up*, and *to* to `stopwords.txt` for a collection, and index a document containing the text _"Stores up to 15,000 songs, 25,00 photos, or 150 yours of video"_ in a field named "features".While the query below does not use this parser:@@ -245,7 +286,7 @@ which is equivalent to:[literal]q=+field:text +COLOR:Red +SIZE:XL-`param` local parameter uses "$" syntax to refer to a few queries, where `excludeTags` may omit some of them.+The `param` local parameter uses "`$`" syntax to refer to a few queries, where `excludeTags` may omit some of them.== Function Query Parser@@ -267,22 +308,40 @@ This is also referred to as `frange`, as seen in the examples below.*Parameters*`l`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The lower bound.-This parameter is optional.`u`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The upper bound.-This parameter is optional.`incl`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++Include the lower bound.-This parameter is optional.-The default is `true`.`incu`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++Include the upper bound.-This parameter is optional.-The default is `true`.*Examples*@@ -309,37 +368,72 @@ The graph is built according to linkages between documents based on the terms foSupported field types are point fields with docValues enabled, or string fields with `indexed=true` or `docValues=true`.-TIP: For string fields which are `indexed=false` and `docValues=true`, please refer to the javadocs for {lucene-javadocs}/sandbox/org/apache/lucene/sandbox/search/DocValuesTermsQuery.html[`DocValuesTermsQuery`]-for its performance characteristics so `indexed=true` will perform better for most use-cases.+TIP: For string fields which are `indexed=false` and `docValues=true`, please refer to the javadocs for {lucene-javadocs}/sandbox/org/apache/lucene/sandbox/search/DocValuesTermsQuery.html[`DocValuesTermsQuery`] for its performance characteristics so `indexed=true` will perform better for most use-cases.=== Graph Query Parameters`to`::+++[%autowidth,frame=none]+|===+|Optional |Default: `edge_ids`+|===++The field name of matching documents to inspect to identify outgoing edges for graph traversal.-Defaults to `edge_ids`.`from`::-The field name to of candidate documents to inspect to identify incoming graph edges.-Defaults to `node_id`.+++[%autowidth,frame=none]+|===+|Optional |Default: `node_id`+|===+++The field name in candidate documents to inspect to identify incoming graph edges.`traversalFilter`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++An optional query that can be supplied to limit the scope of documents that are traversed.`maxDepth`::+++[%autowidth,frame=none]+|===+|Optional |Default: `-1` (unlimited)+|===++Integer specifying how deep the breadth first search of the graph should go beginning with the initial query.-Defaults to `-1` (unlimited).`returnRoot`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++Boolean to indicate if the documents that matched the original query (to define the starting points for graph) should be included in the final results.-Defaults to `true`.`returnOnlyLeaf`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++Boolean that indicates if the results of the query should be filtered so that only documents with no outgoing edges are returned.-Defaults to `false`.`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`.+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===+++Boolean that indicates if Automatons should be compiled for each iteration of the breadth first search, which may be faster for some graphs.=== Graph Query Limitations@@ -470,13 +564,14 @@ http://localhost:8983/solr/alt_graph/query?fl=id&q={!graph+from=id+to=out_edge+m== Hash Range Query Parser-The hash range query parser will return documents that have a field that contains a value that would be hashed to a particular range.-This is used by the join query when using method=crossCollection.-The hash rang query parser has a per segment cache for each field that this query parser will operate on.+The hash range query parser will return documents with a field that contains a value that would be hashed to a particular range.+This is used by the join query parser when using `method=crossCollection`.+The hash range query parser has a per-segment cache for each field that this query parser will operate on.-When specifying a min/max hash range and a field name with the hash range query parser, only documents who contain a field value that hashes into that range will be returned.+When specifying a min/max hash range and a field name with the hash range query parser, only documents that contain a field value that hashes into that range will be returned.If you want to query for a very large result set, you can query for various hash ranges to return a fraction of the documents with each range request.-In the cross collection join case, the hash_range query parser is used to ensure that each shard only gets the set of join keys that would end up on that shard.++In the <<join-query-parser.adoc#cross-collection-join,cross collection join>> case, the hash range query parser is used to ensure that each shard only gets the set of join keys that would end up on that shard.This query parser uses the MurmurHash3_x86_32.This is the same as the default hashing for the default composite ID router in Solr.@@ -484,13 +579,31 @@ This is the same as the default hashing for the default composite ID router in S=== Hash Range Parameters`f`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The field name to operate on.-This field should have docValues enabled and should be single-valued+This field should have docValues enabled and should be single-valued.`l`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The lower bound of the hash range for the query.`u`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The upper bound for the hash range for the query.=== Hash Range Example@@ -500,11 +613,11 @@ The upper bound for the hash range for the query.{!hash_range f="field_name" l="0" u="12345"}-----=== Hash Range Cache Config+=== Hash Range Cache ConfigurationThe hash range query parser uses a special cache to improve the speedup of the queries.The following should be added to the `solrconfig.xml` for the various fields that you want to perform the hash range query on.-Note the name of the cache should be the field name prefixed by "hash_".+Note the name of the cache should be the field name prefixed by "`hash_`".[source,xml]----@@ -594,23 +707,45 @@ The main query is parsed from the field type's query analysis into a `SpanQuery`This parser accepts the following parameters:`f`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The field to use.-This parameter is required.`func`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The payload function.The options are: `min`, `max`, `average`, or `sum`.-This parameter is required.`operator`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A search operator.The options are:- * `or` will generate either a `SpanTermQuery` or a `SpanOrQuery` depending on the number of tokens emitted.- * `phrase` will generate either `SpanTermQuery` or an ordered, zero slop `SpanNearQuery`, depending on how many tokens are emitted.+* `or` will generate either a `SpanTermQuery` or a `SpanOrQuery` depending on the number of tokens emitted.+* `phrase` will generate either `SpanTermQuery` or an ordered, zero slop `SpanNearQuery`, depending on how many tokens are emitted.`includeSpanScore`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, multiples the computed payload factor by the score of the original query.-If `false`, the default, the computed payload factor is the score.+If `false`, the computed payload factor is the score.*Examples*@@ -628,40 +763,61 @@ The main query, for both of these parsers, is parsed straightforwardly from theThe generated `SpanQuery` will be either a `SpanTermQuery` or an ordered, zero slop `SpanNearQuery`, depending on how many tokens are emitted.The net effect is that the main query always operates in a manner similar to a phrase query in the standard Lucene parser (thus ignoring any value for `q.op`).-NOTE: If when the field analysis is applied to the query, it alters the number of tokens, the final number of tokens must match the number of payloads supplied in the `payloads` parameter.-If there is a mismatch between the number of query tokens, and the number of payload values supplied with this query, the query will not match.+NOTE: When the field analysis is applied to the query, if it alters the number of tokens the final number of tokens must match the number of payloads supplied in the `payloads` parameter.+If there is a mismatch between the number of query tokens and the number of payload values supplied with this query, the query will not match.This parser accepts the following parameters:`f`::-The field to use (required).+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The field to use.`payloads`::-A space-separated list of payloads to be compared with payloads in the matching tokens from the document (required).+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++A space-separated list of payloads to be compared with payloads in the matching tokens from the document.Each specified payload will be encoded using the encoder determined from the field type prior to matching.-Integer, float and identity (string) encodings are supported with the same meanings as for DelimitedPayloadTokenFilter.+Integer, float, and identity (string) encodings are supported with the same meanings as for `DelimitedPayloadTokenFilter`.`op`::+++[%autowidth,frame=none]+|===+|Optional |Default: `eq`+|===++The inequality operation to apply to the payload check.All operations require that consecutive tokens derived from the analysis of the query match consecutive tokens in the document, and additionally the payloads on the document tokens must be:- * `eq` - equal to the specified payloads (default)- * `gt` - greater than the specified payloads- * `lt` - less than the specified payloads- * `gte` - greater than or equal to the specified payloads- * `lte` - less than or equal to the specified payloads+ * `eq`: equal to the specified payloads+ * `gt`: greater than the specified payloads+ * `lt`: less than the specified payloads+ * `gte`: greater than or equal to the specified payloads+ * `lte`: less than or equal to the specified payloads*Examples*-Find all documents with the phrase "searching stuff" where searching has a payload of "VERB" and "stuff" has a payload of "NOUN"+Find all documents with the phrase "searching stuff" where searching has a payload of "VERB" and "stuff" has a payload of "NOUN":+[source,text]{!payload_check f=words_dps payloads="VERB NOUN"}searching stuff-Find all documents with "foo" where "foo" has a payload with a value of greater than or equal to 0.75+Find all documents with "foo" where "foo" has a payload with a value of greater than or equal to 0.75:+[source,text]{!payload_check f=words_dpf payloads="0.75" op="gte"}foo-Find all documents with the phrase "foo bar" where term "foo" has a payload greater than 9 and "bar" has a payload greater than 5-[source,text]+Find all documents with the phrase "foo bar" where term "foo" has a payload greater than 9 and "bar" has a payload greater than 5:++[literal]{!payload_check f=words_dpi payloads="9 5" op="gt"}foo bar@@ -727,6 +883,12 @@ This query parser is designed to allow users to enter queries however they want,This parser takes the following parameters:`q.operators`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++Comma-separated list of names of parsing operators to enable.By default, all operations are enabled, and this parameter can be used to effectively disable specific operators as needed, by excluding them from the list.Passing an empty string with this parameter disables all operators.@@ -758,14 +920,32 @@ At the end of terms, specifies a fuzzy query.|===`q.op`::+++[%autowidth,frame=none]+|===+|Optional |Default: `OR`+|===++Defines the default operator to use if none is defined by the user.Allowed values are `AND` and `OR`.`OR` is used if none is specified.`qf`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A list of query fields and boosts to use when building the query.`df`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Defines the default field if none is defined in the Schema, or overrides the default field if it is already defined.Any errors in syntax are ignored and the query parser will interpret queries as best it can.@@ -887,19 +1067,34 @@ This can be useful for generating filter queries from the external human readablThis query parser takes the following parameters:`f`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The field on which to search.-This parameter is required.`separator`::+++[%autowidth,frame=none]+|===+|Optional |Default: `,` (comma)+|===++Separator to use when parsing the input.If set to " " (a single blank space), will trim additional white space from the input terms.-Defaults to a comma (`,`).`method`::-An optional parameter used to determine which of several query implementations should be used by Solr.+++[%autowidth,frame=none]+|===+|Optional |Default: `termsFilter`+|===+++Determine which of several query implementations should be used by Solr.+Options are restricted to: `termsFilter`, `booleanQuery`, `automaton`, `docValuesTermsFilterPerSegment`, `docValuesTermsFilterTopLevel` or `docValuesTermsFilter`.-If unspecified, the default value is `termsFilter`.+Each implementation has its own performance characteristics, and users are encouraged to experiment to determine which implementation is most performant for their use-case.Heuristics are given below.@@ -907,8 +1102,7 @@ Heuristics are given below.`booleanQuery` creates a `BooleanQuery` representing the request.Scales well with index size, but poorly with the number of terms being searched for.+-`termsFilter` the default `method`.-Uses a `BooleanQuery` or a `TermInSetQuery` depending on the number of terms.+`termsFilter` uses a `BooleanQuery` or a `TermInSetQuery` depending on the number of terms.Scales well with index size, but only moderately with the number of query terms.+`docValuesTermsFilter` can only be used on fields with docValues data.diff --git a/solr/solr-ref-guide/src/partial-document-updates.adoc b/solr/solr-ref-guide/src/partial-document-updates.adocindex 1b3b0b96232..b8bdcb68a86 100644--- a/solr/solr-ref-guide/src/partial-document-updates.adoc+++ b/solr/solr-ref-guide/src/partial-document-updates.adoc@@ -504,10 +504,21 @@ Users can not re-purpose that field and specify it as the `versionField` for use`DocBasedVersionConstraintsProcessorFactory` supports the following additional configuration parameters, which are all optional:`ignoreOldUpdates`::-A boolean option which defaults to `false`.+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If set to `true`, the update will be silently ignored (and return a status 200 to the client) instead of rejecting updates where the `versionField` is too low.`deleteVersionParam`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A String parameter that can be specified to indicate that this processor should also inspect Delete By Id commands.+The value of this option should be the name of a request parameter that the processor will consider mandatory for all attempts to Delete By Id, and must be be used by clients to specify a value for the `versionField` which is greater then the existing value of the document to be deleted.@@ -517,6 +528,12 @@ When using this request parameter, any Delete By Id command with a high enough dIf `versionField` is specified as a list, then this parameter too must be specified as a comma-delimited list of the same size so that the parameters correspond with the fields.`supportMissingVersionOnOldDocs`::-This boolean parameter defaults to `false`, but if set to `true` allows any documents written *before* this feature is enabled, and which are missing the `versionField`, to be overwritten.+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===+++If set to `true`, allows any document written *before* this feature is enabled and are missing the `versionField`, to be overwritten.Please consult the {solr-javadocs}/core/org/apache/solr/update/processor/DocBasedVersionConstraintsProcessorFactory.html[DocBasedVersionConstraintsProcessorFactory javadocs] and https://github.com/apache/lucene-solr/blob/master/solr/core/src/test-files/solr/collection1/conf/solrconfig-externalversionconstraint.xml[test solrconfig.xml file] for additional information and example usages.diff --git a/solr/solr-ref-guide/src/query-elevation-component.adoc b/solr/solr-ref-guide/src/query-elevation-component.adocindex 6e3946c7483..97a91004889 100644--- a/solr/solr-ref-guide/src/query-elevation-component.adoc+++ b/solr/solr-ref-guide/src/query-elevation-component.adoc@@ -61,14 +61,20 @@ Optionally, in the Query Elevation Component configuration you can also specify<str name="editorialMarkerFieldName">foo</str>-----The Query Elevation Search Component takes the following parameters:+The Query Elevation search component takes the following parameters:`queryFieldType`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++Specifies which field type should be used to analyze the incoming text.For example, it may be appropriate to use a field type with a `LowerCaseFilter`.+Another example is if you need to unescape backslash-escaped queries, then you can define the field type to preprocess with a `PatternReplaceCharFilter`.-Here is the corresponding example of field type (traditionally in `managed-schema` or `schema.xml`):+Here is the corresponding example of a field type:+[source,xml]----@@ -85,27 +91,50 @@ Here is the corresponding example of field type (traditionally in `managed-schemFor example, to unescape only non-alphanumeric, the pattern could be `\\([^\p\{IsAlphabetic}\p\{Digit}])`.`config-file`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++Path to the file that defines the elevation rules.-This file must exist in the <<config-sets.adoc#,Configset>>.+This file must exist in the <<config-sets.adoc#,configset>>.Unlike most configuration, this component will re-read its configuration if the file changed following a commit.However, that doesn't work in SolrCloud, and there has to be an actual index change for a commit to have an effect for it to be used as a way to pick up changes.In all cases, you can reload affected cores/collections to use any new configuration in a configset.`forceElevation`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++By default, this component respects the requested `sort` parameter: if the request asks to sort by date, it will order the results by date.If `forceElevation=true`, results will first return the boosted docs, then order by date.This defaults to `false`.This is also a request parameter, which will override the config.`useConfiguredElevatedOrder`::-When multiple docs are elevated, should their relative order be the order in the configuration file or should-they be subject to whatever the sort criteria is? True by default.+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++When multiple docs are elevated, should their relative order be the order in the configuration file or should they be subject to whatever the sort criteria is?This is also a request parameter, which will override the config.-The effect is most apparent when forceElevation is true and there is sorting on fields.+The effect is most apparent when `forceElevation` is true and there is sorting on fields.`elevateOnlyDocsMatchingQuery`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++By default, the component will also elevate docs that aren't part of the search result (matching the query).-If you only want to elevate the docs that are part of the search result, set this to `true` (default is `false`).+If you only want to elevate the docs that are part of the search result, set this to `true`.=== The elevate.xml Filediff --git a/solr/solr-ref-guide/src/query-re-ranking.adoc b/solr/solr-ref-guide/src/query-re-ranking.adocindex dfc915f5a81..7c03c969b9b 100644--- a/solr/solr-ref-guide/src/query-re-ranking.adoc+++ b/solr/solr-ref-guide/src/query-re-ranking.adoc@@ -42,19 +42,35 @@ You can also configure a custom {solr-javadocs}/core/org/apache/solr/search/QParThe `rerank` parser wraps a query specified by an local parameter, along with additional parameters indicating how many documents should be re-ranked, and how the final scores should be computed:`reRankQuery`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The query string for your complex ranking query - in most cases <<local-params.adoc#,a variable>> will be used to refer to another request parameter.-This parameter is required.`reRankDocs`::-The number of top N documents from the original query that should be re-ranked.+++[%autowidth,frame=none]+|===+|Optional |Default: `200`+|===+++The number of top _N_ documents from the original query that should be re-ranked.This number will be treated as a minimum, and may be increased internally automatically in order to rank enough documents to satisfy the query (i.e., start+rows).-The default is `200`.`reRankWeight`::+++[%autowidth,frame=none]+|===+|Optional |Default: `2.0`+|===++A multiplicative factor that will be applied to the score from the reRankQuery for each of the top matching documents, before that score is added to the original score.-The default is `2.0`.-In the example below, the top 1000 documents matching the query "greetings" will be re-ranked using the query "(hi hello hey hiya)". The resulting scores for each of those 1000 documents will be 3 times their score from the "(hi hello hey hiya)", plus the score from the original "greetings" query:+In the example below, the top 1000 documents matching the query "greetings" will be re-ranked using the query "(hi hello hey hiya)".+The resulting scores for each of those 1000 documents will be 3 times their score from the "(hi hello hey hiya)", plus the score from the original "greetings" query:[source,text]----diff --git a/solr/solr-ref-guide/src/replica-management.adoc b/solr/solr-ref-guide/src/replica-management.adocindex 6a5f683b065..2965b182123 100644--- a/solr/solr-ref-guide/src/replica-management.adoc+++ b/solr/solr-ref-guide/src/replica-management.adoc@@ -104,41 +104,87 @@ curl -X POST http://localhost:8983/api/collections/techproducts/shards -H 'Conte=== ADDREPLICA Parameters`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the collection where the replica should be created.-This parameter is required.`shard`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The name of the shard to which replica is to be added.+If `shard` is not specified, then `\_route_` must be.`\_route_`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++If the exact shard name is not known, users may pass the `\_route_` value and the system would identify the name of the shard.+Ignored if the `shard` parameter is also specified.`node`::-The name of the node where the replica should be created (optional).+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++The name of the node where the replica should be created.`createNodeSet`::-A comma-separated list of nodes among which the best ones will be chosen to place the replicas (optional)+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++A comma-separated list of nodes among which the best ones will be chosen to place the replicas.+The format is a comma-separated list of node_names, such as `localhost:8983_solr,localhost:8984_solr,localhost:8985_solr`.NOTE: If neither `node` nor `createNodeSet` are specified then the best node(s) from among all the live nodes in the cluster are chosen.`instanceDir`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The instanceDir for the core that will be created.`dataDir`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The directory in which the core should be created.`type`::+++[%autowidth,frame=none]+|===+|Optional |Default: `nrt`+|===++The type of replica to create.These possible values are allowed:+* `nrt`: The NRT type maintains a transaction log and updates its index locally.-This is the default and the most commonly used.* `tlog`: The TLOG type maintains a transaction log but only updates its index via replication.* `pull`: The PULL type does not maintain a transaction log and only updates its index via replication.This type is not eligible to become a leader.@@ -146,16 +192,44 @@ This type is not eligible to become a leader.See the section <<solrcloud-shards-indexing.adoc#types-of-replicas,Types of Replicas>> for more information about replica type options.`nrtReplicas`::-The number of `nrt` replicas that should be created (optional, defaults to 1 if `type` is `nrt` otherwise 0).+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===+++The number of `nrt` replicas that should be created.+Defaults to `1` if `type` is `nrt` otherwise `0`.`tlogReplicas`::-The number of `tlog` replicas that should be created (optional, defaults to 1 if `type` is `tlog` otherwise 0).+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===+++The number of `tlog` replicas that should be created.+Defaults to `1` if `type` is `tlog` otherwise `0`.`pullReplicas`::-The number of `pull` replicas that should be created (optional, defaults to 1 if `type` is `pull` otherwise 0).+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===+++The number of `pull` replicas that should be created.+Defaults to `1` if `type` is `pull` otherwise `0`.`property._name_=_value_`::-Set core property _name_ to _value_. See <<core-discovery.adoc#,Core Discovery>> for details about supported properties and values.+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Set core property _name_ to _value_.+See <<core-discovery.adoc#,Core Discovery>> for details about supported properties and values.[WARNING]====@@ -165,10 +239,22 @@ Altering these entries by specifying `property._name_=_value_` is an expert-leve====`waitForFinalState`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, the request will complete only when all affected replicas become active.-The default is `false`, which means that the API will return the status of the single action, which may be before the new replica is online and active.+If `false`, the API will return the status of the single action, which may be before the new replica is online and active.`async`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>=== Additional Examples using ADDREPLICA@@ -282,42 +368,86 @@ curl -X POST http://localhost:8983/api/collections/techproducts/shards -H 'Conte=== MOVEREPLICA Parameters`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the collection.-This parameter is required.`targetNode`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the destination node.-This parameter is required.`sourceNode`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The name of the node that contains the replica to move.This parameter is required unless `replica` is specified.If `replica` is specified this parameter is ignored.`shard`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The name of the shard for which a replica should be moved.This parameter is required unless `replica` is specified.If `replica` is specified, this parameter is ignored.`replica`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The name of the replica to move.This parameter is required unless `shard` and `sourceNode` are specified, however this parameter has precedence over those two parameters.`timeout`::+++[%autowidth,frame=none]+|===+|Optional |Default: `600` seconds+|===++The number of seconds to wait for the replica to be live in the new location before deleting the replica in the old location.-Defaults to 600 seconds.Deletion will not occur and creation will not be rolled back in the event of a timeout, potentially leaving an extra replica.Presently, this parameter is ignored if the replica is an hdfs replica.`inPlaceMove`::-For replicas that use shared filesystems allow 'in-place' move that reuses shared data.-Defaults to true, but is ignored if the replica does not have the property `shared_storage` with a value of `true`+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++For replicas that use shared filesystems, allow an "in-place" move that reuses shared data.+Defaults to `true`, but is ignored if the replica does not have the property `shared_storage` with a value of `true`.`async`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>.-[[deletereplica]]== DELETEREPLICA: Delete a Replica@@ -360,20 +490,42 @@ curl -X DELETE http://localhost:8983/api/collections/techproducts/shards/shard1/=== DELETEREPLICA Parameters`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the collection.-This parameter is required.`shard`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the shard that includes the replica to be removed.-This parameter is required.`replica`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The name of the replica to remove.+If `count` is used instead, this parameter is not required.Otherwise, this parameter must be supplied.`count`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The number of replicas to remove.If the requested number exceeds the number of replicas, no replicas will be deleted.If there is only one replica, it will not be removed.@@ -382,22 +534,51 @@ If `replica` is used instead, this parameter is not required.Otherwise, this parameter must be supplied.`deleteInstanceDir`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++By default Solr will delete the entire instanceDir of the replica that is deleted.Set this to `false` to prevent the instance directory from being deleted.`deleteDataDir`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++By default Solr will delete the dataDir of the replica that is deleted.Set this to `false` to prevent the data directory from being deleted.`deleteIndex`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++By default Solr will delete the index of the replica that is deleted.Set this to `false` to prevent the index directory from being deleted.`onlyIfDown`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++When set to `true`, no action will be taken if the replica is active.-Default `false`.`async`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>.[[addreplicaprop]]@@ -446,20 +627,40 @@ curl -X POST http://localhost:8983/api/collections/techproducts -H 'Content-Type=== ADDREPLICAPROP Parameters`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the collection the replica belongs to.-This parameter is required.`shard`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the shard the replica belongs to.-This parameter is required.`replica`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The replica, e.g., `core_node1`.-This parameter is required.`property`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the property to add.-This property is required.+This will have the literal `property.` prepended to distinguish it from system-maintained properties.So these two forms are equivalent:@@ -471,10 +672,21 @@ and`property=property.special``property.value`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The value to assign to the property.-This parameter is required.`shardUnique`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, then setting this property in one replica will remove the property from all other replicas in that shard.The default is `false`.+@@ -556,27 +768,40 @@ curl -X POST http://localhost:8983/api/collections/techproducts -H 'Content-Type=== DELETEREPLICAPROP Parameters`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the collection the replica belongs to.-This parameter is required.`shard`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the shard the replica belongs to.-This parameter is required.`replica`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The replica, e.g., `core_node1`.-This parameter is required.`property`::-The property to add.-This will have the literal `property.` prepended to distinguish it from system-maintained properties.-So these two forms are equivalent:+-`property=special`+[%autowidth,frame=none]+|===+s|Required |Default: none+|===+-and-+-`property=property.special`+The property to delete.=== DELETEREPLICAPROP Responsediff --git a/solr/solr-ref-guide/src/replica-placement-plugins.adoc b/solr/solr-ref-guide/src/replica-placement-plugins.adocindex 5299a61ef29..06c6c077ae5 100644--- a/solr/solr-ref-guide/src/replica-placement-plugins.adoc+++ b/solr/solr-ref-guide/src/replica-placement-plugins.adoc@@ -154,22 +154,42 @@ co-location mapping for the primary collection.This plugin supports the following configuration parameters:`minimalFreeDiskGB`::-(optional, integer) if a node has strictly less GB of free disk than this value, the node is excluded from assignment decisions.-Set to 0 or less to disable.-Default value is 10.+++[%autowidth,frame=none]+|===+|Optional |Default: `10` Gigabytes+|===+++If a node has strictly less GB of free disk than this value, the node is excluded from assignment decisions.+Set to `0` or less to disable.`prioritizedFreeDiskGB`::-(optional, integer) replica allocation will assign replicas to nodes with at least this number of GB of free disk space regardless of the number of cores on these nodes rather than assigning replicas to nodes with less than this amount of free disk space if that's an option (if that's not an option, replicas can still be assigned to nodes with less than this amount of free space).-Default value is 100.+++[%autowidth,frame=none]+|===+|Optional |Default: `100` Gigabytes+|===+++Replica allocation will assign replicas to nodes with at least this number of GB of free disk space regardless of the number of cores on these nodes rather than assigning replicas to nodes with less than this amount of free disk space if that's an option (if that's not an option, replicas can still be assigned to nodes with less than this amount of free space).`withCollection`::-(optional, map) this property defines an additional constraint that primary collections (keys) must be located on the same nodes as the secondary collections (values).+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Defines an additional constraint that primary collections (keys) must be located on the same nodes as the secondary collections (values).The plugin will assume that the secondary collection replicas are already in place and ignore candidate nodes where they are not already present.-Default value is none.`nodeType`::-(optional, map) this property defines an additional constraint that collections (keys)-must be located only on the nodes that are labeled with one or more of the matching "node type" labels (values in the map are comma-separated labels).+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++This property defines an additional constraint that collections (keys) must be located only on the nodes that are labeled with one or more of the matching "node type" labels (values in the map are comma-separated labels).Nodes are labeled using the `node_type` system property with the value being an arbitrary comma-separated list of labels.Correspondingly, the plugin configuration can specify that a particular collection must be placed only on the nodes that match at least one of the (comma-separated) labels defined here.diff --git a/solr/solr-ref-guide/src/response-writers.adoc b/solr/solr-ref-guide/src/response-writers.adocindex 717e0e6bd34..168327dc1bc 100644--- a/solr/solr-ref-guide/src/response-writers.adoc+++ b/solr/solr-ref-guide/src/response-writers.adoc@@ -74,7 +74,7 @@ Here is a sample response for a simple query like `q=id:VS1GB400C3`:}}-----The default mime type for the JSON writer is `application/json`, however this can be overridden in the `solrconfig.xml` - such as in this example from the "```techproducts```" configuration:+The default mime type for the JSON writer is `application/json`, however this can be overridden in the `solrconfig.xml` - such as in this example from the "`techproducts`" configuration:[source,xml]----@@ -146,6 +146,12 @@ 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.`version`::+++[%autowidth,frame=none]+|===+|Optional |Default: `2.2`+|===++The `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.+@@ -155,6 +161,12 @@ The format of the `responseHeader` changed to use the same `<lst>` structure asThe default value is the latest supported.`stylesheet`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The `stylesheet` parameter can be used to direct Solr to include a `<?xml-stylesheet type="text/xsl" href="..."?>` declaration in the XML response it returns.+The default behavior is not to return any stylesheet declaration at all.@@ -166,6 +178,12 @@ This is a legacy parameter, which may be developed further in a future release.====`indent`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++If 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.@@ -175,15 +193,21 @@ The default behavior is not to indent.The XSLT Response Writer applies an XML stylesheet to output.It can be used for tasks such as formatting results for an RSS feed.-This response writer has been added as part of the Scripting contrib module.--Learn more about adding the `dist/solr-scripting-*.jar` file into Solr's <<libs.adoc#lib-directories,Lib Directories>>.+This response writer is part of the <<script-update-processor.adoc#,scripting contrib>>.+Since it is a contrib, it requires configuration before it can be used.-=== tr Parameter+The XSLT Response Writer accepts one parameter:-The XSLT Response Writer accepts one parameter: the `tr` parameter, which identifies the XML transformation to use.+`tr`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++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"/>`=== XSLT Configuration@@ -244,13 +268,11 @@ could round trip your data via:----curl -o docs_formatted_as_solr_add.xml "http://localhost:8983/solr/techproducts/select?q=ipod&fl=id,cat,name,popularity,price,score&wt=xslt&tr=updateXml.xsl"curl -X POST -H "Content-Type: text/xml" -d @docs_formatted_as_solr_add.xml "http://localhost:8983/solr/techproducts/update?commitWithin=1000&overwrite=true"-----Lastly, the `luke.xsl` transformation demonstrates that you can apply very sophisticated transformations: `\http://localhost:8983/solr/techproducts/admin/luke?wt=xslt&tr=luke.xsl`-== Binary Response WriterThis is a custom binary format used by Solr for inter-node communication as well as client-server communication.diff --git a/solr/solr-ref-guide/src/result-clustering.adoc b/solr/solr-ref-guide/src/result-clustering.adocindex b070d37156a..9b08687b7ed 100644--- a/solr/solr-ref-guide/src/result-clustering.adoc+++ b/solr/solr-ref-guide/src/result-clustering.adoc@@ -229,18 +229,30 @@ You can include the required contrib JARs in `solrconfig.xml` as shown below (byThe following properties control `ClusteringComponent` state.`clustering`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++The component is by default disabled, even if properly declared and attached to a search handler.-The `clustering` property must be set to `true` to enable it (this can be done by setting- up default parameters in the search handler -- see below).+The `clustering` property must be set to `true` to enable it.+This can be done by setting up default parameters in the search handler as described in the next section.`clustering.engine`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++Declares which engine to use.If not present, the first declared active engine is used.-=== Clustering Engines-The declaration of clustering component in `solrconfig.xml` must include one or more predefined configurations called _engines_. For example, consider the configuration below:+The declaration of clustering component in `solrconfig.xml` must include one or more predefined configurations called _engines_.+For example, consider the configuration below:[source,xml]----@@ -259,12 +271,8 @@ The declaration of clustering component in `solrconfig.xml` must include one or</searchComponent>-----This declares two separate engines (`lingo` and `stc`): these configurations have a-different clustering algorithm, and a different set of clustered document fields.-The-active engine can be selected by passing `clustering.engine=_name_` parameter-at runtime (via URL) or as the default within the search handler's configuration,-as shown below:+This declares two separate engines (`lingo` and `stc`): these configurations have a different clustering algorithm, and a different set of clustered document fields.+The active engine can be selected by passing `clustering.engine=_name_` parameter at runtime (via URL) or as the default within the search handler's configuration, as shown below:[source,xml]----@@ -289,13 +297,24 @@ as shown below:Each declared engine can be configured using a number of parameters described below.-`clustering.fields` (_required_)::-A comma (or space) separated list of text fields which should contain the text-content for clustering.+`clustering.fields`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++A comma (or space) separated list of text fields which should contain the text content for clustering.At least one field must be provided.The fields are separate from search handler's `fl` parameter so that clustered fields don't have to be included in the response.-`clustering.algorithm` (_required_)::+`clustering.algorithm`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The clustering algorithm is the actual logic (implementation) that discovers relationships among the documents and forms human-readable cluster labels.This parameter sets the name of the clustering algorithm this engine is going to use.Algorithms are supplied to Solr via Carrot^2^-defined service extension.@@ -314,26 +333,46 @@ For a comparison of characteristics of these algorithms see the following links:* https://carrotsearch.com/lingo3g-comparison.htmlThe clustering component lists all available algorithms, languages and algorithm-language compatibility at startup.-You can peek at startup logs to see what's available-in your Solr installation.+You can peek at startup logs to see what's available in your Solr installation.****`clustering.maxLabels`::-Maximum number of returned cluster labels (if the algorithm returns more labels, the list will-be truncated).+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Maximum number of returned cluster labels (if the algorithm returns more labels, the list will be truncated).By default all labels are returned.`clustering.includeSubclusters`::-If `true`, sub-clusters are included in the response for algorithms that support hierarchical-clustering.+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++If `true`, sub-clusters are included in the response for algorithms that support hierarchical clustering.`false` causes only top-level clusters to be returned.`clustering.includeOtherTopics`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++If `true`, a synthetic cluster called _Other Topics_, consisting of all documents not assigned to any other cluster is formed and returned.-The default value of this parameter is `true` but if- there is no need for this synthetic cluster, it can be set to `false`.+If there is no need for this synthetic cluster, it can be set to `false`.`clustering.resources`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Location of algorithm-specific resources and configuration files (stop words, other lexical resources, default settings).This property is `null` by default and all resources are read from their respective algorithm default resource pool (JARs).If this property is not empty, it resolves relative to Solr core's configuration directory.@@ -353,12 +392,30 @@ We recommend using query contexts when fields contain a lot of content (this wouThe following three properties control whether the context or full content are processed and how snippets are formed for clustering.`clustering.preferQueryContext`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++If `true`, the engine will try to extract context around the query matching regions and use these contexts as input for the clustering algorithm.`clustering.contextSize`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The maximum size, in characters, of each snippet created by the context retrieval algorithm (internal highlighter).`clustering.contextCount`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The maximum number of different, non-contiguous snippets from a single field.=== Default Clustering Language@@ -369,11 +426,22 @@ This can be done in two ways -- by passing the name of the default language or bThe following two engine configuration parameters control this:`clustering.language`::+++[%autowidth,frame=none]+|===+|Optional |Default: `English`+|===++Name of the default language to use for clustering.-The default value of this field is `English`.The provided language must be available and the clustering algorithm must support it.`clustering.languageField`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Name of the document field that stores the document's language.If the field does not exist for a document or the value is blank, the default language is used.diff --git a/solr/solr-ref-guide/src/result-grouping.adoc b/solr/solr-ref-guide/src/result-grouping.adocindex 4fe12f608a4..d3ddf1eab2b 100644--- a/solr/solr-ref-guide/src/result-grouping.adoc+++ b/solr/solr-ref-guide/src/result-grouping.adoc@@ -64,77 +64,165 @@ Result Grouping takes the following request parameters.Any number of these request parameters can be included in a single request:`group`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, query results will be grouped.`group.field`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The name of the field by which to group results.The field must be single-valued, and either be indexed or a field type that has a value source and works in a function query, such as `ExternalFileField`.-It must also be a string-based field, such as `StrField` or `TextField`+It must also be a string-based field, such as `StrField` or `TextField`.`group.func`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Group based on the unique values of a function query.+NOTE: This option does not work with <<Distributed Result Grouping Caveats,distributed searches>>.`group.query`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Return a single group of documents that match the given query.`rows`::+++[%autowidth,frame=none]+|===+|Optional |Default: `10`+|===++The number of groups to return.-The default value is `10`.`start`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Specifies an initial offset for the list of groups.`group.limit`::+++[%autowidth,frame=none]+|===+|Optional |Default: `1`+|===++Specifies the number of results to return for each group.-The default value is `1`.`group.offset`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Specifies an initial offset for the document list of each group.`sort`::+++[%autowidth,frame=none]+|===+|Optional |Default: `score desc`+|===++Specifies how Solr sorts the groups relative to each other.For example, `sort=popularity desc` will cause the groups to be sorted according to the highest popularity document in each group.-The default value is `score desc`.`group.sort`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++Specifies how Solr sorts documents within each group.The default behavior if `group.sort` is not specified is to use the same effective value as the `sort` parameter.`group.format`::+++[%autowidth,frame=none]+|===+|Optional |Default: `grouped`+|===++If this parameter is set to `simple`, the grouped documents are presented in a single flat list, and the `start` and `rows` parameters affect the numbers of documents instead of groups.An alternate value for this parameter is `grouped`.`group.main`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++If `true`, the result of the first field grouping command is used as the main result list in the response, using `group.format=simple`.`group.ngroups`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, Solr includes the number of groups that have matched the query in the results.-The default value is false.+See below for <<Distributed Result Grouping Caveats>> when using sharded indexes.`group.truncate`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, facet counts are based on the most relevant document of each group matching the query.-The default value is `false`.`group.facet`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++Determines whether to compute grouped facets for the field facets specified in facet.field parameters.Grouped facets are computed based on the first specified group.As with normal field faceting, fields shouldn't be tokenized (otherwise counts are computed for each token).Grouped faceting supports single and multivalued fields.-Default is `false`.+WARNING: There can be a heavy performance cost to this option.+See below for <<Distributed Result Grouping Caveats>> when using sharded indexes.`group.cache.percent`::-Setting this parameter to a number greater than 0 enables caching for result grouping.+++[%autowidth,frame=none]+|===+|Optional |Default: `0`+|===+++Setting this parameter to a number greater than `0` enables caching for result grouping.Result Grouping executes two searches; this option caches the second search.-The default value is `0`.-The maximum value is `100`.+Testing has shown that group caching only improves search time with Boolean, wildcard, and fuzzy queries.For simple queries like term or "match all" queries, group caching degrades performance.diff --git a/solr/solr-ref-guide/src/schema-api.adoc b/solr/solr-ref-guide/src/schema-api.adocindex 81250a99e97..a90f46614bd 100644--- a/solr/solr-ref-guide/src/schema-api.adoc+++ b/solr/solr-ref-guide/src/schema-api.adoc@@ -490,14 +490,30 @@ The `add-copy-field` command adds a new copy field rule to your schema.The attributes supported by the command are the same as when creating copy field rules by manually editing the `schema.xml`, as below:`source`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The source field.-This parameter is required.`dest`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++A field or an array of fields to which the source field will be copied.-This parameter is required.`maxChars`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The upper limit for the number of characters to be copied.The section <<copy-fields.adoc#,Copy Fields>> has more details.@@ -636,7 +652,7 @@ curl -X POST -H 'Content-type:application/json' --data-binary '{}' http://localhost:8983/solr/techproducts/schema-----=== Schema Changes among Replicas+=== Schema Changes Among ReplicasWhen running in SolrCloud mode, changes made to the schema on one node will propagate to all replicas in the collection.@@ -667,6 +683,12 @@ To modify the schema, see the previous section <<Modify the Schema>>.*Path Parameters*`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The collection (or core) name.*Query Parameters*@@ -674,9 +696,14 @@ The collection (or core) name.The query parameters should be added to the API request after '?'.`wt`::+++[%autowidth,frame=none]+|===+|Optional |Default: `json`+|===++Defines the format of the response.-The options are *json*, *xml* or *schema.xml*.-If not specified, JSON will be returned by default.+The options are `json`, `xml` or `schema.xml`.==== Retrieve Schema Response@@ -845,9 +872,21 @@ Get a list of all fields.*Path Parameters*`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The collection (or core) name.`fieldname`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The specific fieldname (if limiting the request to a single field).*Query Parameters*@@ -855,24 +894,47 @@ The specific fieldname (if limiting the request to a single field).The query parameters can be added to the API request after a '?'.`wt`::+++[%autowidth,frame=none]+|===+|Optional |Default: `json`+|===++Defines the format of the response.The options are `json` or `xml`.-If not specified, JSON will be returned by default.`fl`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Comma- or space-separated list of one or more fields to return.If not specified, all fields will be returned by default.`includeDynamic`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, and if the `fl` query parameter is specified or the `fieldname` path parameter is used, matching dynamic fields are included in the response and identified with the `dynamicBase` property.+If neither the `fl` query parameter nor the `fieldname` path parameter is specified, the `includeDynamic` query parameter is ignored.+-If `false`, the default, matching dynamic fields will not be returned.+If `false`, matching dynamic fields will not be returned.`showDefaults`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, all default field properties from each field's field type will be included in the response (e.g., `tokenized` for `solr.TextField`).-If `false`, the default, only explicitly specified field properties will be included.+If `false`, only explicitly specified field properties will be included.==== List Fields Response@@ -951,9 +1013,21 @@ The sample output below has been truncated to only show a few fields.*Path Parameters*`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The collection (or core) name.`name`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The name of the dynamic field rule (if limiting request to a single dynamic field rule).*Query Parameters*@@ -961,13 +1035,24 @@ The name of the dynamic field rule (if limiting request to a single dynamic fielThe query parameters can be added to the API request after a '?'.`wt`::+++[%autowidth,frame=none]+|===+|Optional |Default: `json`+|===++Defines the format of the response.The options are `json` or `xml`.-If not specified, JSON will be returned by default.`showDefaults`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, all default field properties from each dynamic field's field type will be included in the response (e.g., `tokenized` for `solr.TextField`).-If `false`, the default, only explicitly specified field properties will be included.+If `false`, only explicitly specified field properties will be included.==== List Dynamic Field Response@@ -1056,9 +1141,21 @@ The sample output below has been truncated.*Path Parameters*`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The collection (or core) name.`name`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The name of the field type (if limiting request to a single field type).*Query Parameters*@@ -1066,13 +1163,24 @@ The name of the field type (if limiting request to a single field type).The query parameters can be added to the API request after a '?'.`wt`::+++[%autowidth,frame=none]+|===+|Optional |Default: `json`+|===++Defines the format of the response.The options are `json` or `xml`.-If not specified, JSON will be returned by default.`showDefaults`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, all default field properties from each dynamic field's field type will be included in the response (e.g., `tokenized` for `solr.TextField`).-If `false`, the default, only explicitly specified field properties will be included.+If `false`, only explicitly specified field properties will be included.==== List Field Type Response@@ -1165,6 +1273,12 @@ The sample output below has been truncated to show a few different field types f*Path Parameters*`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The collection (or core) name.*Query Parameters*@@ -1172,16 +1286,33 @@ The collection (or core) name.The query parameters can be added to the API request after a '?'.`wt`::+++[%autowidth,frame=none]+|===+|Optional |Default: `json`+|===++Defines the format of the response.The options are `json` or `xml`.-If not specified, JSON will be returned by default.`source.fl`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Comma- or space-separated list of one or more copyField source fields to include in the response.CopyField directives with all other source fields will be excluded from the response.If not specified, all copyField-s will be included in the response.`dest.fl`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Comma- or space-separated list of one or more copyField destination fields to include in the response.CopyField directives with all other `dest` fields will be excluded.If not specified, all copyField-s will be included in the response.@@ -1255,6 +1386,12 @@ The sample output below has been truncated to the first few copy definitions.*Path Parameters*`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The collection (or core) name.*Query Parameters*@@ -1262,9 +1399,14 @@ The collection (or core) name.The query parameters can be added to the API request after a '?'.`wt`::+++[%autowidth,frame=none]+|===+|Optional |Default: `json`+|===++Defines the format of the response.The options are `json` or `xml`.-If not specified, JSON will be returned by default.==== Show Schema Response@@ -1314,6 +1456,12 @@ curl -X GET "http://localhost:8983/api/collections/techproducts/schema/name"*Path Parameters*`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The collection (or core) name.*Query Parameters*@@ -1321,9 +1469,14 @@ The collection (or core) name.The query parameters can be added to the API request after a '?'.`wt`::+++[%autowidth,frame=none]+|===+|Optional |Default: `json`+|===++Defines the format of the response.The options are `json` or `xml`.-If not specified, JSON will be returned by default.==== Show Schema Version Response@@ -1371,18 +1524,28 @@ curl -X GET "http://localhost:8983/api/collections/techproducts/schema/version"*Path Parameters*-|`collection`::+`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The collection (or core) name.-*Query Parameters*The query parameters can be added to the API request after a '?'.`wt`::+++[%autowidth,frame=none]+|===+|Optional |Default: `json`+|===++Defines the format of the response.The options are `json` or `xml`.-If not specified, JSON will be returned by default.==== List UniqueKey Response@@ -1431,6 +1594,12 @@ curl -X GET "http://localhost:8983/api/collections/techproducts/schema/uniquekey*Path Parameters*`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The collection (or core) name.*Query Parameters*@@ -1438,9 +1607,14 @@ The collection (or core) name.The query parameters can be added to the API request after a '?'.`wt`::+++[%autowidth,frame=none]+|===+|Optional |Default: `json`+|===++Defines the format of the response.The options are `json` or `xml`.-If not specified, JSON will be returned by default.==== Show Global Similary Responsediff --git a/solr/solr-ref-guide/src/schema-factory.adoc b/solr/solr-ref-guide/src/schema-factory.adocindex 125054e7fa9..05b60b4f65d 100644--- a/solr/solr-ref-guide/src/schema-factory.adoc+++ b/solr/solr-ref-guide/src/schema-factory.adoc@@ -61,12 +61,24 @@ Below is an example of a `schemaFactory` that reflects Solr's defaults:The defaults can be overridden by explicitly configuring `ManagedIndexSchemaFactory` and changing one of the following options:`mutable`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++Controls whether changes may be made to the schema data.This must be set to `true` to allow edits to be made with the Schema API.+With the default configuration shown above, you could use the <<schema-api.adoc#,Schema API>> to modify the schema as much as you want, and then later change the value of `mutable` to `false` to "lock" the schema in place and prevent future changes.`managedSchemaResourceName`::+++[%autowidth,frame=none]+|===+|Optional |Default: `managed-schema`+|===++The name of the schema file.The name can be anything other than `schema.xml`, as that name is reserved for the `ClassicIndexSchemaFactory`.diff --git a/solr/solr-ref-guide/src/script-update-processor.adoc b/solr/solr-ref-guide/src/script-update-processor.adocindex a2ca37c800d..ed535d549b4 100644--- a/solr/solr-ref-guide/src/script-update-processor.adoc+++ b/solr/solr-ref-guide/src/script-update-processor.adoc@@ -61,21 +61,38 @@ However, it is also possible to skip this level and configure the parameters dirBelow follows a list of each configuration parameters and their meaning:`script`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The script file name.-The script file must be placed in the `conf/ directory.+The script file must be placed in the `conf/` directory.There can be one or more "script" parameters specified; multiple scripts are executed in the order specified.`engine`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Optionally specifies the scripting engine to use.This is only needed if the extension of the script file is not a standard mapping to the scripting engine.-For example, if your script file was coded in JavaScript but the file name was called `update-script.foo`, use "javascript" as the engine name.+For example, if your script file was coded in JavaScript but the file name was called `update-script.foo`, use `javascript` as the engine name.`params`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Optional parameters that are passed into the script execution context.This is specified as a named list (`<lst>`) structure with nested typed parameters.If specified, the script context will get a "params" object, otherwise there will be no "params" object available.-== Script Execution ContextEvery script has some variables provided to it.@@ -202,7 +219,7 @@ end==== Known Issues-The following in JRuby does not work as expected for some reason, though it does work properly in JavaScript:+The following in JRuby does not work as expected, though it does work properly in JavaScript:[source,ruby]----diff --git a/solr/solr-ref-guide/src/shard-management.adoc b/solr/solr-ref-guide/src/shard-management.adocindex f6e31a704ac..f84f7d4f45b 100644--- a/solr/solr-ref-guide/src/shard-management.adoc+++ b/solr/solr-ref-guide/src/shard-management.adoc@@ -113,20 +113,44 @@ In order to avoid timeouts, you should run this as an <<collections-api.adoc#asy=== SPLITSHARD Parameters`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the collection that includes the shard to be split.This parameter is required.`shard`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The name of the shard to be split.This parameter is required when `split.key` is not specified.`ranges`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A comma-separated list of hash ranges in hexadecimal, such as `ranges=0-1f4,1f5-3e8,3e9-5dc`.+This parameter can be used to divide the original shard's hash range into arbitrary hash range intervals specified in hexadecimal.For example, if the original hash range is `0-1500` then adding the parameter: `ranges=0-1f4,1f5-3e8,3e9-5dc` will divide the original shard into three shards with hash range `0-500`, `501-1000`, and `1001-1500` respectively.`split.key`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The key to use for splitting the index.+This parameter can be used to split a shard using a route key such that all documents of the specified route key end up in a single dedicated sub-shard.@@ -138,35 +162,84 @@ Splitting by this route key would yield three sub-shards with ranges `0-11`, `12Note that the sub-shard with the hash range of the route key may also contain documents for other route keys whose hash ranges overlap.`numSubShards`::+++[%autowidth,frame=none]+|===+|Optional |Default: `2`+|===++The number of sub-shards to split the parent shard into.-Allowed values for this are in the range of `2`-`8` and defaults to `2`.+Allowed values for this are in the range of `2`-`8`.+This parameter can only be used when `ranges` or `split.key` are not specified.`splitMethod`::+++[%autowidth,frame=none]+|===+|Optional |Default: `rewrite`+|===++Currently two methods of shard splitting are supported:-* `splitMethod=rewrite` (default) after selecting documents to retain in each partition this method creates sub-indexes from scratch, which is a lengthy CPU- and I/O-intensive process but results in optimally-sized sub-indexes that don't contain any data from documents not belonging to each partition.-* `splitMethod=link` uses file system-level hard links for creating copies of the original index files and then only modifies the file that contains the list of deleted documents in each partition.+* `rewrite`: After selecting documents to retain in each partition this method creates sub-indexes from scratch, which is a lengthy CPU- and I/O-intensive process but results in optimally-sized sub-indexes that don't contain any data from documents not belonging to each partition.+* `link`: Uses filesystem-level hard links for creating copies of the original index files and then only modifies the file that contains the list of deleted documents in each partition.This method is many times quicker and lighter on resources than the `rewrite` method but the resulting sub-indexes are still as large as the original index because they still contain data from documents not belonging to the partition.This slows down the replication process and consumes more disk space on replica nodes (the multiple hard-linked copies don't occupy additional disk space on the leader node, unless hard-linking is not supported).`splitFuzz`::-A float value (default is 0.0f, must be smaller than 0.5f) that allows to vary the sub-shard ranges by this percentage of total shard range, odd shards being larger and even shards being smaller.+++[%autowidth,frame=none]+|===+|Optional |Default: `0.0`+|===+++A float value which must be smaller than `0.5` that allows to vary the sub-shard ranges by this percentage of total shard range, odd shards being larger and even shards being smaller.`property._name_=_value_`::-Set core property _name_ to _value_. See the section <<core-discovery.adoc#,Core Discovery>> for details on supported properties and values.+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Set core property _name_ to _value_.+See the section <<core-discovery.adoc#,Core Discovery>> for details on supported properties and values.`waitForFinalState`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, the request will complete only when all affected replicas become active.-The default is `false`, which means that the API will return the status of the single action, which may be before the new replica is online and active.+If `false`, the API will return the status of the single action, which may be before the new replica is online and active.`timing`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true` then each stage of processing will be timed and a `timing` section will be included in response.`async`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>`splitByPrefix`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, the split point will be selected by taking into account the distribution of compositeId values in the shard.A compositeId has the form `<prefix>!<suffix>`, where all documents with the same prefix are colocated on in the hash space.If there are multiple prefixes in the shard being split, then the split point will be selected to divide up the prefixes into as equal sized shards as possible without splitting any prefix.@@ -270,36 +343,94 @@ This can be customized by explicitly passing the corresponding parameters to the=== CREATESHARD Parameters`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The name of the collection that includes the shard to be split.-This parameter is required.`shard`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The name of the shard to be created.-This parameter is required.`createNodeSet`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Allows defining the nodes to spread the new collection across.If not provided, the CREATESHARD operation will create shard-replica spread across all live Solr nodes.+The format is a comma-separated list of node_names, such as `localhost:8983_solr,localhost:8984_solr,localhost:8985_solr`.`nrtReplicas`::-The number of `nrt` replicas that should be created for the new shard (optional, the defaults for the collection is used if omitted)+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===+++The number of `nrt` replicas that should be created for the new shard.+The defaults for the collection are used if omitted.`tlogReplicas`::-The number of `tlog` replicas that should be created for the new shard (optional, the defaults for the collection is used if omitted)+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===+++The number of `tlog` replicas that should be created for the new shard.+The defaults for the collection are used if omitted.`pullReplicas`::-The number of `pull` replicas that should be created for the new shard (optional, the defaults for the collection is used if omitted)+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===+++The number of `pull` replicas that should be created for the new shard.+The defaults for the collection are used if omitted.`property._name_=_value_`::-Set core property _name_ to _value_. See the section <<core-discovery.adoc#,Core Discovery>> for details on supported properties and values.+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Set core property _name_ to _value_.+See the section <<core-discovery.adoc#,Core Discovery>> for details on supported properties and values.`waitForFinalState`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, the request will complete only when all affected replicas become active.-The default is `false`, which means that the API will return the status of the single action, which may be before the new replica is online and active.+If `false`, the API will return the status of the single action, which may be before the new replica is online and active.`async`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>.=== CREATESHARD Response@@ -348,26 +479,60 @@ curl -X DELETE http://localhost:8983/api/collections/techproducts/shards/shard1?=== DELETESHARD Parameters`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the collection that includes the shard to be deleted.-This parameter is required.`shard`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the shard to be deleted.-This parameter is required.`deleteInstanceDir`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++By default Solr will delete the entire instanceDir of each replica that is deleted.Set this to `false` to prevent the instance directory from being deleted.`deleteDataDir`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++By default Solr will delete the dataDir of each replica that is deleted.Set this to `false` to prevent the data directory from being deleted.`deleteIndex`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++By 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`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Request ID to track this action which will be <<collections-api.adoc#asynchronous-calls,processed asynchronously>>.=== DELETESHARD Response@@ -437,10 +602,22 @@ curl -X POST http://localhost:8983/api/collections/techproducts/shards/shard1 -H=== FORCELEADER Parameters`collection`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the collection.This parameter is required.`shard`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the shard where leader election should occur.This parameter is required.diff --git a/solr/solr-ref-guide/src/solr-control-script-reference.adoc b/solr/solr-ref-guide/src/solr-control-script-reference.adocindex 64c9608dbb0..db956c9f1e4 100644--- a/solr/solr-ref-guide/src/solr-control-script-reference.adoc+++ b/solr/solr-ref-guide/src/solr-control-script-reference.adoc@@ -52,64 +52,112 @@ The `bin/solr` script provides many options to allow you to customize the serverHowever, most of the defaults are adequate for most Solr installations, especially when just getting started.`-a "<string>"`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Start Solr with additional JVM parameters, such as those starting with `-X`.If you are passing JVM parameters that begin with `-D`, you can omit the `-a` option.-++*Example*:-++[source,bash]bin/solr start -a "-Xdebug -Xrunjdwp:transport=dt_socket, server=y,suspend=n,address=1044"`-cloud` or `-c`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Start Solr in SolrCloud mode, which will also launch the embedded ZooKeeper instance included with Solr.+This option can be shortened to simply `-c`.+-If you are already running a ZooKeeper ensemble that you want to use instead of the embedded (single-node) ZooKeeper, you should also either specify `ZK_HOST` in `solr.in.sh`/`solr.in.cmd` (see <<zookeeper-ensemble#updating-solr-include-files,instructions>>) or pass the -z parameter.+If you are already running a ZooKeeper ensemble that you want to use instead of the embedded (single-node) ZooKeeper, you should also either specify `ZK_HOST` in `solr.in.sh`/`solr.in.cmd` (see <<zookeeper-ensemble#updating-solr-include-files,instructions>>) or pass the `-z` parameter.+For more details, see the section <<SolrCloud Mode>> below.+*Example*: `bin/solr start -c``-d <dir>`::+++[%autowidth,frame=none]+|===+|Optional |Default: `server/`+|===++Define a server directory, defaults to `server` (as in, `$SOLR_HOME/server`).It is uncommon to override this option.-When running multiple instances of Solr on the same host, it is more common to use the same server directory for each instance and use a unique Solr home directory using the -s option.+When running multiple instances of Solr on the same host, it is more common to use the same server directory for each instance and use a unique Solr home directory using the `-s` option.+*Example*: `bin/solr start -d newServerDir``-e <name>`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Start Solr with an example configuration.These examples are provided to help you get started faster with Solr generally, or just try a specific feature.+The available options are:-* cloud-* techproducts-* schemaless+* `cloud`+* `techproducts`+* `schemaless`+See the section <<Running with Example Configurations>> below for more details on the example configurations.+*Example*: `bin/solr start -e schemaless``-f`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Start Solr in the foreground.You cannot use this option when running examples with the `-e` option.+*Example*: `bin/solr start -f``-h <hostname>`::+++[%autowidth,frame=none]+|===+|Optional |Default: `localhost`+|===++Start Solr with the defined hostname.-If this is not specified, `localhost` will be assumed.+If this is not specified, `localhost` is assumed.+*Example*: `bin/solr start -h search.mysolr.com``-m <memory>`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Start Solr with the defined value as the min (`-Xms`) and max (`-Xmx`) heap size for the JVM.+*Example*: `bin/solr start -m 1g``-noprompt`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Start Solr and suppress any prompts that may be seen with another option.This would have the side effect of accepting all defaults implicitly.+@@ -119,30 +167,53 @@ If you want to accept all of the defaults, you can simply add the `-noprompt` op*Example*: `bin/solr start -e cloud -noprompt``-p <port>`::+++[%autowidth,frame=none]+|===+|Optional |Default: `8983`+|===++Start Solr on the defined port.If this is not specified, `8983` will be used.+*Example*: `bin/solr start -p 8655``-s <dir>`::+++[%autowidth,frame=none]+|===+|Optional |Default: `server/solr`+|===++Sets the `solr.solr.home` system property.Solr will create core directories under this directory.This allows you to run multiple Solr instances on the same host while reusing the same server directory set using the `-d` parameter.+If set, the specified directory should contain a `solr.xml` file, unless `solr.xml` exists in ZooKeeper.-The default value is `server/solr`.+This parameter is ignored when running examples (`-e`), as the `solr.solr.home` depends on which example is run.+*Example*: `bin/solr start -s newHome``-v`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Be more verbose.This changes the logging level of Log4j from `INFO` to `DEBUG`, having the same effect as if you edited `log4j2.xml`.+*Example*: `bin/solr start -f -v``-q`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Be more quiet.This changes the logging level of Log4j from `INFO` to `WARN`, having the same effect as if you edited `log4j2.xml`.This can be useful in a production setting where you want to limit logging to warnings and errors.@@ -150,11 +221,23 @@ This can be useful in a production setting where you want to limit logging to wa*Example*: `bin/solr start -f -q``-V`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Start Solr with verbose messages from the start script.+*Example*: `bin/solr start -V``-z <zkHost>`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++Start Solr with the defined ZooKeeper connection string.+This option is only used with the `-c` option, to start Solr in SolrCloud mode.@@ -163,6 +246,12 @@ If `ZK_HOST` is not specified in `solr.in.sh`/`solr.in.cmd` and this option is n*Example*: `bin/solr start -c -z server1:2181,server2:2181``-force`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++If attempting to start Solr as the root user, the script will exit with a warning that running Solr as "root" can cause problems.It is possible to override this warning with the `-force` parameter.+@@ -255,17 +344,35 @@ The command will wait up to 180 seconds for Solr to stop gracefully and then wil==== Stop Parameters`-p <port>`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Stop Solr running on the given port.If you are running more than one instance, or are running in SolrCloud mode, you either need to specify the ports in separate requests or use the `-all` option.+*Example*: `bin/solr stop -p 8983``-all`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Stop all running Solr instances that have a valid PID.+*Example*: `bin/solr stop -all``-k <key>`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Stop key used to protect from stopping Solr inadvertently; default is "solrrocks".+*Example*: `bin/solr stop -k solrrocks`@@ -352,12 +459,24 @@ The health report provides information about the state of every replica for all==== Healthcheck Parameters`-c <collection>`::- Name of the collection to run a healthcheck against (required).+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++ Name of the collection to run a healthcheck against.+*Example*: `bin/solr healthcheck -c gettingstarted``-z <zkhost>`::-ZooKeeper connection string, defaults to `localhost:9983`.+++[%autowidth,frame=none]+|===+|Optional |Default: `localhost:9983`+|===+++ZooKeeper connection string.If you are running Solr on a port other than 8983, you will have to specify the ZooKeeper connection string.By default, this will be the Solr port + 1000.This parameter is unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.@@ -433,25 +552,48 @@ When running a user-managed cluster or a single-node installation, a core would==== Create Core or Collection Parameters`-c <name>`::-Name of the core or collection to create (required).+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++Name of the core or collection to create.+*Example*: `bin/solr create -c mycollection``-d <confdir>`::+++[%autowidth,frame=none]+|===+|Optional |Default: `_default`+|===++The configuration directory.-This defaults to `_default`.+See the section <<Configuration Directories and SolrCloud>> below for more details about this option when running in SolrCloud mode.+*Example*: `bin/solr create -d _default``-n <configName>`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++The configuration name.This defaults to the same name as the core or collection.+*Example*: `bin/solr create -n basic``-p <port>`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++The port of a local Solr instance to send the create command to.By default the script tries to detect the port by looking for running Solr instances.+@@ -460,18 +602,36 @@ This option is useful if you are running multiple Solr instances on the same hos*Example*: `bin/solr create -p 8983``-s <shards>` or `-shards`::-Number of shards to split a collection into, default is `1`.+++[%autowidth,frame=none]+|===+|Optional |Default: `1`+|===+++Number of shards to split a collection into.Only applies when Solr is running in SolrCloud mode.+*Example*: `bin/solr create -s 2``-rf <replicas>` or `-replicationFactor`::+++[%autowidth,frame=none]+|===+|Optional |Default: `1`+|===++Number of copies of each document in the collection.The default is `1` (no replication).+*Example*: `bin/solr create -rf 2``-force`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++If attempting to run create as "root" user, the script will exit with a warning that running Solr or actions against Solr as "root" can cause problems.It is possible to override this warning with the -force parameter.+@@ -536,19 +696,36 @@ If not, then the `/configs/contacts` directory is removed from ZooKeeper.==== Delete Core or Collection Parameters`-c <name>`::-Name of the core or collection to delete (required).+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++Name of the core or collection to delete.+*Example*: `bin/solr delete -c mycoll``-deleteConfig`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++Whether or not the configuration directory should also be deleted from ZooKeeper.-The default is `true`.+If the configuration directory is being used by another collection, then it will not be deleted even if you pass `-deleteConfig` as `true`.+*Example*: `bin/solr delete -deleteConfig false``-p <port>`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++The port of a local Solr instance to send the delete command to.By default the script tries to detect the port by looking for running Solr instances.+@@ -606,33 +783,75 @@ SOLR_AUTHENTICATION_OPTS="-Dsolr.httpclient.config=/path/to/solr-{solr-docs-versThe command takes the following parameters:`-credentials`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The username and password in the format of `username:password` of the initial user.+If you prefer not to pass the username and password as an argument to the script, you can choose the `-prompt` option.Either `-credentials` or `-prompt` *must* be specified.`-prompt`::-If prompt is preferred, pass *true* as a parameter to request the script to prompt the user to enter a username and password.+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++If prompt is preferred, pass `true` as a parameter to request the script to prompt the user to enter a username and password.+Either `-credentials` or `-prompt` *must* be specified.`-blockUnknown`::-When *true*, blocks all unauthenticated users from accessing Solr.-When *false*,unauthenticated users will still be able to access Solr, but only for operations not explicitly requiring a user role in the Authorization plugin configuration.+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++When `true`, blocks all unauthenticated users from accessing Solr.+When `false`, unauthenticated users will still be able to access Solr, but only for operations not explicitly requiring a user role in the Authorization plugin configuration.`-updateIncludeFileOnly`::-When *true*, only the settings in `bin/solr.in.sh` or `bin\solr.in.cmd` will be updated, and `security.json` will not be created.+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===+++When `true`, only the settings in `bin/solr.in.sh` or `bin\solr.in.cmd` will be updated, and `security.json` will not be created.`-z`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Defines the ZooKeeper connect string.This is useful if you want to enable authentication before all your Solr nodes have come up.Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.`-d`::+++[%autowidth,frame=none]+|===+|Optional |Default: `$SOLR_HOME/server`+|===++Defines the Solr server directory, by default `$SOLR_HOME/server`.It is not common to need to override the default, and is only needed if you have customized the `$SOLR_HOME` directory path.`-s`::+++[%autowidth,frame=none]+|===+|Optional |Default: `server/solr`+|===++Defines the location of `solr.solr.home`, which by default is `server/solr`.If you have multiple instances of Solr on the same host, or if you have customized the `$SOLR_HOME` directory path, you likely need to define this.@@ -680,25 +899,67 @@ To unset a previously set user-defined property, specify `-action unset-user-pro=== Config Parameters`-c <name>`::-Name of the core or collection on which to change configuration (required).+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++Name of the core or collection on which to change configuration.`-action <name>`::-Config API action, one of: `set-property`, `unset-property`, `set-user-property`, `unset-user-property`; defaults to `set-property`.+++[%autowidth,frame=none]+|===+|Optional |Default: `set-property`+|===+++Config API action, one of: `set-property`, `unset-property`, `set-user-property`, `unset-user-property`.`-property <name>`::-Name of the property to change (required).+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++Name of the property to change.`-value <new-value>`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Set the property to this value.`-z <zkHost>`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The ZooKeeper connection string, usable in SolrCloud mode.Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.`-p <port>`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++`localhost` port of the Solr node to use when applying the configuration change.`-solrUrl <url>`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Base Solr URL, which can be used in SolrCloud mode to determine the ZooKeeper connection string if that's not known.== ZooKeeper Operations@@ -724,6 +985,12 @@ Use the `zk upconfig` command to upload one of the pre-configured configurationAll parameters below are required.`-n <name>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++Name of the configuration set in ZooKeeper.This command will upload the configuration set to the "configs" ZooKeeper node giving it the name specified.+@@ -735,6 +1002,12 @@ If a pre-existing configuration set is specified, it will be overwritten in ZooK*Example*: `-n myconfig``-d <configset dir>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The path of the configuration set to upload.It should have a `conf` directory immediately below it that in turn contains `solrconfig.xml` etc.+@@ -747,8 +1020,14 @@ An absolute path may be supplied instead.* `-d /path/to/configset/source``-z <zkHost>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The ZooKeeper connection string.-Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.+Is not required if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.+*Example*: `-z 123.321.23.43:2181`@@ -774,12 +1053,24 @@ Use the `zk downconfig` command to download a configuration set from ZooKeeper tAll parameters listed below are required.`-n <name>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++Name of the configset in ZooKeeper to download.The Admin UI Cloud -> Tree -> configs node lists all available configuration sets.+*Example*: `-n myconfig``-d <configset dir>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The path to write the downloaded configuration set into.If just a name is supplied, `$SOLR_HOME/server/solr/configsets` will be the parent.An absolute path may be supplied as well.@@ -792,6 +1083,12 @@ In either case, _pre-existing configurations at the destination will be overwrit* `-d /path/to/configset/destination``-z <zkHost>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The ZooKeeper connection string.Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.+@@ -813,13 +1110,24 @@ This command will copy from the local drive to ZooKeeper, from ZooKeeper to the==== ZK Copy Parameters`-r`::-Optional.+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Do a recursive copy.-The command will fail if the <src> has children unless '-r' is specified.+The command will fail if the `<src>` has children unless `-r` is specified.+*Example*: `-r``<src>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The file or path to copy from.If prefixed with `zk:` then the source is presumed to be ZooKeeper.If no prefix or the prefix is `file`: this is the local drive.@@ -831,6 +1139,12 @@ At least one of `<src>` or `<dest>` must be prefixed by `'zk:'` or the command w* `file:/Users/apache/configs/src``<dest>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The file or path to copy to.If prefixed with `zk:` then the source is presumed to be ZooKeeper.If no prefix or the prefix is `file:` this is the local drive.@@ -844,8 +1158,14 @@ If `<dest>` ends in a slash character it names a directory.* `file:/Users/apache/configs/src``-z <zkHost>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The ZooKeeper connection string.-Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.+Optional if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.+*Example*: `-z 123.321.23.43:2181`@@ -866,13 +1186,24 @@ Use the `zk rm` command to remove a znode (and optionally all child nodes) from==== ZK Remove Parameters`-r`::-Optional.+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Do a recursive removal.The command will fail if the `<path>` has children unless `-r` is specified.+*Example*: `-r``<path>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The path to remove from ZooKeeper, either a parent or leaf node.+There are limited safety checks, you cannot remove `/` or `/zookeeper` nodes.@@ -886,8 +1217,14 @@ The path is assumed to be a ZooKeeper node, no `zk:` prefix is necessary.* `/configs/myconfigset/solrconfig.xml``-z <zkHost>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The ZooKeeper connection string.-Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.+Optional if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.+*Example*: `-z 123.321.23.43:2181`@@ -905,18 +1242,36 @@ Use the `zk mv` command to move (rename) a ZooKeeper znode.==== ZK Move Parameters`<src>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The znode to rename.The `zk:` prefix is assumed.+*Example*: `/configs/oldconfigset``<dest>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The new name of the znode.The `zk:` prefix is assumed.+*Example*: `/configs/newconfigset``-z <zkHost>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The ZooKeeper connection string.Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.+@@ -934,19 +1289,36 @@ Use the `zk ls` command to see the children of a znode.==== ZK List Parameters`-r`::-Optional.+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Recursively list all descendants of a znode.+*Example*: `-r``<path>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The path on ZooKeeper to list.+*Example*: `/collections/mycollection``-z <zkHost>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The ZooKeeper connection string.-Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.+Optional if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.+*Example*: `-z 123.321.23.43:2181`@@ -966,6 +1338,12 @@ However, it can also be used to create arbitrary paths.==== Create znode Parameters`<path>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The path on ZooKeeper to create.Intermediate znodes will be created if necessary.A leading slash is assumed even if not specified.@@ -973,8 +1351,14 @@ A leading slash is assumed even if not specified.*Example*: `/solr``-z <zkHost>`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The ZooKeeper connection string.-Unnecessary if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.+Optional if `ZK_HOST` is defined in `solr.in.sh` or `solr.in.cmd`.+*Example*: `-z 123.321.23.43:2181`@@ -984,7 +1368,6 @@ Examples of this command:`bin/solr zk mkroot /solr/production`-== Exporting Documents to a FileThe `export` command will allow you to export documents from a collection in either JSON or Javabin format.@@ -996,25 +1379,68 @@ All documents can be exported, or only those that match a query.The `bin/solr export` command takes the following parameters:+`url`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++Fully-qualified address to a collection.+++*Example*: `-url http://localhost:8983/solr/techproducts`+`format`::-The file format of the export, `jsonl` (default) or `javabin`.+++[%autowidth,frame=none]+|===+|Optional |Default: `jsonl`+|===+++The file format of the export, `jsonl` or `javabin`.Choosing `javabin` exports to a file with extension `.javabin` which is the native Solr format.This is compact and faster to import.`-out`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++The file name of the export.If the file name ends with `json.gz` the output will be compressed into a .gz file.+++If not provided, a file will be created with the name of the collection, as in `<collection>.json`.`query`::+++[%autowidth,frame=none]+|===+|Optional |Default: `\*:*`+|===++A custom query.The default is `\*:*` which will export all documents.`fields`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A comma separated list of fields to be exported.+If not provided, all fields will be included.`limit`::+++[%autowidth,frame=none]+|===+|Optional |Default: `100`+|===++The number of documents to export.-The default is `100`.The value `-1` will export all documents.*Examples*diff --git a/solr/solr-ref-guide/src/solr-on-hdfs.adoc b/solr/solr-ref-guide/src/solr-on-hdfs.adocindex 2be7d447afb..131d62ba1c9 100644--- a/solr/solr-ref-guide/src/solr-on-hdfs.adoc+++ b/solr/solr-ref-guide/src/solr-on-hdfs.adoc@@ -110,6 +110,12 @@ The `HdfsDirectoryFactory` has a number of settings defined as part of the `dire=== Solr HDFS Settings`solr.hdfs.home`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++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`.@@ -117,45 +123,91 @@ The structure of this parameter is `hdfs://host:port/path/solr`.=== Block Cache Settings`solr.hdfs.blockcache.enabled`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++Enable the blockcache.-The default is `true`.`solr.hdfs.blockcache.read.enabled`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++Enable the read cache.-The default is `true`.`solr.hdfs.blockcache.direct.memory.allocation`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++Enable direct memory allocation.If this is `false`, heap is used.-The default is `true`.`solr.hdfs.blockcache.slab.count`::+++[%autowidth,frame=none]+|===+|Optional |Default: `1`+|===++Number of memory slabs to allocate.Each slab is 128 MB in size.-The default is `1`.`solr.hdfs.blockcache.global`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++Enable/Disable using one global cache for all SolrCores.The settings used will be from the first HdfsDirectoryFactory created.-The default is `true`.=== NRTCachingDirectory Settings`solr.hdfs.nrtcachingdirectory.enable`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++Enable the use of NRTCachingDirectory.-The default is `true`.`solr.hdfs.nrtcachingdirectory.maxmergesizemb`::+++[%autowidth,frame=none]+|===+|Optional |Default: `16`+|===++NRTCachingDirectory max segment size for merges.-The default is `16`.`solr.hdfs.nrtcachingdirectory.maxcachedmb`::+++[%autowidth,frame=none]+|===+|Optional |Default: `192`+|===++NRTCachingDirectory max cache size.-The default is `192`.=== HDFS Client Configuration Settings`solr.hdfs.confdir`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Pass the location of HDFS client configuration files - needed for HDFS HA for example.=== Kerberos Authentication Settings@@ -165,15 +217,32 @@ If your HDFS directories are protected using Kerberos, then you need to configurTo enable Kerberos authentication from Solr, you need to set the following parameters:`solr.hdfs.security.kerberos.enabled`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++Set to `true` to enable Kerberos authentication.-The default is `false`.`solr.hdfs.security.kerberos.keytabfile`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++A keytab file contains pairs of Kerberos principals and encrypted keys which allows for password-less authentication when Solr attempts to authenticate with secure Hadoop.+This file will need to be present on all Solr servers at the same path provided in this parameter.`solr.hdfs.security.kerberos.principal`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The Kerberos principal that Solr should use to authenticate to secure Hadoop; the format of a typical Kerberos V5 principal is: `primary/instance@realm`.== Example solrconfig.xml for HDFSdiff --git a/solr/solr-ref-guide/src/spatial-search.adoc b/solr/solr-ref-guide/src/spatial-search.adocindex 7325bc746a1..d64cd7cefcf 100644--- a/solr/solr-ref-guide/src/spatial-search.adoc+++ b/solr/solr-ref-guide/src/spatial-search.adoc@@ -76,8 +76,14 @@ bin/post -type "application/json" -url "http://localhost:8983/solr/mycollection/The key parameter to pass in with your request is:`format`::+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===++The format of the file to pass in.- Accepted values: `WKT` or `geojson`.+Accepted values: `WKT` or `geojson`.== Searching with Query Parsers@@ -85,26 +91,52 @@ There are two spatial Solr "query parsers" for geospatial search: `geofilt` andThey take the following parameters:`d`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The radial distance, usually in kilometers.RPT & BBoxField can set other units via the setting `distanceUnits`.`pt`::-The center point using the format "lat,lon" if latitude & longitude.+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===+++The center point using the format `lat,lon` if latitude & longitude.Otherwise, "x,y" for PointType or "x y" for RPT field types.`sfield`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++A spatial indexed field.`score`::-(Advanced option; not supported by LatLonType (deprecated) or PointType) If the query is used in a scoring context (e.g., as the main query in `q`), this _<<local-params.adoc#,local param>>_ determines what scores will be produced.+++[%autowidth,frame=none]+|===+|Optional |Default: `none`+|===+++If the query is used in a scoring context (e.g., as the main query in `q`), this _<<local-params.adoc#,local param>>_ determines what scores will be produced.+Advanced option; not supported by LatLonType (deprecated) or PointType.++Valid values are:-* `none`: A fixed score of `1.0` (the default).-* `kilometers`: distance in kilometers between the field value and the specified center point-* `miles`: distance in miles between the field value and the specified center point-* `degrees`: distance in degrees between the field value and the specified center point-* `distance`: distance between the field value and the specified center point in the `distanceUnits` configured for this field-* `recipDistance`: 1 / the distance+* `none`: A fixed score of `1.0`.+* `kilometers`: distance in kilometers between the field value and the specified center point.+* `miles`: distance in miles between the field value and the specified center point.+* `degrees`: distance in degrees between the field value and the specified center point.+* `distance`: distance between the field value and the specified center point in the `distanceUnits` configured for this field.+* `recipDistance`: 1 / the distance.+[WARNING]====@@ -120,9 +152,14 @@ When used with `BBoxField`, additional options are supported:* `area2D`: cartesian coordinates based area of the overlapping shapes expressed in terms of the `distanceUnits` configured for this field`filter`::-(Advanced option; not supported by LatLonType (deprecated) or PointType).-If you only want the query to score (with the above `score` local parameter), not filter, then set this local parameter to false.-+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++If you only want the query to score (with the above `score` local parameter), not filter, then set this local parameter to `false`.+Advanced option; not supported by LatLonType (deprecated) or PointType.=== geofilt@@ -277,35 +314,73 @@ Use LLPSF for the distance sorting/boosting; it only needs to have docValues for=== Schema Configuration for RPT-To use RPT, the field type must be registered and configured in `schema.xml`.+To use RPT, the field type must be registered and configured in the collection's schema.There are many options for this field type.`name`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The name of the field type.`class`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++This should be `solr.SpatialRecursivePrefixTreeFieldType`.But be aware that the Lucene spatial module includes some other so-called "spatial strategies" other than RPT, notably TermQueryPT*, BBox, PointVector*, and SerializedDV.Solr requires a field type to parallel these in order to use them.The asterisked ones have them.`spatialContextFactory`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++This is a Java class name to an internal extension point governing support for shape definitions & parsing.There are two built-in aliases for known implementations: `Geo3D` and `JTS`.The default blank value does not support polygons.`geo`::-If `true`, the default, latitude and longitude coordinates will be used and the mathematical model will generally be a sphere.+++[%autowidth,frame=none]+|===+|Optional |Default: `true`+|===+++If `true`, latitude and longitude coordinates will be used and the mathematical model will generally be a sphere.If `false`, the coordinates will be generic X & Y on a 2D plane using Euclidean/Cartesian geometry.-`format`:: Defines the shape syntax/format to be used.+`format`::+++[%autowidth,frame=none]+|===+|Optional |Default: `WKT`+|===+++Defines the shape syntax/format to be used.Defaults to `WKT` but `GeoJSON` is another popular format.-Spatial4j governs this feature and supports https://locationtech.github.io/spatial4j/apidocs/org/locationtech/spatial4j/io/package-frame.html[other formats]. If a given shape is parseable as "lat,lon" or "x y" then that is always supported.+Spatial4j governs this feature and supports https://locationtech.github.io/spatial4j/apidocs/org/locationtech/spatial4j/io/package-frame.html[other formats].+If a given shape is parseable as "lat,lon" or "x y" then that is always supported.`distanceUnits`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++This is used to specify the units for distance measurements used throughout the use of this field.This can be `degrees`, `kilometers` or `miles`.-It is applied to nearly all distance measurements involving the field: `maxDistErr`, `distErr`, `d`, `geodist` and the `score` when score is `distance`, `area`, or `area2d`.+It is applied to nearly all distance measurements involving the field: `maxDistErr`, `distErr`, `d`, `geodist`, and the `score` when score is `distance`, `area`, or `area2d`.However, it doesn't affect distances embedded in WKT strings, (e.g., `BUFFER(POINT(200 10),0.2)`), which are still in degrees.+`distanceUnits` defaults to either `kilometers` if `geo` is `true`, or `degrees` if `geo` is `false`.@@ -313,6 +388,12 @@ However, it doesn't affect distances embedded in WKT strings, (e.g., `BUFFER(POI`distanceUnits` replaces the `units` attribute; which is now deprecated and mutually exclusive with this attribute.`distErrPct`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++Defines the default precision of non-point shapes (both index & query), as a fraction between `0.0` (fully precise) to `0.5`.The closer this number is to zero, the more accurate the shape will be.However, more precise indexed shapes use more disk space and take longer to index.@@ -324,22 +405,48 @@ The default for the RPT field is `0.025`.NOTE: For RPTWithGeometrySpatialField (see below), there's always complete accuracy with the serialized geometry and so this doesn't control accuracy so much as it controls the trade-off of how big the index should be.`distErrPct` defaults to `0.15` for that field.-`maxDistErr`:: Defines the highest level of detail required for indexed data.+`maxDistErr`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===+++Defines the highest level of detail required for indexed data.If left blank, the default is one meter – just a bit less than 0.000009 degrees.This setting is used internally to compute an appropriate maxLevels (see below).`worldBounds`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Defines the valid numerical ranges for x and y, in the format of `ENVELOPE(minX, maxX, maxY, minY)`.If `geo="true"`, the standard lat-lon world boundaries are assumed.If `geo=false`, you should define your boundaries.`distCalculator`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++Defines the distance calculation algorithm.If `geo=true`, `haversine` is the default.If `geo=false`, `cartesian` will be the default.Other possible values are `lawOfCosines`, `vincentySphere` and `cartesian^2`.-`prefixTree`:: Defines the spatial grid implementation.+`prefixTree`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===+++Defines the spatial grid implementation.Since a PrefixTree (such as RecursivePrefixTree) maps the world as a grid, each grid cell is decomposed to another set of grid cells at the next level.+If `geo=true` then the default prefix tree is `geohash`, otherwise it's `quad`.@@ -348,7 +455,14 @@ Geohash can only be used for `geo=true` as it's strictly geospatial.+A third choice is `packedQuad`, which is generally more efficient than `quad`, provided there are many levels -- perhaps 20 or more.-`maxLevels`:: Sets the maximum grid depth for indexed data.+`maxLevels`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===+++Sets the maximum grid depth for indexed data.Instead, it's usually more intuitive to compute an appropriate maxLevels by specifying `maxDistErr`.*_And there are others:_* `normWrapLongitude`, `datelineRule`, `validationRule`, `autoIndex`, `allowMultiOverlap`, `precisionModel`.@@ -469,31 +583,72 @@ As a part of faceting, it supports the `key` local parameter as well as excludinThis allows multiple heatmaps to be returned on the same field with different filters.`facet`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++Set to `true` to enable standard faceting.`facet.heatmap`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++The field name of type RPT.`facet.heatmap.geom`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++The region to compute the heatmap on, specified using the rectangle-range syntax or WKT.It defaults to the world.ex: `["-180 -90" TO "180 90"]`.`facet.heatmap.gridLevel`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++A specific grid level, which determines how big each grid cell is.Defaults to being computed via `distErrPct` (or `distErr`).`facet.heatmap.distErrPct`::+++[%autowidth,frame=none]+|===+|Optional |Default: `0.15`+|===++A fraction of the size of geom used to compute gridLevel.-Defaults to 0.15.It's computed the same as a similarly named parameter for RPT.`facet.heatmap.distErr`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A cell error distance used to pick the grid level indirectly.It's computed the same as a similarly named parameter for RPT.`facet.heatmap.format`::-The format, either `ints2D` (default) or `png`.+++[%autowidth,frame=none]+|===+|Optional |Default: `ints2D`+|===+++The format, either `ints2D` or `png`.[TIP]====diff --git a/solr/solr-ref-guide/src/spell-checking.adoc b/solr/solr-ref-guide/src/spell-checking.adocindex 1c46664b31e..48f9bbc04f9 100644--- a/solr/solr-ref-guide/src/spell-checking.adoc+++ b/solr/solr-ref-guide/src/spell-checking.adoc@@ -205,11 +205,23 @@ Here is an example with multiple dictionaries:The SpellCheck component accepts the parameters described below.`spellcheck`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++This parameter turns on SpellCheck suggestions for the request.If `true`, then spelling suggestions will be generated.This is required if spell checking is desired.`spellcheck.q` or `q`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++This parameter specifies the query to spellcheck.+If `spellcheck.q` is defined, then it is used; otherwise the original input query is used.@@ -224,6 +236,12 @@ NOTE: The `SpellingQueryConverter` class does not deal properly with non-ASCII cIn this case, you have either to use `spellcheck.q`, or implement your own QueryConverter.`spellcheck.build`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If set to `true`, this parameter creates the dictionary to be used for spell-checking.In a typical search application, you will need to build the dictionary before using the spell check.However, it's not always necessary to build a dictionary first.@@ -232,93 +250,193 @@ For example, you can configure the spellchecker to use a dictionary that alreadyThe dictionary will take some time to build, so this parameter should not be sent with every request.`spellcheck.reload`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If set to `true`, this parameter reloads the spellchecker.The results depend on the implementation of `SolrSpellChecker.reload()`.In a typical implementation, reloading the spellchecker means reloading the dictionary.`spellcheck.count`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++This parameter specifies the maximum number of suggestions that the spellchecker should return for a term.If this parameter isn't set, the value defaults to `1`.If the parameter is set but not assigned a number, the value defaults to `5`.If the parameter is set to a positive integer, that number becomes the maximum number of suggestions returned by the spellchecker.`spellcheck.queryAnalyzerFieldType`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++A field type from Solr's schema.-The analyzer configured for the provided field type is used by the QueryConverter to tokenize the value for "q" parameter.+The analyzer configured for the provided field type is used by the QueryConverter to tokenize the value for `q` parameter.++The field type specified by this parameter should do minimal transformations.It's usually a best practice to avoid types that aggressively stem or NGram, for instance, since those types of analysis can throw off spell checking.`spellcheck.onlyMorePopular`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, Solr will return suggestions that result in more hits for the query than the existing query.Note that this will return more popular suggestions even when the given query term is present in the index and considered "correct".`spellcheck.maxResultsForSuggest`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++If, for example, this is set to `5` and the user's query returns 5 or fewer results, the spellchecker will report "correctlySpelled=false" and also offer suggestions (and collations if requested).Setting this greater than zero is useful for creating "did-you-mean?" suggestions for queries that return a low number of hits.`spellcheck.alternativeTermCount`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Defines the number of suggestions to return for each query term existing in the index and/or dictionary.Presumably, users will want fewer suggestions for words with docFrequency>0.Also, setting this value enables context-sensitive spell suggestions.`spellcheck.extendedResults`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, this parameter causes to Solr to return additional information about spellcheck results, such as the frequency of each original term in the index (`origFreq`) as well as the frequency of each suggestion in the index (`frequency`).Note that this result format differs from the non-extended one as the returned suggestion for a word is actually an array of lists, where each list holds the suggested term and its frequency.`spellcheck.collate`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, this parameter directs Solr to take the best suggestion for each token (if one exists) and construct a new query from the suggestions.+For example, if the input query was "jawa class lording" and the best suggestion for "jawa" was "java" and "lording" was "loading", then the resulting collation would be "java class loading".+The `spellcheck.collate` parameter only returns collations that are guaranteed to result in hits if re-queried, even when applying original `fq` parameters.This is especially helpful when there is more than one correction per query.-++NOTE: This only returns a query to be used.It does not actually run the suggested query.`spellcheck.maxCollations`::+++[%autowidth,frame=none]+|===+|Optional |Default: `1`+|===++The maximum number of collations to return.-The default is `1`.This parameter is ignored if `spellcheck.collate` is false.`spellcheck.maxCollationTries`::+++[%autowidth,frame=none]+|===+|Optional |Default: `0`+|===++This parameter specifies the number of collation possibilities for Solr to try before giving up.Lower values ensure better performance.Higher values may be necessary to find a collation that can return results.-The default value is `0`, which is equivalent to not checking collations.+The default value of `0` is equivalent to not checking collations.This parameter is ignored if `spellcheck.collate` is false.`spellcheck.maxCollationEvaluations`::+++[%autowidth,frame=none]+|===+|Optional |Default: `10000`+|===++This parameter specifies the maximum number of word correction combinations to rank and evaluate prior to deciding which collation candidates to test against the index.This is a performance safety-net in case a user enters a query with many misspelled words.-The default is `10000` combinations, which should work well in most situations.`spellcheck.collateExtendedResults`::+++[%autowidth,frame=none]+|===+|Optional |Default: `false`+|===++If `true`, this parameter returns an expanded response format detailing the collations Solr found.-The default value is `false` and this is ignored if `spellcheck.collate` is false.+This is ignored if `spellcheck.collate` is false.`spellcheck.collateMaxCollectDocs`::+++[%autowidth,frame=none]+|===+|Optional |Default: `0`+|===++This parameter specifies the maximum number of documents that should be collected when testing potential collations against the index.A value of `0` indicates that all documents should be collected, resulting in exact hit-counts.Otherwise an estimation is provided as a performance optimization in cases where exact hit-counts are unnecessary – the higher the value specified, the more precise the estimation.+-The default value for this parameter is `0`, but when `spellcheck.collateExtendedResults` is false, the optimization is always used as if `1` had been specified.+When `spellcheck.collateExtendedResults` is `false`, the optimization is always used as if `1` had been specified.`spellcheck.collateParam.*` Prefix::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++This parameter prefix can be used to specify any additional parameters that you wish to the Spellchecker to use when internally validating collation queries.For example, even if your regular search results allow for loose matching of one or more query terms via parameters like `q.op=OR` and `mm=20%` you can specify override parameters such as `spellcheck.collateParam.q.op=AND&spellcheck.collateParam.mm=100%` to require that only collations consisting of words that are all found in at least one document may be returned.`spellcheck.dictionary`::+++[%autowidth,frame=none]+|===+|Optional |Default: `default`+|===++This parameter causes Solr to use the dictionary named in the parameter's argument.-The default setting is `default`.This parameter can be used to invoke a specific spellchecker on a per request basis.`spellcheck.accuracy`::+++[%autowidth,frame=none]+|===+|Optional |Default: _see description_+|===++Specifies an accuracy value to be used by the spell checking implementation to decide whether a result is worthwhile or not.The value is a float between 0 and 1.Defaults to `Float.MIN_VALUE`.`spellcheck.<DICT_NAME>.key`::+++[%autowidth,frame=none]+|===+|Optional |Default: none+|===++Specifies a key/value pair for the implementation handling a given dictionary.The value that is passed through is just `key=value` (`spellcheck.<DICT_NAME>.` is stripped off).+@@ -381,10 +499,22 @@ The `SpellCheckComponent` also supports spellchecking on distributed indexes.If you are using the SpellCheckComponent on a request handler other than "/select", you must provide the following two parameters:`shards`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++Specifies the shards in your distributed indexing configuration.For more information about distributed indexing, see <<user-managed-distributed-search.adoc#,User-Managed Distributed Search>>.`shards.qt`::+++[%autowidth,frame=none]+|===+s|Required |Default: none+|===++Specifies the request handler Solr uses for requests to shards.This parameter is not required for the `/select` request handler.