You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2014/03/16 05:51:50 UTC

[jira] [Updated] (SOLR-5701) Allow DocTransformer to add arbitrary fields

     [ 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org