@Test public void multivalueFieldsShouldTranslate() { SolrInputDocument doc = new SolrInputDocument(); doc.addField("rowid", "123"); SolrInputDocument child = new SolrInputDocument(); child.addField("recordid", "1"); child.addField("fam.key", "value1"); child.addField("fam.key", "value2"); doc.addChildDocument(child); RowMutation mutate = RowMutationHelper.from(doc, "foo"); List<Object> vals = getRecordValues("key", mutate); assertEquals("Should get both values back.", 2, vals.size()); assertEquals("value1", vals.get(0).toString()); assertEquals("value2", vals.get(1).toString()); }
public static List<RowMutation> from(Collection<SolrInputDocument> docs, String table) { List<RowMutation> mutations = Lists.newArrayList(); for (SolrInputDocument d : docs) { mutations.add(from(d, table)); } return mutations; }
RowMutationHelper { public static List<RowMutation> from(Collection<SolrInputDocument> docs, String table) { List<RowMutation> mutations = Lists.newArrayList(); for (SolrInputDocument d : docs) { mutations.add(from(d, table)); } return mutations; } }
RowMutationHelper { public static List<RowMutation> from(Collection<SolrInputDocument> docs, String table) { List<RowMutation> mutations = Lists.newArrayList(); for (SolrInputDocument d : docs) { mutations.add(from(d, table)); } return mutations; }  }
RowMutationHelper { public static List<RowMutation> from(Collection<SolrInputDocument> docs, String table) { List<RowMutation> mutations = Lists.newArrayList(); for (SolrInputDocument d : docs) { mutations.add(from(d, table)); } return mutations; }  static List<RowMutation> from(Collection<SolrInputDocument> docs, String table); static RowMutation from(SolrInputDocument doc, String table); }
RowMutationHelper { public static List<RowMutation> from(Collection<SolrInputDocument> docs, String table) { List<RowMutation> mutations = Lists.newArrayList(); for (SolrInputDocument d : docs) { mutations.add(from(d, table)); } return mutations; }  static List<RowMutation> from(Collection<SolrInputDocument> docs, String table); static RowMutation from(SolrInputDocument doc, String table);  }