[ http://issues.apache.org/jira/browse/SOLR-59?page=comments#action_12444701 ] Hoss Man commented on SOLR-59: ------------------------------
Some assorted comments on the patch... Independent of wether we need this functionality or not, i like the addition of the "public Iterator<String> getParameterNames()" to the SolrParams API ... but I think there is a bug in the DefaultSolrParams version: "defaults" is never consulted for param names. As I mentioned on the list, I think we should only do this for the orriginal params as specified in the URL (or POST body) ... in which case req.getOriginalParams() would be used instead of req.getParams(). This patch also only modifies XMLWriter, making it a QueryResponseWriter specific piece of functionality ... it hadn't really occured to be when discussing this, but that seems like a good place for the code to live and fits with the idea of putting this info in the responseHeaer -- which is output format specific anyway. There also seems to be some concensus on the list that there should be a param contrlling wether or not this logic is active, with the default being "false" > 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