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

gerlowskija 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 41272edac29 SOLR-17042: Deprecate V2RequestSupport interface
41272edac29 is described below

commit 41272edac29bfb788779da7fec71dbc512ce3955
Author: Jason Gerlowski <[email protected]>
AuthorDate: Sun Oct 22 21:09:12 2023 -0400

    SOLR-17042: Deprecate V2RequestSupport interface
    
    V2RequestSupport never panned out as a way to allow users to dogfood v2
    APIs in SolrJ.  Users looking to take advantage of v2 APIs in Solr
    should use v2-native SolrRequest objects directly.
---
 solr/CHANGES.txt                                               |  4 +++-
 .../src/java/org/apache/solr/client/solrj/SolrRequest.java     | 10 +++++++++-
 .../java/org/apache/solr/client/solrj/V2RequestSupport.java    |  7 ++++++-
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index dc86f0b22fd..e57cf6d0b27 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -36,7 +36,9 @@ Dependency Upgrades
 
 Other Changes
 ---------------------
-(No changes)
+* SOLR-17042: Deprecate the V2RequestSupport interface, and the associated 
`setUseV2` and `setUseBinaryV2` SolrRequest
+  methods.  SolrJ users looking to make use of v2 APIs in their applications 
can use the SolrRequest implementations
+  dedicated to that purpose. (Jason Gerlowski)
 
 ==================  9.4.0 ==================
 New Features
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/SolrRequest.java 
b/solr/solrj/src/java/org/apache/solr/client/solrj/SolrRequest.java
index f433b6c34d0..3b238b30d4f 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/SolrRequest.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/SolrRequest.java
@@ -88,13 +88,21 @@ public abstract class SolrRequest<T extends SolrResponse> 
implements Serializabl
   /**
    * If set to true, every request that implements {@link V2RequestSupport} 
will be converted to a
    * V2 API call
+   *
+   * @deprecated use v2-native {@link SolrRequest} implementations directly 
instead
    */
+  @Deprecated
   public SolrRequest<T> setUseV2(boolean flag) {
     this.usev2 = flag;
     return this;
   }
 
-  /** If set to true use javabin instead of json (default) */
+  /**
+   * If set to true use javabin instead of json (default)
+   *
+   * @deprecated use v2-native {@link SolrRequest} implementations directly 
instead
+   */
+  @Deprecated
   public SolrRequest<T> setUseBinaryV2(boolean flag) {
     this.useBinaryV2 = flag;
     return this;
diff --git 
a/solr/solrj/src/java/org/apache/solr/client/solrj/V2RequestSupport.java 
b/solr/solrj/src/java/org/apache/solr/client/solrj/V2RequestSupport.java
index d65edd1606e..47b9abe084d 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/V2RequestSupport.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/V2RequestSupport.java
@@ -17,7 +17,12 @@
 
 package org.apache.solr.client.solrj;
 
-/** A a request object is able to convert itself to V2 Request it should 
implement this interface */
+/**
+ * A a request object is able to convert itself to V2 Request it should 
implement this interface
+ *
+ * @deprecated use v2-native {@link SolrRequest} implementations directly 
instead
+ */
+@Deprecated
 public interface V2RequestSupport {
   /** If usev2 flag is set to true, return V2Request, if not, return V1 
request object */
   @SuppressWarnings({"rawtypes"})

Reply via email to