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?
The fact it is EmbeddedSolrServer is kinda hacky -- all that function
does is transform the request to the normalized NamedList format that
comes out of Solrj. Perhaps the class should be static and in
ClientUtils?
public NamedList<Object> getParsedResponse( SolrQueryRequest req,
SolrQueryResponse rsp )
{
try {
BinaryResponseWriter writer = new BinaryResponseWriter();
ByteArrayOutputStream bos = new ByteArrayOutputStream();
writer.write( bos, req, rsp );
BinaryResponseParser parser = new BinaryResponseParser();
return parser.processResponse( new
ByteArrayInputStream( bos.toByteArray() ), "UTF-8" );
}
catch( Exception ex ) {
throw new RuntimeException( ex );
}
}