You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Ryan McKinley (JIRA)" <ji...@apache.org> on 2007/02/05 20:22:05 UTC

[jira] Created: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

RawResponseWriter - replace /admin/get-file.jsp
-----------------------------------------------

                 Key: SOLR-142
                 URL: https://issues.apache.org/jira/browse/SOLR-142
             Project: Solr
          Issue Type: Improvement
          Components: web gui
            Reporter: Ryan McKinley
            Priority: Trivial


A RawResponseWriter writes a ContentStream directly to the response.

This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.

As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley updated SOLR-142:
-------------------------------

    Attachment: SOLR-142-RawResponseWriter.patch

> RawResponseWriter - replace /admin/get-file.jsp
> -----------------------------------------------
>
>                 Key: SOLR-142
>                 URL: https://issues.apache.org/jira/browse/SOLR-142
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Ryan McKinley
>            Priority: Trivial
>         Attachments: SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch
>
>
> A RawResponseWriter writes a ContentStream directly to the response.
> This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.
> As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: Admin interface configuration changes?

Posted by Chris Hostetter <ho...@fucit.org>.
: In looking into how to replace get-file.jsp and how to have an upload
: page for /update and /update/csv, I stumbled on the idea that we could
: have the list of options for what is displayed in the admin interface
: configured in solrconfig.xml.

blast from the past ... this is reminding me of a brainstorming session i
had with some CNET folks back before Solar became Apache Solar ... notes
from that meeting eventually made there way here...

	http://wiki.apache.org/solr/MakeSolrMoreSelfService

...in general, i think you're on the right track.  the one big adition i
would make is to ensure that external links are supported as well, and
that some arbitrary text can be included verbatim on the admin screen.

(and of course: if none of this info is in the <admin> block, we need the
old defaults still in index.jsp for backwards compatibility)



-Hoss


Admin interface configuration changes?

Posted by Ryan McKinley <ry...@gmail.com>.
As we move to arbitrary path based configuration, the JSP admin pages 
don't really know where things are and what to link to.

In looking into how to replace get-file.jsp and how to have an upload 
page for /update and /update/csv, I stumbled on the idea that we could 
have the list of options for what is displayed in the admin interface 
configured in solrconfig.xml.

Perhaps something like:

<admin>
     <defaultQuery>solr</defaultQuery>
     <header>
       <links name="solr">
         <link name="Schema"   path="/admin/file?file=schema.xml" />
         <link name="Config"   path="/admin/file?file=solrconfig.xml" />
         <link name="Analysis" path="/admin/analysis.jsp" />
         <br/>
         <link name="Statistics"   path="/admin/stats.jsp" />
         <link name="Info"         path="/admin/registry.jsp" />
         <link name="Distribution" path="/admin/distributiondump.jsp" />
         <link name="Ping"         path="/admin/ping" />
         <link name="Logging"      path="/admin/logging.jsp" />
       </links>
       <links name="update">
         <link name="Update" path="/admin/?show=update.html" />
         <link name="CSV"    path="/admin/?show=updatecsv.html" />
       </links>
       <links name="App server">
         <link name="Properties"   path="/admin/properties" />
         <link name="Thread Dump"  path="/admin/threaddump.jsp" />
       </links>
     </header>
    ...

Thoughts?



[jira] Commented: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492410 ] 

Hoss Man commented on SOLR-142:
-------------------------------

I still haven't looked at Ryan's latest patch on this issue (from Feb!) but if the only issue is that /admin/get-file.jsp has been deleted so links on the admin screen won't work because they assume the new handler, then maybe the best way to solve this is:

1) change the admin.jsp screen not to include links to either get-file.jsp or the new GetFile handler by default (a good idea since people might want to change the name of the handler) but if a gettableFiles section exists in the solrconfig, continue to link to get-files.jsp
2) document in the CHANGES recommending that people use the new GetFile handler and add links to it in an admin-extras.html file (since only they know which handler name they used)
3) makr get-files.jsp as heavily deprecated (so we can eventually get rid of it) and make it delegate to an anonymous on the fly created instance of the GetFile handler.


> RawResponseWriter - replace /admin/get-file.jsp
> -----------------------------------------------
>
>                 Key: SOLR-142
>                 URL: https://issues.apache.org/jira/browse/SOLR-142
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Ryan McKinley
>            Priority: Trivial
>         Attachments: SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch
>
>
> A RawResponseWriter writes a ContentStream directly to the response.
> This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.
> As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley updated SOLR-142:
-------------------------------

    Attachment: SOLR-142-RawResponseWriter.patch

> RawResponseWriter - replace /admin/get-file.jsp
> -----------------------------------------------
>
>                 Key: SOLR-142
>                 URL: https://issues.apache.org/jira/browse/SOLR-142
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Ryan McKinley
>            Priority: Trivial
>         Attachments: SOLR-142-RawResponseWriter.patch
>
>
> A RawResponseWriter writes a ContentStream directly to the response.
> This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.
> As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492592 ] 

Ryan McKinley commented on SOLR-142:
------------------------------------

