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

ASF subversion and git services commented on SOLR-17185:
--------------------------------------------------------

Commit ad58a8d166f01b69738a7b5ded65651336022809 in solr's branch 
refs/heads/main from Torsten Bøgh Köster
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=ad58a8d166f ]

[SOLR-17185] Open ValueAugmenter in ValueAugmenterFactory for extension (#2315)

* Open value augmenter for extension

* [SOLR-17185] add public compile test

* [SOLR-17185] change visibility of fields

* [SOLR-17185] add license file // tidy

> 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
>          Time Spent: 1h 40m
>  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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to