Re: Copying the request parameters to Solr's response
On 10/24/06, Bertrand Delacretaz [EMAIL PROTECTED] wrote: I need to implement paging of Solr result sets, and (unless I have overlooked something that already exists) it would be useful to copy the request parameters to the output. I'm thinking of adding something like this to the XML output: responseHeader lst name=queryParameters str name=qauthor:Leonardo/str str name=start24/str str name=rows12/str etc... +1 I had been thinking of doing that to allow for more stateless clients that don't even know what it was they queried for. I imagine this would just be for explicitly passed parameters? I don't think the SolrParams class provides an Iterator to retrieve all parameters, I'll add one to implement this. Definitely. It also hit me just yesterday that this was missing while I was thinking about how to solve something else. -Yonik
Re: Copying the request parameters to Solr's response
On 10/24/06, Bertrand Delacretaz [EMAIL PROTECTED] wrote: responseHeader lst name=queryParameters str name=qauthor:Leonardo/str str name=start24/str str name=rows12/str What do people think... should this (optionally) go under responseHeader, to be added by the ResponseWriter when it sees the flag to do so, OR Should it be added in the response body, at the same level as highlighting info, faceting info, etc. -Yonik
Re: Copying the request parameters to Solr's response
On 10/24/06, Yonik Seeley [EMAIL PROTECTED] wrote: ...I imagine this would just be for explicitly passed parameters?... I think so, the defaults would be re-applied anyway, if the client makes another request with the same parameters. -Bertrand
Re: Copying the request parameters to Solr's response
Returning the query parameters is really useful. I'm not sure it needs to be optional, they are small and options multiply the test cases. It can even be useful to return the values of the defaults. All those go into the key for any client side caching, for example. wunder On 10/24/06 1:55 AM, Erik Hatcher [EMAIL PROTECTED] wrote: I think its a good idea, but it probably should be made optional. Clients can keep track of the state themselves, and keeping the response size as small as possible is valuable. But it would be helpful in some situations for the client to get the original query context sent back too. Erik On Oct 24, 2006, at 4:20 AM, Bertrand Delacretaz wrote: Hi, I need to implement paging of Solr result sets, and (unless I have overlooked something that already exists) it would be useful to copy the request parameters to the output. I'm thinking of adding something like this to the XML output: responseHeader lst name=queryParameters str name=qauthor:Leonardo/str str name=start24/str str name=rows12/str etc... I don't think the SolrParams class provides an Iterator to retrieve all parameters, I'll add one to implement this. WDYT? -Bertrand
[jira] Created: (SOLR-59) Copy request parameters to Solr's response
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 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 status0/status QTime1/QTime lst name=queryParameters arr name=multi strred/str strblue/str /arr str name=rows10/str str name=start0/str str name=indenton/str str name=qsolr/str str name=stylesheet/ str name=version2.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
[jira] Updated: (SOLR-59) Copy request parameters to Solr's response
[ http://issues.apache.org/jira/browse/SOLR-59?page=all ] Bertrand Delacretaz updated SOLR-59: Attachment: SOLR-59-20061024.patch 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 status0/status QTime1/QTime lst name=queryParameters arr name=multi strred/str strblue/str /arr str name=rows10/str str name=start0/str str name=indenton/str str name=qsolr/str str name=stylesheet/ str name=version2.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
Re: Copying the request parameters to Solr's response
On 10/24/06, Walter Underwood [EMAIL PROTECTED] wrote: ...The defaults can change, especially if the client saves results. If possible, you want to return a full context for the results... It wouldn't cost much anyway, so I think you're right that this is useful. For now, I have uploaded a first patch at https://issues.apache.org/jira/browse/SOLR-59, feel free to play with it or improve it. It doesn't include the defaults (and I have to run now, will look at that tomorrow or Thursday). -Bertrand
Re: Re: Copying the request parameters to Solr's response
On 10/24/06, Walter Underwood [EMAIL PROTECTED] wrote: The defaults can change, especially if the client saves results. If possible, you want to return a full context for the results. Perhaps, but the defaults are an ever-expanding list of params and usually much larger than the provided params. echoParams={false/explicit/all} -Mike
Re: Re: Copying the request parameters to Solr's response
On 10/24/06, Mike Klaas [EMAIL PROTECTED] wrote: Perhaps, but the defaults are an ever-expanding list of params and usually much larger than the provided params. echoParams={false/explicit/all} +1 all will be very useful for debugging too. -Yonik
Re: Copying the request parameters to Solr's response
: What do people think... should this (optionally) go under : responseHeader, to be added by the ResponseWriter when it sees the : flag to do so, : OR : Should it be added in the response body, at the same level as : highlighting info, faceting info, etc. I think it should be done by the RequestHandlers, using shared utility methods to make it easy, and thus should go in the response body -- not hte header. the header should be kept small, containing only core low level info about the status of the communication with SolrCore. -Hoss