List of usage examples for org.apache.solr.client.solrj.response UpdateResponse setResponse
@Override
public void setResponse(NamedList<Object> response)
From source file:com.idealista.solrmeter.BaseTestCase.java
License:Apache License
protected UpdateResponse createUpdateResponse(int qTime) { UpdateResponse response = new UpdateResponse(); NamedList<Object> headerNamedList = new NamedList<Object>(); headerNamedList.add("QTime", qTime); NamedList<Object> responseNamedList = new NamedList<Object>(); responseNamedList.add("responseHeader", headerNamedList); response.setResponse(responseNamedList); return response; }
From source file:com.sindicetech.siren.solr.client.solrj.request.SirenUpdateRequest.java
License:Open Source License
@Override public UpdateResponse process(SolrServer server) throws SolrServerException, IOException { long startTime = TimeUnit.MILLISECONDS.convert(System.nanoTime(), TimeUnit.NANOSECONDS); UpdateResponse res = new UpdateResponse(); res.setResponse(server.request(this)); long endTime = TimeUnit.MILLISECONDS.convert(System.nanoTime(), TimeUnit.NANOSECONDS); res.setElapsedTime(endTime - startTime); return res;/*from w ww .ja v a2 s . c o m*/ }
From source file:ddf.catalog.cache.solr.impl.UninitializedSolrClientAdaptor.java
License:Open Source License
@Override public UpdateResponse deleteByQuery(String query) throws SolrServerException, IOException { LOGGER.debug("Called deleteByQuery on un-initialized SolrClientAdaptor. Ignoring."); UpdateResponse updateResponse = new UpdateResponse(); updateResponse.setElapsedTime(0);/*w w w . j a v a2 s . c o m*/ updateResponse.setRequestUrl(""); updateResponse.setResponse(new NamedList<>()); return updateResponse; }