[ http://issues.apache.org/jira/browse/SOLR-30?page=comments#action_12421487 ] Darren Erik Vengroff commented on SOLR-30: ------------------------------------------
I'm sure you know a lot more than Commons HttpClient than I do, so I'll defer to your judgement on whether the additional functionality is worth the additional dependency. Some questions in the hope that I can learn more about this and maybe switch to Commons for other stuff I'm doing: 1. On the persistence point, does Commons HttpClient do something beyond reusing the same TCP connection, which is the default behavior of the JDK? See e.g. http://java.sun.com/j2se/1.5.0/docs/guide/net/http-keepalive.html. 2. On the threading point, if two threads get seperate HttpURLConnection objects by independently calling java.net.URL.getConnection() on the same URL, can they then stomp on each other by using those simultaneously? The HttpURLConnection objects are different, so I would hope not. I know that the reuse of TCP connections happens behind the scenes in some static cache hidden away inside java.net.HttpURLConnection, but I wasn't aware of it not being thread safe. Is this the issue Commons HttpClient is trying to address, or is it some other issue and I'm just missing the point? > Java client code for performing searches against a Solr instance > ---------------------------------------------------------------- > > Key: SOLR-30 > URL: http://issues.apache.org/jira/browse/SOLR-30 > Project: Solr > Issue Type: New Feature > Components: search > Reporter: Philip Jacob > Priority: Minor > Attachments: solrsearcher-client.zip > > > Here are a few classes that connect to a Solr instance to perform searches. > Results are returned in a Response object. The Response encapsulates a > List<Map<String,Field>> that gives you access to the key data in the results. > This is the main part that I'm looking for comments on. > There are 2 dependencies for this code: JDOM and Commons HttpClient. I'll > remove the JDOM dependency in favor of regular DOM at some point, but I think > that the HttpClient dependency is worthwhile here. There's a lot that can be > exploited with HttpClient that isn't demonstrated in this class. The purpose > here is mainly to get feedback on the API of SolrSearcher before I start > optimizing anything. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
