Susheel Kumar created SOLR-9370:
-----------------------------------
Summary: Add sample code snippet to confluence documentaion for
Basic Authentication
Key: SOLR-9370
URL: https://issues.apache.org/jira/browse/SOLR-9370
Project: Solr
Issue Type: Task
Security Level: Public (Default Security Level. Issues are Public)
Components: documentation
Reporter: Susheel Kumar
Priority: Minor
Please add below code snippet to under "Using BasicAuth with SolrJ" as current
code "snippet" doesn't give visibility on how basic authentication can be set
when querying
How to set credentials when querying using SolrJ - Basic Authentication
=========
SolrQuery query = new SolrQuery();
query.setQuery("*:*");
// Do any other query setup needed.
SolrRequest<QueryResponse> req = new QueryRequest(query);
req.setBasicAuthCredentials(userName, password);
QueryResponse rsp = req.process(solrClient, collection);
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]