[jira] Commented: (SOLR-1566) Allow components to add fields to outgoing documents

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[jira] Commented: (SOLR-1566) Allow components to add fields to outgoing documents

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/SOLR-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004800#comment-13004800 ]

Ryan McKinley commented on SOLR-1566:

Updated patch.  This changes the the API to:
public abstract class DocTransformer
  public void setContext( TransformContext context ) {}
  public abstract void transform(SolrDocument doc, int docid);

This will let the TransformContext hold objects that may be useful for filling up the SolrDocument later.  

For example, the DocIterator is included in TransformContext and that is used to fill in the score (rather then passing Float score to every transformer).  Another example would be if we have the Query object and want to add 'explain' info directly to the document.

Bill -- re geodist(), yes that is my real motivation for this!  see SOLR-1298

Something is still weird with the Distributed search stuff, but figure I should get feedback on general approach before worrying about that.

> Allow components to add fields to outgoing documents
> ----------------------------------------------------
>                 Key: SOLR-1566
>                 URL: https://issues.apache.org/jira/browse/SOLR-1566
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Noble Paul
>            Assignee: Grant Ingersoll
>             Fix For: Next
>         Attachments: SOLR-1566-DocTransformer.patch, SOLR-1566-DocTransformer.patch, SOLR-1566-gsi.patch, SOLR-1566-rm.patch, SOLR-1566-rm.patch, SOLR-1566-rm.patch, SOLR-1566-rm.patch, SOLR-1566-rm.patch, SOLR-1566.patch, SOLR-1566.patch, SOLR-1566.patch, SOLR-1566.patch
> Currently it is not possible for components to add fields to outgoing documents which are not in the the stored fields of the document.  This makes it cumbersome to add computed fields/metadata .

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]