lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Susheel Kumar <susheel2...@gmail.com>
Subject How to set credentials when querying using SolrJ - Basic Authentication
Date Mon, 01 Aug 2016 19:59:29 GMT
Hello,

I am looking to pass user / pwd when querying using CloudSolrClient.  The
documentation
https://cwiki.apache.org/confluence/display/solr/Basic+Authentication+Plugin
describes about setting the credential when calling the request method like
below

SolrRequest req ;//create a new request object
req.setBasicAuthCredentials(userName, password);
solrClient.request(req);

BUT how do we set the credentials when calling


//HOW to set credentials before calling query method
???????
???????
solrClient.query(collection, query);    method?


Looking the CloudSolrClient source code, i see query method creates a new
QueryRequest object and thus doesn't provide a easy way to set
credentials.  Is there any way to easily hook/set credentials when calling
query method using SolrJ?

Thanks,
Susheel






==

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message