lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-10703) Add prepare() and finish() into DocTransformer
Date Wed, 07 Jun 2017 20:37:18 GMT

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

ASF GitHub Bot commented on SOLR-10703:
---------------------------------------

Github user m-khl commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/202#discussion_r120737742
  
    --- Diff: solr/core/src/java/org/apache/solr/response/transform/DocTransformer.java ---
    @@ -41,12 +41,26 @@
        */
       public abstract String getName();
     
    +
    +  /**
    +   * This is called before {@link #transform} to provide context for any subsequent transformations.
    +   *
    +   * @param context The {@link ResultContext} stores information about how the documents
were produced.
    +   * @see #needsSolrIndexSearcher
    +   */
    +  public void prepare( ResultContext context ) {
    --- End diff --
    
    I suppose if anything can be done with existing facilities, they should be utilised. I
don't take it much if some name is misleading. We have a lot of much more severe issues and
live with them.  -1 for "just add"


> Add prepare() and finish() into DocTransformer 
> -----------------------------------------------
>
>                 Key: SOLR-10703
>                 URL: https://issues.apache.org/jira/browse/SOLR-10703
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Diego Ceccarelli
>            Priority: Minor
>             Fix For: master (7.0)
>
>
> This patch adds a {{prepare}} and a {{finish}} method to the interface of {{DocTransformer}}
allowing a developer to perform actions before/after a doc transformer is applied to a result
set. My use case was to benchmark the performance of a transformer, since transformer time
is not part of {{QTime}}. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message