List of usage examples for org.apache.solr.client.solrj SolrClient addBean
public UpdateResponse addBean(Object obj, int commitWithinMs) throws IOException, SolrServerException
From source file:net.yacy.cora.federate.solr.instance.ServerShard.java
License:Open Source License
/** * Adds a single bean specifying max time before it becomes committed * @param obj the input bean//from w ww . j av a 2 s .co m * @param commitWithinMs max time (in ms) before a commit will happen * @throws IOException If there is a low-level I/O error. * @since solr 3.5 */ @Override public UpdateResponse addBean(Object obj, int commitWithinMs) throws IOException, SolrServerException { if (!this.writeEnabled) return _dummyOKResponse; UpdateResponse ur = null; for (SolrClient s : this.shards) ur = s.addBean(obj, commitWithinMs); return ur; }