Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion solr/solr-ref-guide/src/about-this-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ The first has grown somewhat organically as Solr has developed over time, but th
In many cases, but not all, the parameters and outputs of API calls are the same between the two styles.
In all cases the paths and endpoints used are different.

Throughout this Guide, we have added examples of both styles with sections labeled "V1 API" and "V2 API". As of the 7.2 version of this Guide, these examples are not yet complete - more coverage will be added as future versions of the Guide are released.
Throughout this Guide, we have added examples of both styles with sections labeled "V1 API" and "V2 API".
As of the 7.2 version of this Guide, these examples are not yet complete - more coverage will be added as future versions of the Guide are released.

The section <<v2-api.adoc#,V2 API>> provides more information about how to work with the new API structure, including how to disable it if you choose to do so.

Expand Down
2 changes: 1 addition & 1 deletion solr/solr-ref-guide/src/analyzers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

An analyzer examines the text of fields and generates a token stream.

Analyzers are specified as a child of the `<fieldType>` element in the `schema.xml` configuration file (in the same `conf/` directory as `solrconfig.xml`).
Analyzers are specified as a child of the `<fieldType>` element in <<solr-schema.adoc#,Solr's schema>>.

In normal usage, only fields of type `solr.TextField` or `solr.SortableTextField` will specify an analyzer.
The simplest way to configure an analyzer is with a single `<analyzer>` element whose class attribute is a fully qualified Java class name.
Expand Down
3 changes: 2 additions & 1 deletion solr/solr-ref-guide/src/backup-restore.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ http://localhost:8983/solr/gettingstarted/replication?command=restorestatus&wt=x
</response>
----

The status value can be "In Progress", "success" or "failed". If it failed then an "exception" will also be sent in the response.
The status value can be "In Progress", "success" or "failed".
If it failed then an "exception" will also be sent in the response.

=== Create Snapshot API

Expand Down
6 changes: 4 additions & 2 deletions solr/solr-ref-guide/src/block-join-query-parser.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ This is equivalent to:
q={!child of=<blockMask>}+<someParents> +BRAND:Foo +NAME:Bar

Notice "$" syntax in `filters` for referencing queries; comma-separated tags `excludeTags` allows to exclude certain queries by tagging.
Overall the idea is similar to <<faceting.adoc#tagging-and-excluding-filters, excluding fq in facets>>. Note, that filtering is applied to the subordinate clause (`<someParents>`), and the intersection result is joined to the children.
Overall the idea is similar to <<faceting.adoc#tagging-and-excluding-filters, excluding fq in facets>>.
Note, that filtering is applied to the subordinate clause (`<someParents>`), and the intersection result is joined to the children.

=== All Children Syntax

Expand Down Expand Up @@ -161,7 +162,8 @@ q={!parent which=<blockMask>}+<someChildren> +COLOR:Red +SIZE:XL

Notice the "$" syntax in `filters` for referencing queries.
Comma-separated tags in `excludeTags` allow excluding certain queries by tagging.
Overall the idea is similar to <<faceting.adoc#tagging-and-excluding-filters, excluding fq in facets>>. Note that filtering is applied to the subordinate clause (`<someChildren>`) first, and the intersection result is joined to the parents.
Overall the idea is similar to <<faceting.adoc#tagging-and-excluding-filters, excluding fq in facets>>.
Note that filtering is applied to the subordinate clause (`<someChildren>`) first, and the intersection result is joined to the parents.

=== Scoring with the Block Join Parent Query Parser

Expand Down
2 changes: 1 addition & 1 deletion solr/solr-ref-guide/src/charfilterfactories.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ s|Required |Default: none
+
The text to use to replace matching patterns.

You can configure this filter in `schema.xml` like this:
You can configure this filter in the schema like this:

[.dynamic-tabs]
--
Expand Down
3 changes: 2 additions & 1 deletion solr/solr-ref-guide/src/collapse-and-expand-results.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ fq={!collapse cost=1000 field=group_field}

