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

Erik Hatcher updated SOLR-7915:
-------------------------------
    Description: 
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}

  was:
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


> 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: Trunk, 5.4
>
>         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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to