Re: Does solrj return result in XML format? If not then how to make it do that.

2009-05-04 Thread Ryan McKinley


use this constructor:

  public CommonsHttpSolrServer(String solrServerUrl, HttpClient  
httpClient, ResponseParser parser) throws MalformedURLException {

this(new URL(solrServerUrl), httpClient, parser, false);
  }

and give it the XMLResponseParser

 -- - - -

Is this just helpful for debugging with packet sniffing?  the XML  
format will be a bit slower then the binary format.


ryan


On May 4, 2009, at 8:22 AM, Erik Hatcher wrote:

Just out of curiosity, what's the use case for getting the result  
back in XML from SolrJ?


Erik

On May 4, 2009, at 8:13 AM, ahmed baseet wrote:

Can we get the results as received by Solrj in XML format? If yes  
how to do
that. I think there must be some way to make solrj returns results  
in XML

format.
I need some pointers in this direction. As I know solrs returns the  
result
in solrdocument format that we've to iterate to extract the fields.  
Thank

you.

--Ahmed.






Re: Does solrj return result in XML format? If not then how to make it do that.

2009-05-04 Thread Ryan McKinley
The point of using solrj is that you don't have to do any parsing  
yourself -- you get access to the results in object form.


If you need to do parsing, just grab the xml directly:
http://host/solr/select?q=*:*wt=xml


On May 4, 2009, at 9:36 AM, ahmed baseet wrote:


As I know when we query solr from solr admin interface we get back the
results in xml format, so thought there must be something similar  
for solrj

as well, which I'll make to go thru an xml parser at the other end and
display all the results in the browser. Otherwise I've to iterate the
solrdocumentlist and create a list[may be] to put the results and  
return it

back to the browser which will handle displaying that list/map etc.

--Ahmed.



On Mon, May 4, 2009 at 5:52 PM, Erik Hatcher e...@ehatchersolutions.com 
wrote:


Just out of curiosity, what's the use case for getting the result  
back in

XML from SolrJ?

  Erik


On May 4, 2009, at 8:13 AM, ahmed baseet wrote:

Can we get the results as received by Solrj in XML format? If yes  
how to

do
that. I think there must be some way to make solrj returns results  
in XML

format.
I need some pointers in this direction. As I know solrs returns  
the result
in solrdocument format that we've to iterate to extract the  
fields. Thank

you.

--Ahmed.








Re: Does solrj return result in XML format? If not then how to make it do that.

2009-05-04 Thread Noble Paul നോബിള്‍ नोब्ळ्
The we interface returns the data in xml for mat because that is the
most readable format.SolrJ uses a compact binary format by default.
But you can make it use xml as well. but there is no real use case for
using xml with solrJ

On Mon, May 4, 2009 at 7:06 PM, ahmed baseet ahmed.bas...@gmail.com wrote:
 As I know when we query solr from solr admin interface we get back the
 results in xml format, so thought there must be something similar for solrj
 as well, which I'll make to go thru an xml parser at the other end and
 display all the results in the browser. Otherwise I've to iterate the
 solrdocumentlist and create a list[may be] to put the results and return it
 back to the browser which will handle displaying that list/map etc.

 --Ahmed.



 On Mon, May 4, 2009 at 5:52 PM, Erik Hatcher 
 e...@ehatchersolutions.comwrote:

 Just out of curiosity, what's the use case for getting the result back in
 XML from SolrJ?

        Erik


 On May 4, 2009, at 8:13 AM, ahmed baseet wrote:

  Can we get the results as received by Solrj in XML format? If yes how to
 do
 that. I think there must be some way to make solrj returns results in XML
 format.
 I need some pointers in this direction. As I know solrs returns the result
 in solrdocument format that we've to iterate to extract the fields. Thank
 you.

 --Ahmed.







-- 
--Noble Paul