=== Block Collapsing

When collapsing on the `\_root_` field, using `nullPolicy=expand` or `nullPolicy=ignore`, the Collapsing Query Parser can take advantage of the fact that all docs with identical field values are adjacent to each other in the index in a single <<indexing-nested-documents.adoc#,"block" of nested documents>>. This allows the collapsing logic to be much faster and more memory efficient.
When collapsing on the `\_root_` field, using `nullPolicy=expand` or `nullPolicy=ignore`, the Collapsing Query Parser can take advantage of the fact that all docs with identical field values are adjacent to each other in the index in a single <<indexing-nested-documents.adoc#,"block" of nested documents>>.
This allows the collapsing logic to be much faster and more memory efficient.

The default collapsing logic must keep track of all group head documents -- for all groups encountered so far -- until it has evaluated all documents, because each document it considers may become the new group head of any group.

Expand Down
2 changes: 1 addition & 1 deletion solr/solr-ref-guide/src/collection-management.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ If the status is anything other than "success", an error message will explain wh
[[reload]]
== RELOAD: Reload a Collection

The RELOAD action is used when you have changed a configuration file in ZooKeeper, like uploading a new `schema.xml`.
The RELOAD action is used when you have changed a configuration file in ZooKeeper, like uploading a new `solrconfig.xml`.
Solr automatically reloads collections when certain files, monitored via a watch in ZooKeeper are changed,
such as `security.json`.
However, for changes to files in configsets, like uploading a new schema, you will need to manually trigger the RELOAD.
Expand Down
4 changes: 3 additions & 1 deletion solr/solr-ref-guide/src/common-query-parameters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ fl=id,title,[explain]

=== Field Name Aliases

You can change the key used to in the response for a field, function, or transformer by prefixing it with a `_"displayName_:`". For example:
You can change the key used to in the response for a field, function, or transformer by prefixing it with a `_displayName_:` value.

For example, `why_score` is the display name below:

[source,text]
----
Expand Down
2 changes: 1 addition & 1 deletion solr/solr-ref-guide/src/configuration-files.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ For more details on `core.properties`, see the section <<core-discovery.adoc#,Co
** `solrconfig.xml` controls high-level behavior.
You can, for example, specify an alternate location for the data directory.
For more information on `solrconfig.xml`, see <<configuring-solrconfig-xml.adoc#,Configuring solrconfig.xml>>.
** `managed-schema` (or `schema.xml`) describes the documents you will ask Solr to index.
** `managed-schema` or `schema.xml` describes the documents you will ask Solr to index.
The schema defines a document as a collection of fields.
You can define both the field types and the fields themselves.
Field type definitions are powerful and include information about how Solr processes incoming field values and query values.
Expand Down
3 changes: 2 additions & 1 deletion solr/solr-ref-guide/src/configuring-solr-xml.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ The default `solr.xml` file looks like this:
</solr>
----

As you can see, the discovery Solr configuration is "SolrCloud friendly". However, the presence of the `<solrcloud>` element does _not_ mean that the Solr instance is running in SolrCloud mode.
As you can see, the discovery Solr configuration is "SolrCloud friendly".
However, the presence of the `<solrcloud>` element does _not_ mean that the Solr instance is running in SolrCloud mode.
Unless the `-DzkHost` or `-DzkRun` are specified at startup time, this section is ignored.

== Solr.xml Parameters
Expand Down
3 changes: 2 additions & 1 deletion solr/solr-ref-guide/src/copy-fields.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
You might want to interpret some document fields in more than one way.
Solr has a mechanism for making copies of fields so that you can apply several distinct field types to a single piece of incoming information.

The name of the field you want to copy is the _source_, and the name of the copy is the _destination_. In `schema.xml`, it's very simple to make copies of fields:
The name of the field you want to copy is the _source_, and the name of the copy is the _destination_.
In the schema file, it's very simple to make copies of fields:

