[ 
https://issues.apache.org/jira/browse/SOLR-17185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mikhail Khludnev updated SOLR-17185:
------------------------------------
    Fix Version/s: 9.6.0

> Open ValueAugmenter in ValueAugmenterFactory for extension
> ----------------------------------------------------------
>
>                 Key: SOLR-17185
>                 URL: https://issues.apache.org/jira/browse/SOLR-17185
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Response Writers
>            Reporter: Torsten Bøgh Köster
>            Priority: Major
>             Fix For: 9.6.0
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> Opening up the class `ValueAugmenter` in the `ValueAugmenterFactory` to 
> `public` access level eases the creation of custom document transformers. 
> Currently, we have to place our custom document transformers in the 
> `org.apache.solr.response.transform` package to be able to access the package 
> private `ValueAugmenter`. Changing the visibility to `public` enables 
> building custom document transformers very slim and quick like the following 
> one in any package:
> ```
> public class CollectionAugmenterFactory extends TransformerFactory {
>     @Override
>     public DocTransformer create(String field, SolrParams params, 
> SolrQueryRequest req) {
>         String v = 
> ComponentUtils.getCollectionNameFrom(req.getCore()).orElse("[unknown]");
>         return new ValueAugmenterFactory.ValueAugmenter(field, v);
>     }
> }
> ```
> I'll supply a GitHub PR for this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to