lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noble Paul (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-8056) Solrj client constructor does not accept custom SolrParams
Date Tue, 15 Sep 2015 16:00:46 GMT

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

Noble Paul commented on SOLR-8056:
----------------------------------

Isn't it already supported?

> Solrj client constructor does not accept custom SolrParams
> ----------------------------------------------------------
>
>                 Key: SOLR-8056
>                 URL: https://issues.apache.org/jira/browse/SOLR-8056
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrJ
>    Affects Versions: 4.10.3
>            Reporter: Hrishikesh Gadre
>            Priority: Minor
>
> Solrj users can customize the Http client by overriding HttpClientConfigurer class (e.g.
Krb5HttpClientConfigurer). But Solrj does not allow this customization at an individual SolrClient
level. e.g. HttpSolrClient does not have a constructor which accepts default SolrParams which
would be passed down to HttpClientUtil while creating an internal client.
> I observed this while working on supporting Basic authentication with Solr (4.10.3) version.
As a work-around, I had to use external Http client support in Solr. e.g.
> -----------------------------BEFORE------------------------------
> CloudSolrServer  cloudSolrServer = new CloudSolrServer(zkEnsemble);
> ------------------------------AFTER--------------------------------
> ModifiableSolrParams solrParams = new ModifiableSolrParams();
> solrParams.set(HttpClientUtil.PROP_BASIC_AUTH_USER, getLdapUserName());
> solrParams.set(HttpClientUtil.PROP_BASIC_AUTH_PASS, getLdapUserPasswd());
> DefaultHttpClient client = (DefaultHttpClient) HttpClientUtil.createClient(solrParams);
> cloudSolrServer = new CloudSolrServer(zkEnsemble, new LBHttpSolrServer(client));
> --------------------------------------------------------------------------------------------------
> I think it would be great necessary constructors in the SolrClient implementations so
that users can pass custom properties during initialization.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message