I think the best thing to do now is split this into two issues:  

1. just the RawResponseWriter and the GetFile handler.  (you did review this way back in feb!)
2. Update the admin .jsp to use the new handlers wherever possible and provide a path to support path based request handlers going forward

> RawResponseWriter - replace /admin/get-file.jsp
> -----------------------------------------------
>
>                 Key: SOLR-142
>                 URL: https://issues.apache.org/jira/browse/SOLR-142
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Ryan McKinley
>            Priority: Trivial
>         Attachments: SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch
>
>
> A RawResponseWriter writes a ContentStream directly to the response.
> This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.
> As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley reassigned SOLR-142:
----------------------------------

    Assignee: Ryan McKinley

> RawResponseWriter - replace /admin/get-file.jsp
> -----------------------------------------------
>
>                 Key: SOLR-142
>                 URL: https://issues.apache.org/jira/browse/SOLR-142
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Trivial
>         Attachments: SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch
>
>
> A RawResponseWriter writes a ContentStream directly to the response.
> This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.
> As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley updated SOLR-142:
-------------------------------

    Attachment: SOLR-142-RawResponseWriter.patch

Updated so that SOLR-447 AdminHandler automatically registers the ShowFile handler

> RawResponseWriter - replace /admin/get-file.jsp
> -----------------------------------------------
>
>                 Key: SOLR-142
>                 URL: https://issues.apache.org/jira/browse/SOLR-142
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Ryan McKinley
>            Priority: Trivial
>         Attachments: SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch
>
>
> A RawResponseWriter writes a ContentStream directly to the response.
> This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.
> As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley resolved SOLR-142.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3

> RawResponseWriter - replace /admin/get-file.jsp
> -----------------------------------------------
>
>                 Key: SOLR-142
>                 URL: https://issues.apache.org/jira/browse/SOLR-142
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>            Priority: Trivial
>             Fix For: 1.3
>
>         Attachments: SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch
>
>
> A RawResponseWriter writes a ContentStream directly to the response.
> This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.
> As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470729 ] 

Hoss Man commented on SOLR-142:
-------------------------------

Ryan, i really like the idea of a RawResponseWriter, and your GetAdminFileRequestHandler ... for a hwile now i've been thinking that it would be good to change the admin/gettableFiles section of hte solrconfig so that...
   * files could have a default content-type specified
   * direcotries could be listed (with a content-type to assume for all files in that directory)
...and then replace get-file.jsp with a servlet that used the extra path info to find the filename, and supported query args to override the default content-type with text/plain

my motivation being to help with things like SOLR-75 where we sometimes need the schema as XML, but othertimes we want to return it as plain text ... and to let the XmlResponseWriter start supporting useful params telling it what stylesheet from the xslt directory to include in the response (for client site styling using a stylesheet served from the solr server)

 -- but i like your idea of a RequestHandler/ResponseWriter better.

we should consier deprecating admin/gettableFiles completley, and moving the info about what file are gettable directly into the init params for the GetAdminFileRequestHandler (where it can also support the content-type/direcotry stuff that i described)

in that case, we'd need to leave get-files.jsp where it is, so something still supports the legacy admin/gettableFiles list of files.

> RawResponseWriter - replace /admin/get-file.jsp
> -----------------------------------------------
>
>                 Key: SOLR-142
>                 URL: https://issues.apache.org/jira/browse/SOLR-142
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Ryan McKinley
>            Priority: Trivial
>         Attachments: SOLR-142-RawResponseWriter.patch
>
>
> A RawResponseWriter writes a ContentStream directly to the response.
> This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.
> As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley updated SOLR-142:
-------------------------------

    Attachment: SOLR-142-RawResponseWriter.patch

resurrecting an old patch from February.  This uses the request handler framework to return raw admin files.

> RawResponseWriter - replace /admin/get-file.jsp
> -----------------------------------------------
>
>                 Key: SOLR-142
>                 URL: https://issues.apache.org/jira/browse/SOLR-142
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Ryan McKinley
>            Priority: Trivial
>         Attachments: SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch
>
>
> A RawResponseWriter writes a ContentStream directly to the response.
> This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.
> As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-142:
--------------------------

    Attachment: SOLR-142-RawResponseWriter.patch

revised version of Ryan's latest patch -- just adds some documentation.

the patch is nice and clean and simple -- but without anything illustrating it's use i'm hesitent to commit it.

(i know a lot of the previous code in this issue got migrated to SOLR-162, but perhaps at least the GetAdminFileRequestHandler should be part of this patch so the basic functionality for getting a file and writing it's raw stream is commited all at once.

> RawResponseWriter - replace /admin/get-file.jsp
> -----------------------------------------------
>
>                 Key: SOLR-142
>                 URL: https://issues.apache.org/jira/browse/SOLR-142
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Ryan McKinley
>            Priority: Trivial
>         Attachments: SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch
>
>
> A RawResponseWriter writes a ContentStream directly to the response.
> This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.
> As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470323 ] 

Ryan McKinley commented on SOLR-142:
------------------------------------

