Thanks. He was right.

I've noticed that the HTTPClient has no connection timeout
(http://jakarta.apache.org/commons/httpclient/preference-api.html#HTTP_connection_parameters)
setted, maybe there is a way to set it out-of-the-client (any
suggestion?), but it would help this connection timeout to be settable
somehow on a BaseSolrServer object.

The only change to CommonsHttpSolrServer would be this set function, and a
client.setConnectionTimeout(settedvalue);
after the HttpClient initing in request method.

It may be useful? There are any other way to play with http timeout
parameters (at least connectionTimeout), without changing code inside
the client code?
Problem arise when the server is down (jetty/tomcat/etc, or the machine
itself), and server.query takes a minute before throwing exception.

-- Walter


Ryan McKinley (JIRA) wrote:
>     [ 
> https://issues.apache.org/jira/browse/SOLR-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502885
>  ] 
>
> Ryan McKinley commented on SOLR-20:
> -----------------------------------
>
> I don't know if you are on solr-dev, Yonik noted that the QTime does not 
> include the time to write the response, only the query time.  To get an 
> accurate number for how long the whole query takes, check your app server logs
> http://www.nabble.com/Re%3A-A-simple-Java-client-for-updating-and-searching-tf3890950.html
>
> To get a quick response from solr, try rows=0 or a 404 path.  (Of course, the 
> speed will depend on you network connection speed between client-server)
>
>   
>> A simple Java client for updating and searching
>> -----------------------------------------------
>>
>>                 Key: SOLR-20
>>                 URL: https://issues.apache.org/jira/browse/SOLR-20
>>             Project: Solr
>>          Issue Type: New Feature
>>          Components: clients - java
>>         Environment: all
>>            Reporter: Darren Erik Vengroff
>>            Priority: Minor
>>         Attachments: DocumentManagerClient.java, DocumentManagerClient.java, 
>> solr-client-java-2.zip.zip, solr-client-java.zip, solr-client-sources.jar, 
>> solr-client.zip, solr-client.zip, solr-client.zip, 
>> solrclient_addqueryfacet.zip, SolrClientException.java, 
>> SolrServerException.java
>>
>>
>> I wrote a simple little client class that can connect to a Solr server and 
>> issue add, delete, commit and optimize commands using Java methods.  I'm 
>> posting here for review and comments as suggested by Yonik.
>>     
>
>   

Reply via email to