[source,xml]
----
Expand Down
7 changes: 4 additions & 3 deletions solr/solr-ref-guide/src/currencies-exchange-rates.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The following features are supported:
CurrencyField has been deprecated in favor of CurrencyFieldType; all configuration examples below use CurrencyFieldType.
====

The `currency` field type is defined in `schema.xml`.
The `currency` field type is defined in the <<solr-schema.adoc#,schema>>.
This is the default configuration of this type.

[source,xml]
Expand All @@ -46,7 +46,8 @@ This is the default configuration of this type.
----

In this example, we have defined the name and class of the field type, and defined the `defaultCurrency` as "USD", for U.S. Dollars.
We have also defined a `currencyConfig` to use a file called "currency.xml". This is a file of exchange rates between our default currency to other currencies.
We have also defined a `currencyConfig` to use a file called "currency.xml".
This is a file of exchange rates between our default currency to other currencies.
There is an alternate implementation that would allow regular downloading of currency data.
See <<Exchange Rates>> below for more.

Expand Down Expand Up @@ -96,7 +97,7 @@ Natively, two provider types are supported: `FileExchangeRateProvider` or `OpenE
This provider requires you to provide a file of exchange rates.
It is the default, meaning that to use this provider you only need to specify the file path and name as a value for `currencyConfig` in the definition for this type.

There is a sample `currency.xml` file included with Solr, found in the same directory as the `schema.xml` file.
There is a sample `currency.xml` file included with Solr, found in the same directory as the schema file.
Here is a small snippet from this file:

[source,xml]
Expand Down
3 changes: 2 additions & 1 deletion solr/solr-ref-guide/src/date-formatting-math.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
== Date Formatting

Solr's date fields (`DatePointField`, `DateRangeField` and the deprecated `TrieDateField`) represent "dates" as a point in time with millisecond precision.
The format used is a restricted form of the canonical representation of dateTime in the http://www.w3.org/TR/xmlschema-2/#dateTime[XML Schema specification] – a restricted subset of https://en.wikipedia.org/wiki/ISO_8601[ISO-8601]. For those familiar with Java date handling, Solr uses {java-javadocs}java/time/format/DateTimeFormatter.html#ISO_INSTANT[DateTimeFormatter.ISO_INSTANT] for formatting, and parsing too with "leniency".
The format used is a restricted form of the canonical representation of dateTime in the http://www.w3.org/TR/xmlschema-2/#dateTime[XML Schema specification] – a restricted subset of https://en.wikipedia.org/wiki/ISO_8601[ISO-8601].
For those familiar with Java date handling, Solr uses {java-javadocs}java/time/format/DateTimeFormatter.html#ISO_INSTANT[DateTimeFormatter.ISO_INSTANT] for formatting, and parsing too with "leniency".

`YYYY-MM-DDThh:mm:ssZ`

Expand Down
2 changes: 1 addition & 1 deletion solr/solr-ref-guide/src/de-duplication.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ When a document is added, a signature will automatically be generated and attach

== Configuration Options

There are two places in Solr to configure de-duplication: in `solrconfig.xml` and in `schema.xml`.
There are two places in Solr to configure de-duplication: in `solrconfig.xml` and in the <<solr-schema.adoc#,schema>>.

=== In solrconfig.xml

Expand Down
3 changes: 2 additions & 1 deletion solr/solr-ref-guide/src/docker-networking.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ ssh -n trinity10.lan "docker pull brandnetworks/tcpproxy && docker run -p 8001 -
docker port zksolrproxy 8002
----

Or use a suitably configured HAProxy to round-robin between all Solr nodes. Or, instead of the overlay network, use http://www.projectcalico.org[Project Calico] and configure L3 routing so you do not need to mess with proxies.
Or use a suitably configured HAProxy to round-robin between all Solr nodes.
Or, instead of the overlay network, use http://www.projectcalico.org[Project Calico] and configure L3 routing so you do not need to mess with proxies.

Now I can get to Solr on `http://trinity10:32774/solr/#/`.
In the Cloud -> Tree -> /live_nodes view I see the Solr nodes.
Expand Down
3 changes: 2 additions & 1 deletion solr/solr-ref-guide/src/document-transformers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,8 @@ In a sense this double-storage between docValues and stored-value storage isn't

