You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Dan Robin <ro...@mystrands.com> on 2008/12/05 21:02:05 UTC

getting xml out of a SolrDocument ?

I am using solrj to query solr and the QueryResponse.getResults() returns a
SolrDocumentList. There is a SolrDocument in the list with the results I
want. The problem is that I want to view these results as XML. How can I get
the SolrDocument to give me XML?

Thanks in advance.

      -Dan
-- 
View this message in context: http://www.nabble.com/getting-xml-out-of-a-SolrDocument---tp20861491p20861491.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: getting xml out of a SolrDocument ?

Posted by Yonik Seeley <yo...@apache.org>.
On Fri, Dec 5, 2008 at 5:24 PM, Erik Hatcher <er...@ehatchersolutions.com> wrote:
> I'd somehow pass through Solr's XML response, or perhaps consider using
> Solr's XSLT response writer to convert to the format you want.  I don't have
> the magic incantation handy, but it should be possible to make a request
> through SolrJ and get the raw response string back in whatever format you
> want.

One could subclass RequestParser (or XMLRequestParser) and do nothing
but put the entire response body in a String.

-Yonik

Re: getting xml out of a SolrDocument ?

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
I'd somehow pass through Solr's XML response, or perhaps consider  
using Solr's XSLT response writer to convert to the format you want.   
I don't have the magic incantation handy, but it should be possible to  
make a request through SolrJ and get the raw response string back in  
whatever format you want.

	Erik

On Dec 5, 2008, at 3:02 PM, Dan Robin wrote:

>
> I am using solrj to query solr and the QueryResponse.getResults()  
> returns a
> SolrDocumentList. There is a SolrDocument in the list with the  
> results I
> want. The problem is that I want to view these results as XML. How  
> can I get
> the SolrDocument to give me XML?
>
> Thanks in advance.
>
>      -Dan
> -- 
> View this message in context: http://www.nabble.com/getting-xml-out-of-a-SolrDocument---tp20861491p20861491.html
> Sent from the Solr - User mailing list archive at Nabble.com.