[ 
http://issues.apache.org/jira/browse/SOLR-59?page=comments#action_12446297 ] 
            
Bertrand Delacretaz commented on SOLR-59:
-----------------------------------------

Coming back to this according to the mailing list discussions 
(http://marc.theaimsgroup.com/?t=116167803100001&r=1&w=2), here's a slightly 
modified plan:

1. Add a "headers" NamedList to SolrQueryResponse, to hold values that are 
meant for the responseHeader, makes these values available to all 
QueryResponseWriters. 

2. Have SolrCore put the computed "qtime" value in there (along with other 
stats if needed) instead of computing it in the QueryResponseWriter.

3. In SolrCore.execute(), call a method to copy (if so configured) the explicit 
request parameters to a nested NamedList stored in the above "headers" 
NamedList. 

If people need more than the explicit parameters, this would be the place to 
change later on, but right now this will be explicit params only.

4. In QueryResponseWriters, implement generic code to copy the "headers" 
NamedList to the output

I think this puts everything in the right place - comments are welcome of 
course.

> Copy request parameters to Solr's response
> ------------------------------------------
>
>                 Key: SOLR-59
>                 URL: http://issues.apache.org/jira/browse/SOLR-59
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Bertrand Delacretaz
>         Attachments: SOLR-59-20061024.patch
>
>
> This patch copies the request parameters (explicit ones only, not the 
> defaults) to Solr's XML output.
> It is not configurable yet, it is enabled by default and adds a 
> "queryParameters" list to the responseHeader:
> <responseHeader>
>         <status>0</status>
>         <QTime>1</QTime>
>         <lst name="queryParameters">
>                 <arr name="multi">
>                         <str>red</str>
>                         <str>blue</str>
>                 </arr>
>                 <str name="rows">10</str>
>                 <str name="start">0</str>
>                 <str name="indent">on</str>
>                 <str name="q">solr</str>
>                 <str name="stylesheet"/>
>                 <str name="version">2.1</str>
>         </lst>
> </responseHeader>
> The above example includes a multi-valued parameter, "multi".
> This might still change a bit, but if someone wants to play with it or 
> improve it, here you go.

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

        

Reply via email to