You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Sanjay Dutt (Jira)" <ji...@apache.org> on 2024/09/11 14:37:00 UTC

[jira] [Commented] (SOLR-17256) Remove SolrRequest.getBasePath setBasePath

    [ https://issues.apache.org/jira/browse/SOLR-17256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17880997#comment-17880997 ] 

Sanjay Dutt commented on SOLR-17256:
------------------------------------

I might not fully understand the entire rationale behind this decision yet, but I believe managing the URI should be the responsibility of the request, not the client. A good example of this is the JDK 11 Http package [https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpRequest.Builder.html], where the request builder is in charge of setting up the URL, not the client. 

> Remove SolrRequest.getBasePath setBasePath
> ------------------------------------------
>
>                 Key: SOLR-17256
>                 URL: https://issues.apache.org/jira/browse/SOLR-17256
>             Project: Solr
>          Issue Type: Improvement
>          Components: SolrJ
>            Reporter: David Smiley
>            Priority: Minor
>              Labels: newdev
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> SolrRequest has a getBasePath & setBasePath.  The naming is poor; it's the URL base to the Solr node like "http://localhost:8983/solr".  It's only recognized by HttpSolrClient; LBSolrClient (used by CloudSolrClient) ignores it and will in fact mutate the passed in request to its liking, which is rather ugly because it means a request cannot be used concurrently if the user wants to.  But moreover I think there's a conceptual discordance of placing this concept on SolrRequest given that some clients want to route requests to nodes *they* choose.  I propose removing this from SolrRequest and instead adding a method specific to HttpSolrClient.  Almost all existing usages of setBasePath immediately execute the request on an HttpSolrClient, so should be easy to change.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org