@Override public void document(Document document) { for (Field field : document.getFields()) { for (String value : field.getValues()) { field(field.getName(), value); } } }
@Override public void document(Document document) { SolrInputDocument inputDoc = new SolrInputDocument(); for (Field field : document.getFields()) { if (!isFieldIgnored(field.getName())) { inputDoc.addField(field.getName(), field.getValues()); } } try { server.add(inputDoc); } catch (SolrServerException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } super.document(document); }