[
https://issues.apache.org/jira/browse/SOLR-5701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Smiley updated SOLR-5701:
-------------------------------
Fix Version/s: (was: 4.7)
4.8
> Allow DocTransformer to add arbitrary fields
> --------------------------------------------
>
> Key: SOLR-5701
> URL: https://issues.apache.org/jira/browse/SOLR-5701
> Project: Solr
> Issue Type: Bug
> Components: search
> Reporter: yuanyun.cn
> Labels: search
> Fix For: 4.8, 5.0
>
> Original Estimate: 72h
> Remaining Estimate: 72h
>
> 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() { return null; }
> }
> 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.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]