This commit is contained in:
Karl Wright 2017-09-22 10:37:56 -04:00
commit 7672ec41d8
16 changed files with 25 additions and 31 deletions

View File

@ -1105,7 +1105,7 @@ public class SolrMetricManager {
SolrMetricReporter reporter = loadReporter(registryName, cc.getResourceLoader(), info, null);
((SolrClusterReporter)reporter).setCoreContainer(cc);
} catch (Exception e) {
log.warn("Could not load node reporter, pluginInfo=" + info, e);
log.warn("Could not load cluster reporter, pluginInfo=" + info, e);
}
}
}

View File

@ -54,7 +54,6 @@ import org.apache.solr.uninverting.UninvertingReader.Type;
* @see ExternalFileFieldReloader
*/
public class ExternalFileField extends FieldType implements SchemaAware {
private FieldType ftype;
private String keyFieldName;
private IndexSchema schema;
private float defVal;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

After

Width:  |  Height:  |  Size: 108 KiB

View File

@ -173,7 +173,7 @@ That's it! Solr is running. If you need convincing, use a Web browser to see the
`\http://localhost:8983/solr/`
.The Solr Admin interface.
image::images/running-solr/SolrAdminDashboard.png[image,width=900,height=456]
image::images/running-solr/SolrAdminDashboard.png[Solr's Admin UI,pdfwidth=75%]
If Solr is not running, your browser will complain that it cannot connect to the server. Check your port number and try again.

View File

@ -22,7 +22,7 @@
Solr 7 is a major new release of Solr which introduces new features and a number of other changes that may impact your existing installation.
== Upgrade Planning
There are major changes in Solr 7 to consider before starting to migrate your configurations and indexes. This page is designed to highlight the biggest changes - new features you may want to be aware of, but also changes in default behavior, and deprecated features that have been removed.
There are major changes in Solr 7 to consider before starting to migrate your configurations and indexes. This page is designed to highlight the biggest changes - new features you may want to be aware of, but also changes in default behavior and deprecated features that have been removed.
There are many hundreds of changes in Solr 7, however, so a thorough review of the <<solr-upgrade-notes.adoc#solr-upgrade-notes,Solr Upgrade Notes>> as well as the {solr-javadocs}/changes/Changes.html[CHANGES.txt] file in your Solr instance will help you plan your migration to Solr 7. This section attempts to highlight some of the major changes you should be aware of.
@ -165,6 +165,8 @@ The following changes were made in SolrJ.
== Major Changes in Earlier 6.x Versions
The following summary of changes in earlier 6.x releases highlights significant changes released between Solr 6.0 and 6.6 that were listed in earlier versions of this Guide. Mentions of deprecations are likely superseded by removal in Solr 7, as noted in the above sections.
Note again that this is not a complete list of all changes that may impact your installation, so a thorough review of CHANGES.txt is highly recommended if upgrading from any version earlier than 6.6.
* The Solr contribs map-reduce, morphlines-core and morphlines-cell have been removed.
* JSON Facet API now uses hyper-log-log for numBuckets cardinality calculation and calculates cardinality before filtering buckets by any `mincount` greater than 1.
* If you use historical dates, specifically on or before the year 1582, you should re-index for better date handling.

View File

@ -5,6 +5,7 @@
:author: Written by the Apache Lucene/Solr Project
:email: https://lucene.apache.org/solr
:revdate: Published {build-date}
:experimental:
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information

View File

@ -448,13 +448,13 @@ You can require that a term or phrase is present by prefixing it with a `+`; con
To find documents that contain both terms "electronics" and "music", enter `+electronics +music` in the `q` box in the Admin UI Query tab.
If you're using curl, you must encode the `+` character because it has a reserved purpose in URLs (encoding the space character). The encoding for `+` is `%2B`:
If you're using curl, you must encode the `+` character because it has a reserved purpose in URLs (encoding the space character). The encoding for `+` is `%2B` as in:
`curl "http://localhost:8983/solr/techproducts/select?q=%2Belectronics%20%2Bmusic"`
You should only get a single result.
To search for documents that contain the term "electronics" but *don't* contain the term "music", enter `+electronics -music` in the `q` box in the Admin UI. For curl, again, URL encode "+" as "%2B":
To search for documents that contain the term "electronics" but *don't* contain the term "music", enter `+electronics -music` in the `q` box in the Admin UI. For curl, again, URL encode `+` as `%2B` as in:
`curl "http://localhost:8983/solr/techproducts/select?q=%2Belectronics+-music"`
@ -592,7 +592,7 @@ This command uses the Schema API to explicitly define a field named "name" that
You can also use the Admin UI to create fields, but it offers a bit less control over the properties of your field. It will work for our case, though:
.Creating a field
image::images/solr-tutorial/tutorial-add-field.png[]
image::images/solr-tutorial/tutorial-add-field.png[Adding a Field,640,480,pdfwidth=75%]
===== Create a "catchall" Copy Field
@ -612,7 +612,7 @@ curl -X POST -H 'Content-type:application/json' --data-binary '{"add-copy-field"
In the Admin UI, choose btn:[Add Copy Field], then fill out the source and destination for your field, as in this screenshot.
.Creating a copy field
image::images/solr-tutorial/tutorial-add-copy-field.png[]
image::images/solr-tutorial/tutorial-add-copy-field.png[Adding a copy field,640,480,pdfwidth=75%]
What this does is make a copy of all fields and put the data into the "\_text_" field.
@ -916,7 +916,7 @@ You can see that that has happened by looking at the values for `numDocs` and `m
`numDocs` represents the number of searchable documents in the index (and will be larger than the number of XML, JSON, or CSV files since some files contained more than one document). The `maxDoc` value may be larger as the `maxDoc` count includes logically deleted documents that have not yet been physically removed from the index. You can re-post the sample files over and over again as much as you want and `numDocs` will never increase, because the new documents will constantly be replacing the old.
Go ahead and edit any of the existing example data files, change some of the data, and re-run the PostTool (`bin/post`) again. You'll see your changes reflected in subsequent searches.
Go ahead and edit any of the existing example data files, change some of the data, and re-run the PostTool (`bin/post`). You'll see your changes reflected in subsequent searches.
=== Deleting Data

View File

@ -147,9 +147,9 @@ LLPSF does not support Solr's "PostFilter".
There are four distance function queries:
* `geodist`, see below, usually the most appropriate;
* http://wiki.apache.org/solr/FunctionQuery#dist[`dist`], to calculate the p-norm distance between multi-dimensional vectors;
* http://wiki.apache.org/solr/FunctionQuery#hsin.2C_ghhsin_-_Haversine_Formula[`hsin`], to calculate the distance between two points on a sphere;
* https://wiki.apache.org/solr/FunctionQuery#sqedist_-_Squared_Euclidean_Distance[`sqedist`], to calculate the squared Euclidean distance between two points.
* <<function-queries.adoc#dist-function,`dist`>>, to calculate the p-norm distance between multi-dimensional vectors;
* <<function-queries.adoc#hsin-function,`hsin`>>, to calculate the distance between two points on a sphere;
* <<function-queries.adoc#sqedist-function,`sqedist`>>, to calculate the squared Euclidean distance between two points.
For more information about these function queries, see the section on <<function-queries.adoc#function-queries,Function Queries>>.

View File

@ -203,7 +203,7 @@ The Solr Query Parser's use of `\_val_` and `\_query_` differs from the Lucene Q
* If the magic field name `\_val_` is used in a term or phrase query, the value is parsed as a function.
* It provides a hook into http://wiki.apache.org/solr/FunctionQuery[`FunctionQuery`] syntax. Quotes are necessary to encapsulate the function when it includes parentheses. For example:
* It provides a hook into <<function-queries.adoc#function-queries,`FunctionQuery`>> syntax. Quotes are necessary to encapsulate the function when it includes parentheses. For example:
+
[source,text]
----
@ -217,4 +217,3 @@ _val_:"recip(rord(myfield),1,2,3)"
----
_query_:"{!dismax qf=myfield}how now brown cow"
----

View File

@ -156,12 +156,12 @@ If `true`, returns payload information.
`tv.tf`::
If `true`, returns document term frequency info for each term in the document.
`tv.tf_idf`:: a|
`tv.tf_idf`::
If `true`, calculates TF / DF (ie: TF * IDF) for each term. Please note that this is a _literal_ calculation of "Term Frequency multiplied by Inverse Document Frequency" and *not* a classical TF-IDF similarity measure.
+
This parameter requires both `tv.tf` and `tv.df` to be "true". This can be computationally expensive. (The results are not shown in example output)
To learn more about TermVector component output, see the Wiki page: http://wiki.apache.org/solr/TermVectorComponentExampleOptions
To see an example of TermVector component output, see the Wiki page: http://wiki.apache.org/solr/TermVectorComponentExampleOptions
For schema requirements, see also the section <<field-properties-by-use-case.adoc#field-properties-by-use-case, Field Properties by Use Case>>.

View File

@ -186,9 +186,9 @@ If the document being updated does not include the `\_version_` field, and atomi
When using Optimistic Concurrency, clients can include an optional `versions=true` request parameter to indicate that the _new_ versions of the documents being added should be included in the response. This allows clients to immediately know what the `\_version_` is of every documented added with out needing to make a redundant <<realtime-get.adoc#realtime-get,`/get` request>>.
For example...
For example:
[source,bash]
[source]
----
$ curl -X POST -H 'Content-Type: application/json' 'http://localhost:8983/solr/techproducts/update?versions=true' --data-binary '
[ { "id" : "aaa" },
@ -231,7 +231,7 @@ For more information, please also see https://www.youtube.com/watch?v=WYVM6Wz-XT
Optimistic Concurrency is extremely powerful, and works very efficiently because it uses an internally assigned, globally unique values for the `\_version_` field. However, In some situations users may want to configure their own document specific version field, where the version values are assigned on a per-document basis by an external system, and have Solr reject updates that attempt to replace a document with an "older" version. In situations like this the {solr-javadocs}/solr-core/org/apache/solr/update/processor/DocBasedVersionConstraintsProcessorFactory.html[`DocBasedVersionConstraintsProcessorFactory`] can be useful.
The basic usage of `DocBasedVersionConstraintsProcessorFactory` is to configure it in `solrconfig.xml` as part of the http://wiki.apache.org/solr/UpdateRequestProcessor[UpdateRequestProcessorChain] and specify the name of your custom `versionField` in your schema that should be checked when validating updates:
The basic usage of `DocBasedVersionConstraintsProcessorFactory` is to configure it in `solrconfig.xml` as part of the <<update-request-processors.adoc#update-request-processor-configuration,UpdateRequestProcessorChain>> and specify the name of your custom `versionField` in your schema that should be checked when validating updates:
[source,xml]
----

View File

@ -27,8 +27,8 @@ IMPORTANT: The steps outlined on this page assume you use the default service na
Here is a checklist of things you need to prepare before starting the upgrade process:
. Examine the <<solr-upgrade-notes.adoc#solr-upgrade-notes,Solr Upgrade Notes>> page to determine if any behavior changes in the new version of Solr will affect your installation.
. If not using replication (ie: collections with replicationFactor > 1), then you should make a backup of each collection. If all of your collections use replication, then you don't technically need to make a backup since you will be upgrading and verifying each node individually.
. Examine the <<solr-upgrade-notes.adoc#solr-upgrade-notes,Solr Upgrade Notes>> to determine if any behavior changes in the new version of Solr will affect your installation.
. If not using replication (i.e., collections with `replicationFactor` less than 1), then you should make a backup of each collection. If all of your collections use replication, then you don't technically need to make a backup since you will be upgrading and verifying each node individually.
. Determine which Solr node is currently hosting the Overseer leader process in SolrCloud, as you should upgrade this node last. To determine the Overseer, use the Overseer Status API, see: <<collections-api.adoc#collections-api,Collections API>>.
. Plan to perform your upgrade during a system maintenance window if possible. You'll be doing a rolling restart of your cluster (each node, one-by-one), but we still recommend doing the upgrade when system usage is minimal.
. Verify the cluster is currently healthy and all replicas are active, as you should not perform an upgrade on a degraded cluster.
@ -41,7 +41,7 @@ Here is a checklist of things you need to prepare before starting the upgrade pr
+
If you are upgrading from an installation of Solr 5.x or later, these values can typically be found in either `/var/solr/solr.in.sh` or `/etc/default/solr.in.sh`.
You should now be ready to upgrade your cluster. Please verify this process in a test / staging cluster before doing it in production.
You should now be ready to upgrade your cluster. Please verify this process in a test or staging cluster before doing it in production.
== Upgrade Process
@ -50,7 +50,7 @@ The approach we recommend is to perform the upgrade of each Solr node, one-by-on
=== Step 1: Stop Solr
Begin by stopping the Solr node you want to upgrade. After stopping the node, if using a replication, (ie: collections with replicationFactor > 1) verify that all leaders hosted on the downed node have successfully migrated to other replicas; you can do this by visiting the <<cloud-screens.adoc#cloud-screens,Cloud panel in the Solr Admin UI>>. If not using replication, then any collections with shards hosted on the downed node will be temporarily off-line.
Begin by stopping the Solr node you want to upgrade. After stopping the node, if using a replication (i.e., collections with `replicationFactor` less than 1), verify that all leaders hosted on the downed node have successfully migrated to other replicas; you can do this by visiting the <<cloud-screens.adoc#cloud-screens,Cloud panel in the Solr Admin UI>>. If not using replication, then any collections with shards hosted on the downed node will be temporarily off-line.
=== Step 2: Install Solr as a Service

View File

@ -24,8 +24,6 @@ When this framework was under development, it was called the Solr Content Extrac
If you want to supply your own `ContentHandler` for Solr to use, you can extend the `ExtractingRequestHandler` and override the `createFactory()` method. This factory is responsible for constructing the `SolrContentHandler` that interacts with Tika, and allows literals to override Tika-parsed values. Set the parameter `literalsOverride`, which normally defaults to *true, to *false" to append Tika-parsed values to literal values.
For more information on Solr's Extracting Request Handler, see https://wiki.apache.org/solr/ExtractingRequestHandler.
== Key Solr Cell Concepts
When using the Solr Cell framework, it is helpful to keep the following in mind:

View File

@ -18,11 +18,6 @@
// specific language governing permissions and limitations
// under the License.
// TODO: most of the sample introspection calls below include cwiki.apache.org URLs that should be replaced...
// TODO: ...but they come directly from the API.
// TODO: so first the core/src/resources/apispec/*.json files need updated, then update the docs to match
// TODO: What URLs shold the apispec files even point to? version specific or something general?
The v2 API is a modernized self-documenting API interface covering most current Solr APIs. It is anticipated that once the v2 API reaches full coverage, and Solr-internal API usages like SolrJ and the Admin UI have been converted from the old API to the v2 API, the old API will eventually be retired.

View File

@ -163,4 +163,4 @@ fq={!field f=dateRange op=Contains}[2013 TO 2018]
Unlike most/all local-params, `op` is actually _not_ defined by any query parser (`field`), it is defined by the field type `DateRangeField`. In that example, it would find documents with indexed ranges that _contain_ (or equals) the range 2013 thru 2018. Multi-valued overlapping indexed ranges in a document are effectively coalesced.
For a DateRangeField example use-case and possibly other information, http://wiki.apache.org/solr/DateRangeField[see Solr's community wiki].
For a DateRangeField example use-case, see http://wiki.apache.org/solr/DateRangeField[see Solr's community wiki].