Hi Paul,

thx again.

Can I use this technique from within a servlet ?

Do I need an instance of the HttpClient to do that ?

I noticed I can instantiate the CommonsHttpSolrServer with a HttpClient
client .

I did not find any relevant examples how to use this .

If you can help me out with this much appreciated..

Stefan  


Noble Paul നോബിള്‍  नोब्ळ्-2 wrote:
> 
> hi
>   you don't see the point . You really don't need to use SolrJ . All
> that you need to do is just make an http request with wt=json and read
> the output to a buffer and you can just send it to your client.
> --Noble
> 
> 
> 
> On Fri, Oct 23, 2009 at 9:40 PM, SGE0 <stefangee...@hotmail.com> wrote:
>>
>> Hi All,
>>
>> After a day of searching I'm quite confused.
>>
>> I use the solrj client as follows:
>>
>> CommonsHttpSolrServer solr = new
>> CommonsHttpSolrServer("http://127.0.0.1:8080/apache-solr-1.4-dev/test";);
>> solr.setRequestWriter(new BinaryRequestWriter());
>>
>>    ModifiableSolrParams params = new ModifiableSolrParams();
>>    params.set("qt", "dismax");
>>    params.set("indent", "on");
>>    params.set("version", "2.2");
>>    params.set("q", "test");
>>    params.set("start", "0");
>>    params.set("rows", "10");
>>    params.set("wt", "xml");
>>    params.set("hl", "on");
>>    QueryResponse response = solr.query(params);
>>
>>
>> How can I get the query result (response) in XML format out f?
>>
>> I know it sounds stupid but I can't seem to manage that.
>>
>> What do I need to do with the response object to get the response in XML
>> format ?
>>
>> I already understood I can"t get the result in JSON so my idea was to go
>> from XML to JSON.
>>
>> Thx for your answer already !
>>
>> S.
>>
>>
>>
>>
>>    System.out.println("response = " + response);
>> SolrDocumentList  sdl  =  response.getResults();
>> --
>> View this message in context:
>> http://www.nabble.com/Solrj-client-API-and-response-in-XML-format-%28Solr-1.4%29-tp26029197p26029197.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> -----------------------------------------------------
> Noble Paul | Principal Engineer| AOL | http://aol.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Solrj-client-API-and-response-in-XML-format-%28Solr-1.4%29-tp26029197p26037037.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to