This is an automated email from the ASF dual-hosted git repository.
janhoy pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 0036c5cdfa3 SOLR-16660 Deprecate analytics component (#1361)
0036c5cdfa3 is described below
commit 0036c5cdfa3924329dfdc4c245a248b78b66266e
Author: Jan Høydahl <[email protected]>
AuthorDate: Wed Feb 22 10:59:00 2023 +0100
SOLR-16660 Deprecate analytics component (#1361)
---
solr/CHANGES.txt | 2 ++
.../java/org/apache/solr/handler/component/AnalyticsComponent.java | 4 ++++
.../configuration-guide/pages/requesthandlers-searchcomponents.adoc | 2 +-
.../modules/query-guide/pages/analytics-expression-sources.adoc | 2 ++
.../modules/query-guide/pages/analytics-mapping-functions.adoc | 2 ++
.../modules/query-guide/pages/analytics-reduction-functions.adoc | 2 ++
solr/solr-ref-guide/modules/query-guide/pages/analytics.adoc | 2 ++
.../modules/upgrade-notes/pages/major-changes-in-solr-9.adoc | 1 +
8 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 0c3a431732e..86ce4be7b68 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -269,6 +269,8 @@ Other Changes
* SOLR-16573: Introduce EmbeddedSolrServerTestRule, a JUnit 4 TestRule for
Solr testing
(Joshua Ouma, David Smiley)
+* SOLR-16660: Deprecate analytics component (janhoy)
+
* SOLR-15733: Separate out a solrj-streaming module (Joel Bernstein, Kevin
Risden)
* SOLR-15928: Dim 'Add Collection' and 'Create Alias' buttons when user lacks
proper permissions (janhoy)
diff --git
a/solr/modules/analytics/src/java/org/apache/solr/handler/component/AnalyticsComponent.java
b/solr/modules/analytics/src/java/org/apache/solr/handler/component/AnalyticsComponent.java
index 17b197216f4..c93ebf51de3 100644
---
a/solr/modules/analytics/src/java/org/apache/solr/handler/component/AnalyticsComponent.java
+++
b/solr/modules/analytics/src/java/org/apache/solr/handler/component/AnalyticsComponent.java
@@ -26,14 +26,18 @@ import
org.apache.solr.analytics.util.AnalyticsResponseHeadings;
import org.apache.solr.analytics.util.OldAnalyticsParams;
import org.apache.solr.analytics.util.OldAnalyticsRequestConverter;
import org.apache.solr.common.util.NamedList;
+import org.apache.solr.logging.DeprecationLog;
import org.apache.solr.response.SolrQueryResponse;
/** Computes analytics requests. */
+@Deprecated(since = "9.2")
public class AnalyticsComponent extends SearchComponent {
public static final String COMPONENT_NAME = "analytics";
@Override
public void init(NamedList<?> args) {
+ DeprecationLog.log(
+ "analytics", "The Analytics component is deprecated. See upgrade notes
for more.");
AnalyticsRequestParser.init();
}
diff --git
a/solr/solr-ref-guide/modules/configuration-guide/pages/requesthandlers-searchcomponents.adoc
b/solr/solr-ref-guide/modules/configuration-guide/pages/requesthandlers-searchcomponents.adoc
index 8a3144c6c61..08bf0d27f31 100644
---
a/solr/solr-ref-guide/modules/configuration-guide/pages/requesthandlers-searchcomponents.adoc
+++
b/solr/solr-ref-guide/modules/configuration-guide/pages/requesthandlers-searchcomponents.adoc
@@ -242,7 +242,7 @@ They are called in the order listed.
Apart from default components, Solr ships with a number of additional - very
useful - components.
They do need to defined and referenced in `solrconfig.xml` to be actually used.
-* `AnalyticsComponent`, described in the section
xref:query-guide:analytics.adoc[].
+* `AnalyticsComponent`, described in the section
xref:query-guide:analytics.adoc[] (Deprecated).
* `ClusteringComponent`, described in the section
xref:query-guide:result-clustering.adoc[].
* `PhrasesIdentificationComponent`, used to identify & score "phrases" found
in the input string, based on shingles in indexed fields, described in the
{solr-javadocs}/core/org/apache/solr/handler/component/PhrasesIdentificationComponent.html[PhrasesIdentificationComponent]
javadocs.
* `QueryElevationComponent`, described in the section
xref:query-guide:query-elevation-component.adoc[].
diff --git
a/solr/solr-ref-guide/modules/query-guide/pages/analytics-expression-sources.adoc
b/solr/solr-ref-guide/modules/query-guide/pages/analytics-expression-sources.adoc
index 267762b567a..7b535d558e9 100644
---
a/solr/solr-ref-guide/modules/query-guide/pages/analytics-expression-sources.adoc
+++
b/solr/solr-ref-guide/modules/query-guide/pages/analytics-expression-sources.adoc
@@ -18,6 +18,8 @@
Expression sources are the source of the data being aggregated in
xref:analytics.adoc#expressions[analytics expressions].
+WARNING: The analytics component is deprecated. We recommend looking into
similar functionality found in xref:json-facet-api.adoc[JSON Facet API]. Please
notify the project if there's functionality you need that isn't currently
covered by JSON facets.
+
These sources can be either Solr fields indexed with docValues, or constants.
== Supported Field Types
diff --git
a/solr/solr-ref-guide/modules/query-guide/pages/analytics-mapping-functions.adoc
b/solr/solr-ref-guide/modules/query-guide/pages/analytics-mapping-functions.adoc
index b1a2e7b62ec..8c0c867aeb1 100644
---
a/solr/solr-ref-guide/modules/query-guide/pages/analytics-mapping-functions.adoc
+++
b/solr/solr-ref-guide/modules/query-guide/pages/analytics-mapping-functions.adoc
@@ -18,6 +18,8 @@
Mapping functions map values for each Solr Document or Reduction.
+WARNING: The analytics component is deprecated. We recommend looking into
similar functionality found in xref:json-facet-api.adoc[JSON Facet API]. Please
notify the project if there's functionality you need that isn't currently
covered by JSON facets.
+
Below is a list of all mapping functions provided by the Analytics Component.
These mappings can be chained together to implement more complex functionality.
diff --git
a/solr/solr-ref-guide/modules/query-guide/pages/analytics-reduction-functions.adoc
b/solr/solr-ref-guide/modules/query-guide/pages/analytics-reduction-functions.adoc
index 25255deabf5..946cbd4bea5 100644
---
a/solr/solr-ref-guide/modules/query-guide/pages/analytics-reduction-functions.adoc
+++
b/solr/solr-ref-guide/modules/query-guide/pages/analytics-reduction-functions.adoc
@@ -21,6 +21,8 @@ Reduction functions reduce the values of
xref:analytics-expression-sources.adoc[
and/or unreduced xref:analytics-mapping-functions.adoc[mapping functions]
for every Solr Document to a single value.
+WARNING: The analytics component is deprecated. We recommend looking into
similar functionality found in xref:json-facet-api.adoc[JSON Facet API]. Please
notify the project if there's functionality you need that isn't currently
covered by JSON facets.
+
Below is a list of all reduction functions provided by the Analytics Component.
These can be combined using mapping functions to implement more complex
functionality.
diff --git a/solr/solr-ref-guide/modules/query-guide/pages/analytics.adoc
b/solr/solr-ref-guide/modules/query-guide/pages/analytics.adoc
index c2f0fedf646..5369bed8807 100644
--- a/solr/solr-ref-guide/modules/query-guide/pages/analytics.adoc
+++ b/solr/solr-ref-guide/modules/query-guide/pages/analytics.adoc
@@ -20,6 +20,8 @@
The Analytics Component allows users to calculate complex statistical
aggregations over result sets.
+WARNING: The analytics component is deprecated. We recommend looking into
similar functionality found in xref:json-facet-api.adoc[JSON Facet API]. Please
notify the project if there's functionality you need that isn't currently
covered by JSON facets.
+
The component enables interacting with data in a variety of ways, both through
a diverse set of analytics functions as well as powerful faceting functionality.
The standard facets are supported within the analytics component with
additions that leverage its analytical capabilities.
diff --git
a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-9.adoc
b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-9.adoc
index a9983fc1a85..b8c9970357f 100644
---
a/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-9.adoc
+++
b/solr/solr-ref-guide/modules/upgrade-notes/pages/major-changes-in-solr-9.adoc
@@ -67,6 +67,7 @@ Due to changes in Lucene 9, that isn't possible any more.
== Solr 9.2
=== Upgrade to Jetty 10.x
* Solr upgraded to Jetty 10.x from 9.x due to Jetty 9.x is now end of life.
Jetty 10.x has a Java 11 minimum and matches Solr 9 minimum Java version. Jetty
logging has been replaced with slf4j again matching Solr. See
https://webtide.com/jetty-10-and-11-have-arrived/ for additional Jetty 10.x
highlights.
+* The xref:query-guide:analytics.adoc[Analytics Component] has been
deprecated. Consider using xref:query-guide:json-facet-api.adoc[JSON Facet API]
as a substitute. Please notify the project if there's functionality you need
that isn't currently covered by JSON facets.
=== Jetty Configuration
* Solr no longer duplicates certain Jetty "server" library dependencies
between `server/lib` and `WEB-INF/lib` (jetty-util, jetty-io, etc.).