Ryan McKinley schrieb:
On Nov 17, 2008, at 1:35 PM, Erik Hatcher wrote:
Can you elaborate on the use case for why you need the raw response
like that?
I vaguely get it, but want to really understand the need here.
I'm weary of the EmbeddedSolrServer usage in there, as I want to
distill the VrW stuff to be able to use SolrJ's API rather than assume
embedded Solr. This way VrW can be separated from core Solr to
another "tier" and template on remote Solr responses. Thoughts on how
this feature might play out in that scenario?
After we add the SolrQueryResponse to the templates first, we realized that some
convenience methods for iterating the result docs, accessing facets etc. would
be fine.
The idea was to reuse the existing wrappers (eg. QueryResponse). It makes it
much nicer to create templates, because velocity is made to just render things,
so code using docsets etc. directly may be very overloaded.
Essentially the function:
solrResponse.setResponse(new
EmbeddedSolrServer(request.getCore()).getParsedResponse(request,
response));
makes the results look as if they came from solrj.
If the results did come from solrj, we would not need to set the
solrResponse -- they would already be set and in the proper form.
ryan