Description
DocTransformer is very powerful, and allow us to add/remove or update fields before returning.
One limit we don't like is that it can only add one field, and the field name must be [transformer_name].
We may want to add multiple fields in one DocTransformer.
One possible solution is to add method getFieldNames into DocTransformer.
public abstract class DocTransformer{
public void List<String> getFieldNames()
}
Then in SolrReturnFields.add(String, NamedList<String>, DocTransformers, SolrQueryRequest)
Change augmenters.addTransformer( factory.create(disp, augmenterParams, req) ); like below:
DocTransformer docTransfomer = factory.create(disp, augmenterParams, req);
SolrReturnFields.add(docTransfomer);
then read fi3eldnames: docTransfomer.getFieldNames(); add them into SolrReturnFields.
DocTransfomer implementation would add all fields via doc.addField.