The RawResponseWriter is configured by default (just like JSON etc)

One could create it explicitly and specify what 'base' response writer it should use (JSON etc)
 
 <queryResponseWriter name="raw" class="org.apache.solr.request.RawResponseWriter">
    <int name="base">JSON</int>
 </queryResponseWriter> 

- - - - - - - 

I added a GetAdminFileRequestHandler that is configured to use wt=raw by default.  I wanted to delete get-file.jsp, but it is needed to include:

<jsp:include page="get-file.jsp?file=admin-extra.html&optional=y" flush="true"/>

(which, by the way, spits out HTML in the middle of a table declaration)

- - - - - - - - -

I deleted raw-schema.jsp that did not appear to be referenced by anything

- - - - -  - - -

I could not help myself and added:  GetSystemPropertiesRequestHandler and deleted get-properties.jsp.  Unlike get-properties.jsp, GetSystemPropertiesRequestHandler  spits back properties formatted by the selected ResponseWriter.  It also added the ability to get a single property


> RawResponseWriter - replace /admin/get-file.jsp
> -----------------------------------------------
>
>                 Key: SOLR-142
>                 URL: https://issues.apache.org/jira/browse/SOLR-142
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Ryan McKinley
>            Priority: Trivial
>         Attachments: SOLR-142-RawResponseWriter.patch
>
>
> A RawResponseWriter writes a ContentStream directly to the response.
> This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.
> As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley updated SOLR-142:
-------------------------------

    Attachment: SOLR-142-RawResponseWriter.patch

this version of the patch is only the RawResponseWriter.  I am moving all the admin changes to SOLR-162.  For an example of the RawResponseWriter in use, see that patch.

> RawResponseWriter - replace /admin/get-file.jsp
> -----------------------------------------------
>
>                 Key: SOLR-142
>                 URL: https://issues.apache.org/jira/browse/SOLR-142
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Ryan McKinley
>            Priority: Trivial
>         Attachments: SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch
>
>
> A RawResponseWriter writes a ContentStream directly to the response.
> This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.
> As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471426 ] 

Ryan McKinley commented on SOLR-142:
------------------------------------

Posted an update to this patch.  It may be getting away from my original goal to get a RawRequestHandler committed soon... but oh well.

This adds RequestHandlers for a bunch of admin thing that could (should) be spit back in the standard response writer format.

some urls to check:

http://localhost:8983/solr/admin/file
http://localhost:8983/solr/admin/file?file=protwords.txt
http://localhost:8983/solr/admin/file?file=schema.xml
http://localhost:8983/solr/admin/file?file=schema.xml&txt=true
http://localhost:8983/solr/admin/threads
http://localhost:8983/solr/admin/registry
http://localhost:8983/solr/admin/registry?wt=json&indent=true
http://localhost:8983/solr/admin/stats
http://localhost:8983/solr/admin/ping
http://localhost:8983/solr/admin/properties
http://localhost:8983/solr/admin/properties?name=java.home
http://localhost:8983/solr/admin/logging
http://localhost:8983/solr/admin/logging?set=FINE

To get these to display nicely, we would need an xls file and link to:
http://localhost:8983/solr/admin/stats?stylesheet=admin.xls

I like this direction because it moves solr away from the need for a JDK, removes a bunch of code from jsp scriptlets, and makes the admin info easily available to clients through JSON/xml etc.


> RawResponseWriter - replace /admin/get-file.jsp
> -----------------------------------------------
>
>                 Key: SOLR-142
>                 URL: https://issues.apache.org/jira/browse/SOLR-142
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Ryan McKinley
>            Priority: Trivial
>         Attachments: SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch
>
>
> A RawResponseWriter writes a ContentStream directly to the response.
> This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.
> As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-142) RawResponseWriter - replace /admin/get-file.jsp

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley updated SOLR-142:
-------------------------------

    Attachment: SOLR-142-RawResponseWriter.patch

Thanks for looking at that.  Here is an updated version that includes GetAdminFileRequestHandler.java from SOLR-162

This patch also deletes /admin/get-file.jsp and changes to /admin/index.jsp that point to this handler.  That is good because it moves away from some ugly jsp scriptlet code - it is bad because if someone just updates the .war file without updating solrconfig.xml they will get a 404.  

You make the call on what part is appropriate to add at this time.  

thanks
ryan




> RawResponseWriter - replace /admin/get-file.jsp
> -----------------------------------------------
>
>                 Key: SOLR-142
>                 URL: https://issues.apache.org/jira/browse/SOLR-142
>             Project: Solr
>          Issue Type: Improvement
>          Components: web gui
>            Reporter: Ryan McKinley
>            Priority: Trivial
>         Attachments: SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch, SOLR-142-RawResponseWriter.patch
>
>
> A RawResponseWriter writes a ContentStream directly to the response.
> This is useful to spit back a file directly from solr.  This implementation looks for a response property named "content" and sends it to the client.  If it can't find one, it delegates the response to another ResponseWriter.
> As an example, I added a GetAdminFileRequestHandler to replace /admin/get-file.jsp

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.