You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2009/08/19 00:04:14 UTC

[jira] Commented: (SOLR-1367) Provide Callback mechanism for SolrPluginUtils.docListToSolrDocumentList

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

Yonik Seeley commented on SOLR-1367:
------------------------------------

I'm puzzled wondering why this is an improvement.

New:
{code}
SolrDocumentList sdocs = docListToSolrDocumentList(dlist,..., 
  new SolrDocumentModifier() {
    void process(SolrDocument doc) {
      doc.add("foo",1);
    }
  }, 
...);
{code}

Old:
{code}
SolrDocumentList sdocs = docListToSolrDocumentList(dlist,...,...);
for (SolrDocument doc : sdocs) {
  d.add("foo",1);
}
{code}


> Provide Callback mechanism for SolrPluginUtils.docListToSolrDocumentList
> ------------------------------------------------------------------------
>
>                 Key: SOLR-1367
>                 URL: https://issues.apache.org/jira/browse/SOLR-1367
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Grant Ingersoll
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1367.patch
>
>
> Sometimes SearchComponents need to modify the DocList.  Often times this requires two loops over the (Solr)DocList: once to convert the DocList to SolrDocList and then once to iterate the SolrDocList for the Search Component.  This can be seen in SOLR-773, for example.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.