@Override
  public void document(Document document) {
    Map<String, String> documentMap = new HashMap<String, String>();
    for (Field field : document.getFields()) {
      documentMap.put(field.getName(), field.getValue());
    }

    StrSubstitutor sub = new StrSubstitutor(documentMap);
    String value = sub.replace(output);

    document.addField(outputField, value);

    super.document(document);
  }
  @Override
  public void end() {

    List<String> dictionaryList = new ArrayList<String>(dictionary);
    Collections.sort(dictionaryList);

    for (String value : dictionaryList) {
      Document document = new Document();
      document.addField("noun", value);
      super.document(document);
    }

    super.end();
  }
 @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);
  }