[prev in list] [next in list] [prev in thread] [next in thread] 

List:       solr-dev
Subject:    [jira] Updated: (SOLR-49) PATCH: XSLTServletFilter
From:       "Hoss Man (JIRA)" <jira () apache ! org>
Date:       2006-10-17 21:35:35
Message-ID: 7619687.1161120935451.JavaMail.jira () brutus
[Download RAW message or body]

     [ http://issues.apache.org/jira/browse/SOLR-49?page=all ]

Hoss Man updated SOLR-49:
-------------------------

    Attachment: SOLR-49.diff

SOLR-49.diff is solr-XSLTResponseWriter-20061016.tar.gz in svn patch form with a few \
small tweaks...

1) I removed the javadocs on the init() method in each of the concrete \
QueryResponseWriter classes so they would inherit the interface docs. 2) I added a \
small unit test to demonstrate that the stylesheet was being applied

I think this is commitable as is, but one small thing occured to me that i wanted to \
get concensus on first: right now this can be used to expose any file in the \
${solr.home}/conf by trying to use it as an XSLT ... should it respect the  \
<gettableFiles> directive in the solrconfig.xml -- which might be anoying since it \
requires explicitly listing each file, or should we change this to only look at files \
in some new ${solr.home}/xslt (or ${solr.home}/conf/xslt) directory?

another minor nit: query-to-html.xsl seems like it would render the "query" as html, \
not the results of the query ... maybe we should just call it "example.xsl" ?

> PATCH: XSLTServletFilter
> ------------------------
> 
> Key: SOLR-49
> URL: http://issues.apache.org/jira/browse/SOLR-49
> Project: Solr
> Issue Type: New Feature
> Components: search
> Environment: Tested on macosx 10.4.7, JDK 1.5.0_06
> Reporter: Bertrand Delacretaz
> Assigned To: Hoss Man
> Priority: Minor
> Attachments: SOLR-49.diff, solr-XSLTResponseWriter-20060922.tar.gz, \
> solr-XSLTResponseWriter-20061016.tar.gz, solr-XSLTResponseWriter-files.tar.gz, \
> xslt-filter-files.tar.gz 
> 
> Patch that implements server-side XSLT transforms of query results.
> The filter is activated by using select/html instead of select/ to run queries, and \
> optionally adding a transform parameter to specify the XSLT transform to use, for \
> example: http://localhost:8983/solr/select/html?q=usage&transform=my.xsl
> In which case my.xsl should be found in solr/conf/xslt/ with the example \
> configuration. The default transform (solr/conf/xslt/query-to-html.xsl) outputs a \
> simplistic HTML format. Performance is suboptimal, as the filter reparses the XML \
> output generated by Solr. Modifying the XMLWriter to output to a ContentHandler \
> would be more efficient, but I didn't have time to go that far. The \
> TransformerProvider trivially caches the last Transformer used, could be improved \
> using an LRU cache of several transformers, I haven't checked if Solr's \
> infrastructure contains such an animal already. The patch is all new files, except \
> for adding this in web.xml before the first <servlet>: <filter>
> <filter-name>xslt</filter-name>
> <filter-class>org.apache.solr.xslt.XSLTServletFilter</filter-class>
> </filter>
> <!-- apply the XSLT filter when select/html is used to make queries -->  
> <filter-mapping>
> <filter-name>xslt</filter-name>
> <url-pattern>/select/html/*</url-pattern>
> </filter-mapping> 
> I've left the client-side XSLT stuff (stylesheet parameter) as is for the moment.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: \
                http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic