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

Ishan Chattopadhyaya commented on SOLR-9860:
--------------------------------------------

Looks good. 
Just a couple of thoughts:
# In the HSC,
{code}
    public Builder withInvariantParams(ModifiableSolrParams params) {
      Objects.requireNonNull(params, "params must be non null!");

      for (String name : params.getParameterNames()) {
        if (this.invariantParams.get(name) != null) {
          throw new IllegalStateException("parameter " + name + " is 
redefined.");
        }
      }

      this.invariantParams.add(params);
      return this;
    }
{code}
Shouldn't it be possible for a user to, say, have multiple "fq" parameters? I 
think trying this here would trigger the {{"parameter fq is redefined."}} 
exception.
# Wondering if we can add a test that uses the {{withInvariantParams}} method?

> Enable configuring invariantParams via HttpSolrClient.Builder
> -------------------------------------------------------------
>
>                 Key: SOLR-9860
>                 URL: https://issues.apache.org/jira/browse/SOLR-9860
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 6.3
>            Reporter: Hrishikesh Gadre
>            Priority: Minor
>
> HttpSolrClient provides a facility to add default parameters for every 
> request via the invariantParams attribute. Currently HttpSolrClient.Builder 
> does not provide any option to configure this attribute. This jira is to add 
> this functionality.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to