use of org.apache.solr.client.solrj.request.RequestWriter in project lucene-solr by apache.
the class SolrExampleStreamingTest method createNewSolrClient.
@Override
public SolrClient createNewSolrClient() {
try {
// setup the server...
String url = jetty.getBaseUrl().toString() + "/collection1";
// smaller queue size hits locks more often
ConcurrentUpdateSolrClient concurrentClient = new ErrorTrackingConcurrentUpdateSolrClient(url, 2, 5);
concurrentClient.setParser(new XMLResponseParser());
concurrentClient.setRequestWriter(new RequestWriter());
return concurrentClient;
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
use of org.apache.solr.client.solrj.request.RequestWriter in project lucene-solr by apache.
the class SolrExampleXMLTest method createNewSolrClient.
@Override
public SolrClient createNewSolrClient() {
try {
String url = jetty.getBaseUrl().toString() + "/collection1";
HttpSolrClient client = getHttpSolrClient(url);
client.setUseMultiPartPost(random().nextBoolean());
client.setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
client.setParser(new XMLResponseParser());
client.setRequestWriter(new RequestWriter());
return client;
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
Aggregations