mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ACE-2857: Solr 4: Index backup fails.
Fixed to use XML rather than the javabin protocol. Will revert if it is a performance issue. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@85554 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -36,6 +36,7 @@ import org.apache.commons.httpclient.UsernamePasswordCredentials;
|
||||
import org.apache.commons.httpclient.auth.AuthScope;
|
||||
import org.apache.solr.client.solrj.SolrServerException;
|
||||
import org.apache.solr.client.solrj.impl.CommonsHttpSolrServer;
|
||||
import org.apache.solr.client.solrj.impl.XMLResponseParser;
|
||||
import org.apache.solr.client.solrj.response.QueryResponse;
|
||||
import org.apache.solr.common.params.ModifiableSolrParams;
|
||||
import org.apache.solr.common.util.NamedList;
|
||||
@@ -159,6 +160,7 @@ public class SOLRAdminClient implements ApplicationEventPublisherAware, Disposab
|
||||
HttpClient httpClient = httpClientFactory.getHttpClient();
|
||||
|
||||
server = new CommonsHttpSolrServer(solrUrl, httpClient);
|
||||
server.setParser(new XMLResponseParser());
|
||||
// TODO remove credentials because we're using SSL?
|
||||
Credentials defaultcreds = new UsernamePasswordCredentials(solrUser, solrPassword);
|
||||
server.getHttpClient().getState().setCredentials(new AuthScope(solrHost, solrPort, AuthScope.ANY_REALM),
|
||||
|
Reference in New Issue
Block a user