=== [features] - LTRFeatureLoggerTransformerFactory

The "LTR" prefix stands for <<learning-to-rank.adoc#,Learning To Rank>>. This transformer returns the values of features and it can be used for feature extraction and feature logging.
The "LTR" prefix stands for <<learning-to-rank.adoc#,Learning To Rank>>.
This transformer returns the values of features and it can be used for feature extraction and feature logging.

[source,plain]
----
Expand Down
3 changes: 2 additions & 1 deletion solr/solr-ref-guide/src/documents-fields-schema-design.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
The fundamental premise of Solr is simple.
You give it a lot of information, then later you can ask it questions and find the piece of information you want.

The part where you feed in all the information is called _indexing_ or _updating_. When you ask a question, it's called a _query_.
The part where you feed in all the information is called _indexing_ or _updating_.
When you ask a question, it's called a _query_.

One way to understand how Solr works is to think of a loose-leaf book of recipes.
Every time you add a recipe to the book, you update the index at the back.
Expand Down
17 changes: 10 additions & 7 deletions solr/solr-ref-guide/src/docvalues.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ DocValues are a way of recording field values internally that is more efficient

== Why DocValues?

The standard way that Solr builds the index is with an _inverted index_. This style builds a list of terms found in all the documents in the index and next to each term is a list of documents that the term appears in (as well as how many times the term appears in that document).
The standard way that Solr builds the index is with an _inverted index_.
This style builds a list of terms found in all the documents in the index and next to each term is a list of documents that the term appears in (as well as how many times the term appears in that document).
This makes search very fast - since users search by terms, having a ready list of term-to-document values makes the query process faster.

For other features that we now commonly associate with search, such as sorting, faceting, and highlighting, this approach is not very efficient.
Expand All @@ -35,17 +36,17 @@ This approach promises to relieve some of the memory requirements of the fieldCa

To use docValues, you only need to enable it for a field that you will use it with.
As with all schema design, you need to define a field type and then define fields of that type with docValues enabled.
All of these actions are done in `schema.xml`.
All of these actions are done in the <<solr-schema.adoc#,schema>>.

Enabling a field for docValues only requires adding `docValues="true"` to the field (or field type) definition, as in this example from the `schema.xml` of Solr's `sample_techproducts_configs` <<config-sets.adoc#,configset>>:
Enabling a field for docValues only requires adding `docValues="true"` to the field (or field type) definition, as in this example from Solr's `sample_techproducts_configs` <<config-sets.adoc#,configset>>:

[source,xml]
----
<field name="manu_exact" type="string" indexed="false" stored="false" docValues="true" />
----

[IMPORTANT]
If you have already indexed data into your Solr index, you will need to completely reindex your content after changing your field definitions in `schema.xml` in order to successfully use docValues.
If you have already indexed data into your Solr index, you will need to completely reindex your content after changing your field definitions in the schema in order to successfully use docValues.

DocValues are only available for specific field types.
The types chosen determine the underlying Lucene docValue type that will be used.
Expand All @@ -70,8 +71,10 @@ Entries are kept in sorted order and duplicates are removed.

These Lucene types are related to how the {lucene-javadocs}/core/org/apache/lucene/index/DocValuesType.html[values are sorted and stored].

