You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mk...@apache.org on 2019/12/18 08:12:33 UTC

[lucene-solr] branch branch_8x updated: SOLR-14092: Mark BlockJoinFacetComponent as deprecated.

This is an automated email from the ASF dual-hosted git repository.

mkhl pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new cc00e1d  SOLR-14092: Mark BlockJoinFacetComponent as deprecated.
cc00e1d is described below

commit cc00e1dcef727653224c95072ea76a169bd9cbed
Author: Mikhail Khludnev <mk...@apache.org>
AuthorDate: Sat Dec 14 23:23:40 2019 +0300

    SOLR-14092: Mark BlockJoinFacetComponent as deprecated.
---
 solr/CHANGES.txt                                                   | 2 ++
 .../org/apache/solr/search/join/BlockJoinDocSetFacetComponent.java | 6 +++++-
 .../java/org/apache/solr/search/join/BlockJoinFacetComponent.java  | 7 ++++++-
 solr/solr-ref-guide/src/blockjoin-faceting.adoc                    | 3 ++-
 4 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 028ea8b..7949a5f 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -33,6 +33,8 @@ Upgrade Notes
 
 * SOLR-14026: Upgrade Jetty to 9.4.24.v20191120 and dropwizard to 4.1.2 (Erick Erickson)
 
+* SOLR-14092: BlockJoinFacetComponent is marked for deprecation and will be removed in 9.0.
+  Users are encouraged to migrate to uniqueBlock() in JSON Facet API.  (Mikhail Khludnev)
 
 New Features
 ---------------------
diff --git a/solr/core/src/java/org/apache/solr/search/join/BlockJoinDocSetFacetComponent.java b/solr/core/src/java/org/apache/solr/search/join/BlockJoinDocSetFacetComponent.java
index b8f3034..b4e434c 100644
--- a/solr/core/src/java/org/apache/solr/search/join/BlockJoinDocSetFacetComponent.java
+++ b/solr/core/src/java/org/apache/solr/search/join/BlockJoinDocSetFacetComponent.java
@@ -40,7 +40,11 @@ import org.apache.solr.search.join.BlockJoinFieldFacetAccumulator.AggregatableDo
  * Calculates facets on children documents and aggregates hits by parent documents.
  * Enables when child.facet.field parameter specifies a field name for faceting. 
  * So far it supports string fields only. It requires to search by {@link ToParentBlockJoinQuery}.
- * */
+ * 
+ * @deprecated This functionality is considered deprecated and will be removed at 9.0
+ * Users are encouraged to use <code>"uniqueBlock(\_root_)"</code> aggregation 
+ * under <code>"terms"</code> facet and <code>"domain": { "blockChildren":...}</code>  */
+@Deprecated
 public class BlockJoinDocSetFacetComponent extends BlockJoinFacetComponentSupport {
   
   private final String bjqKey = this.getClass().getSimpleName()+".bjq";
diff --git a/solr/core/src/java/org/apache/solr/search/join/BlockJoinFacetComponent.java b/solr/core/src/java/org/apache/solr/search/join/BlockJoinFacetComponent.java
index 16f84cc..47456a0 100644
--- a/solr/core/src/java/org/apache/solr/search/join/BlockJoinFacetComponent.java
+++ b/solr/core/src/java/org/apache/solr/search/join/BlockJoinFacetComponent.java
@@ -17,7 +17,12 @@
 package org.apache.solr.search.join;
 
 /** this is just a stub refers to {@link BlockJoinDocSetFacetComponent} to avoid
- * changes in configs */
+ * changes in configs
+ * 
+ * @deprecated This functionality is considered deprecated and will be removed at 9.0
+ * Users are encouraged to use <code>"uniqueBlock(\_root_)"</code> aggregation 
+ * under <code>"terms"</code> facet and <code>"domain": { "blockChildren":...}</code>  */
+@Deprecated
 public class BlockJoinFacetComponent extends BlockJoinDocSetFacetComponent {
 
 }
diff --git a/solr/solr-ref-guide/src/blockjoin-faceting.adoc b/solr/solr-ref-guide/src/blockjoin-faceting.adoc
index 94b5110..e647834 100644
--- a/solr/solr-ref-guide/src/blockjoin-faceting.adoc
+++ b/solr/solr-ref-guide/src/blockjoin-faceting.adoc
@@ -20,7 +20,8 @@ BlockJoin facets allow you to aggregate children facet counts by their parents.
 
 It is a common requirement that if a parent document has several children documents, all of them need to increment facet value count only once. This functionality is provided by `BlockJoinDocSetFacetComponent`, and `BlockJoinFacetComponent` just an alias for compatibility.
 
-CAUTION: This functionality is considered deprecated. Users are encouraged to use `uniqueBlock(\_root_)` aggregation under a `terms` facet in the <<json-faceting-domain-changes.adoc#block-join-domain-changes,JSON Facet API>>.
+CAUTION: This functionality is considered deprecated and will be removed at 9.0.
+ Users are encouraged to use `uniqueBlock(\_root_)` aggregation under a `terms` facet in the <<json-faceting-domain-changes.adoc#block-join-domain-changes,JSON Facet API>>.
 If this component is used, it must be explicitly enabled for a request handler in `solrconfig.xml`, in the same way as any other <<requesthandlers-and-searchcomponents-in-solrconfig.adoc#requesthandlers-and-searchcomponents-in-solrconfig,search component>>.
 
 This example shows how you could add this search components to `solrconfig.xml` and define it in request handler: