lucene-dev mailing list archives

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


ASF GitHub Bot commented on SOLR-10703:

Github user m-khl commented on a diff in the pull request:
    --- Diff: solr/core/src/java/org/apache/solr/response/transform/ ---
    @@ -88,4 +89,11 @@ public boolean needsSolrIndexSearcher() {
         return false;
    +  @Override
    +  public void finish() {
    +    for( DocTransformer a : children ) {
    +      a.finish();
    --- End diff --
    I don't think it a way to design SPI (not A). Such silence should be either enforced with
final/abstract constraints; or enforced in runtime. Imagine if some good transformer needs
finish() to release a resource, but there is some badass sibling one. and it's enbaled from
time-to-time at prod. requests. The instance will steadily leak, and it would be hard to find
out why.    

> Add prepare() and finish() into DocTransformer 
> -----------------------------------------------
>                 Key: SOLR-10703
>                 URL:
>             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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message