There is an additional configuration option available, which is to modify the `docValuesFormat` <<field-type-definitions-and-properties.adoc#docvaluesformat,used by the field type>>. The default implementation employs a mixture of loading some things into memory and keeping some on disk.
In some cases, however, you may choose to specify an alternative {lucene-javadocs}/core/org/apache/lucene/codecs/DocValuesFormat.html[DocValuesFormat implementation]. For example, you could choose to keep everything in memory by specifying `docValuesFormat="Direct"` on a field type:
There is an additional configuration option available, which is to modify the `docValuesFormat` <<field-type-definitions-and-properties.adoc#docvaluesformat,used by the field type>>.
The default implementation employs a mixture of loading some things into memory and keeping some on disk.
In some cases, however, you may choose to specify an alternative {lucene-javadocs}/core/org/apache/lucene/codecs/DocValuesFormat.html[DocValuesFormat implementation].
For example, you could choose to keep everything in memory by specifying `docValuesFormat="Direct"` on a field type:

[source,xml]
----
Expand All @@ -82,7 +85,7 @@ Please note that the `docValuesFormat` option may change in future releases.

[NOTE]
Lucene index back-compatibility is only supported for the default codec.
If you choose to customize the `docValuesFormat` in your `schema.xml`, upgrading to a future version of Solr may require you to either switch back to the default codec and optimize your index to rewrite it into the default codec before upgrading, or re-build your entire index from scratch after upgrading.
If you choose to customize the `docValuesFormat` in your schema, upgrading to a future version of Solr may require you to either switch back to the default codec and optimize your index to rewrite it into the default codec before upgrading, or re-build your entire index from scratch after upgrading.

== Using DocValues

Expand Down
2 changes: 1 addition & 1 deletion solr/solr-ref-guide/src/dynamic-fields.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ Like regular fields, dynamic fields have a name, a field type, and options.
<dynamicField name="*_i" type="int" indexed="true" stored="true"/>
----

It is recommended that you include basic dynamic field mappings (like that shown above) in your `schema.xml`.
It is recommended that you include basic dynamic field mappings (like that shown above) in your schema.
The mappings can be very useful.
2 changes: 1 addition & 1 deletion solr/solr-ref-guide/src/edismax-query-parser.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ By default, no aliasing is used and field names specified in the query string ar

== Examples of eDisMax Queries

All of the sample URLs in this section assume you are running Solr's "```techproducts```" example:
All of the sample URLs in this section assume you are running Solr's "techproducts" example:

[source,bash]
----
Expand Down
2 changes: 1 addition & 1 deletion solr/solr-ref-guide/src/enum-fields.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Examples of this are severity lists, or risk definitions.
EnumField has been deprecated in favor of EnumFieldType; all configuration examples below use EnumFieldType.
====

== Defining an EnumFieldType in schema.xml
== Defining an EnumFieldType in the Schema

The EnumFieldType type definition is quite simple, as in this example defining field types for "priorityLevel" and "riskLevel" enumerations:

Expand Down
2 changes: 1 addition & 1 deletion solr/solr-ref-guide/src/external-files-processes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ You might want to update the rank of all the documents daily or hourly, while th
Without `ExternalFileField`, you would need to update each document just to change the rank.
Using `ExternalFileField` is much more efficient because all document values for a particular field are stored in an external file that can be updated as frequently as you wish.

In `schema.xml`, the definition of this field type might look like this:
In the <<solr-schema.adoc#,schema>>, the definition of this field type might look like this:

[source,xml]
----
Expand Down
3 changes: 2 additions & 1 deletion solr/solr-ref-guide/src/faceting.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,8 @@ The results are typically displayed in a second table showing the summarized dat
Pivot faceting lets you create a summary table of the results from a faceting documents by multiple fields.

Another way to look at it is that the query produces a Decision Tree, in that Solr tells you "for facet A, the constraints/counts are X/N, Y/M, etc.
If you were to constrain A by X, then the constraint counts for B would be S/P, T/Q, etc.". In other words, it tells you in advance what the "next" set of facet results would be for a field if you apply a constraint from the current facet results.
If you were to constrain A by X, then the constraint counts for B would be S/P, T/Q, etc."
In other words, it tells you in advance what the "next" set of facet results would be for a field if you apply a constraint from the current facet results.

`facet.pivot`::
+
Expand Down
Loading