@Test public void testAdd() throws Exception { solrOutput.setFieldMappings(new HashMap<String, Object>()); LocalDocument doc = new LocalDocument(); doc.setAction(Action.ADD); doc.putContentField("name", "jonas"); solrOutput.output(doc); Mockito.verify(mockServer).add( Mockito.any(SolrInputDocument.class)); }
private void add(LocalDocument doc) throws SolrServerException, IOException { SolrInputDocument solrdoc = createSolrInputDocumentWithFieldConfig(doc); if (getCommitWithin() != 0) { solr.add(solrdoc, getCommitWithin()); } else { solr.add(solrdoc); } }
SolrOutputStage extends AbstractOutputStage { private void add(LocalDocument doc) throws SolrServerException, IOException { SolrInputDocument solrdoc = createSolrInputDocumentWithFieldConfig(doc); if (getCommitWithin() != 0) { solr.add(solrdoc, getCommitWithin()); } else { solr.add(solrdoc); } } }
SolrOutputStage extends AbstractOutputStage { private void add(LocalDocument doc) throws SolrServerException, IOException { SolrInputDocument solrdoc = createSolrInputDocumentWithFieldConfig(doc); if (getCommitWithin() != 0) { solr.add(solrdoc, getCommitWithin()); } else { solr.add(solrdoc); } }  }
SolrOutputStage extends AbstractOutputStage { private void add(LocalDocument doc) throws SolrServerException, IOException { SolrInputDocument solrdoc = createSolrInputDocumentWithFieldConfig(doc); if (getCommitWithin() != 0) { solr.add(solrdoc, getCommitWithin()); } else { solr.add(solrdoc); } }  @Override void output(LocalDocument doc); @Override void init(); Map<String, Object> getFieldMappings(); void setFieldMappings(Map<String, Object> fieldConfigs); int getCommitWithin(); void setCommitWithin(int commitWithin); }
SolrOutputStage extends AbstractOutputStage { private void add(LocalDocument doc) throws SolrServerException, IOException { SolrInputDocument solrdoc = createSolrInputDocumentWithFieldConfig(doc); if (getCommitWithin() != 0) { solr.add(solrdoc, getCommitWithin()); } else { solr.add(solrdoc); } }  @Override void output(LocalDocument doc); @Override void init(); Map<String, Object> getFieldMappings(); void setFieldMappings(Map<String, Object> fieldConfigs); int getCommitWithin(); void setCommitWithin(int commitWithin);  }