lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Per Steffensen <st...@designware.dk>
Subject Re: Solrj question
Date Tue, 11 Dec 2012 07:28:04 GMT
Glad to hear that it helped. But this is very hacky, and there is no 
guarantee that it will work with next release, so if you want "better" 
and more clean support for what you are trying to do, you probably want 
to open a ticket for it, solve it and cover it by tests, so that no one 
breaks the feature.

Regards, Per Steffensen

Steve Molloy skrev:
>
> Thanks, I had to extend the LBHttpSolrServer so that it acknowledges 
> the null parser I specify (always uses binary L). But basically, I now 
> have support by setting my custom LBHttpSolrServer with a null parser.
>
>  
>
> *Steve Molloy*
> Content Analytics Lead  |  R&D
>
> Phone:
>
> 	
>
> (514) 908-5406 406
>
> Website:
>
> 	
>
> www.opentext.com <http://www.opentext.com/>
>
> http://www.opentext.com/2/emailsupport-logo-opentext-2010.gif 
> <http://www.opentext.com/2/email-signature-logo>
>  
>
> 	
>
>  
>
> 	
>
> cid:062220709@16032010-305F 
> <http://www.opentext.com/2/email-signature-event>
>
> We can't solve problems by using the same kind of thinking we used 
> when we created them.
>
> Attributed to Albert Einstein
>
>  
>
> *From:* Per Steffensen [mailto:steff@designware.dk]
> *Sent:* Tuesday, December 04, 2012 3:29 PM
> *To:* dev@lucene.apache.org
> *Subject:* Re: Solrj question
>
>  
>
> Steve Molloy skrev:
>
> I really hate duplicating code
>
> I love you :-)
>
> Unless there's a way to get the original message before it's 
> unmarshaled into the QueryResponse, in which case I'd be more than 
> happy to use that as-is. J
>
> Ha ha. Just had a short look at the code, and tried to hack it, but 
> got tired, so I didnt complete or test it. But maybe this will help 
> you (completely untested - dont even know if it will compile):
>
>                     CloudSolrServer client = new 
> CloudSolrServer(<zk-connect-string>, new LBHttpSolrServer(null) {
>                         @Override
>                         protected HttpSolrServer makeServer(String 
> baseUrl) throws MalformedURLException {
>                             return new HttpSolrServer(baseUrl, 
> getHttpClient(), null) {
>                                 @Override
>                                 public NamedList<Object> request(final 
> SolrRequest request) throws SolrServerException, IOException    {
>                                     return request(request, null);
>                                 }
>                             };
>                         }
>                     });
>                     InputStream responseDirectlyFromWire = 
> (InputStream)client.query(<query>).getResponse().get("stream");
>


Mime
View raw message