You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alexandre Rafalovitch (JIRA)" <ji...@apache.org> on 2015/11/09 18:00:12 UTC

[jira] [Commented] (SOLR-7915) Provide pluggable Velocity context tool facility

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

Alexandre Rafalovitch commented on SOLR-7915:
---------------------------------------------

Will this also be configurable through the other ways we do it? paramsets, REST, etc? Not sure if  *<lst name="tools">* would cause issues. [~noble.paul]?

> Provide pluggable Velocity context tool facility
> ------------------------------------------------
>
>                 Key: SOLR-7915
>                 URL: https://issues.apache.org/jira/browse/SOLR-7915
>             Project: Solr
>          Issue Type: Improvement
>          Components: contrib - Velocity
>    Affects Versions: 5.3
>            Reporter: Erik Hatcher
>            Assignee: Erik Hatcher
>             Fix For: 5.4, Trunk
>
>         Attachments: SOLR-7915.patch
>
>
> Currently the "tools" placed in the VelocityResponseWriter's context are hard-coded.  It can be very handy to be able to plug in 3rd party or custom tools (just any ol' Java object a "tool" can be).
> Here's a list of the currently hard-coded tools: https://github.com/apache/lucene-solr/blob/trunk/solr/contrib/velocity/src/java/org/apache/solr/response/VelocityResponseWriter.java#L189-L199
> ----
> The implementation committed allows custom tools to be registered as part of the VelocityResponseWriter definition in solrconfig.xml like this:
> {code}
>         <queryResponseWriter name="velocityWithCustomTools" class="solr.VelocityResponseWriter">
>           <lst name="tools">
>             <str name="mytool">com.example.solr.velocity.MyTool</str>
>             <!-- ... -->
>           </lst>
>         </queryResponseWriter>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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