first of all I apologize for the length of this message ... there are few questions I would appreciate your help please:
1. originally I wanted to use solrj in my application layer (webapp deployed with tomcat), to query the solr server(s) with multi-cores, non-cloud setup. Since I need send back XML format to my client, I realize it is not an use case for solrj, so I should abandon the idea (correct?) 2. I also looked into CommonsHttpSolrServer trying to query solr directly, which supposedly allow me to set XMLResponseParser as ResponseParser. however, it seems CommonsHttpSolrServer is deprecated, with httpclient 4.x I think I should use HttpSolrServer. I do need to have a way to set the returned data in xml format, and I want to use pooled http conn manager to support multiple thread for queries. I thought I could do all this with HttpSolrServer, (yes?) as below: PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager(); connManager.setMaxTotal(5); connManager.setDefaultMaxPerRoute(4); ... ... CloseableHttpClient httpclient = HttpClients.custom().setConnectionManager(connManager).build(); ... ... ResponseParser parser = new XMLResponseParser(); ... ... HttpSolrServer server = new HttpSolrServer(myUrl, httpclient, parser); ... ... SolrQuery query = new SolrQuery(); query.setQuery(q); query.setParam("wt", "xml"); // not needed? ... ... QueryResponse response = server.query(query); SolrDocumentList sdl = response.getResults(); at this point will the documents in sdl be in xml format if I use toString() looping through them? will there be overhead if this works at all? will solrj skip the xml parsing and simply return the results as I requested xml parser? I somehow feel its very fishy and I could be better off just not use solrj ? what is the best practice here? 3. I think my next question could be more like a httpclient question, but it does relate to solr / cores, so I will hope someone can give me help here: when I try to config PoolingHttpClientConnectionManager, for the per route connection etc, will the following different url considered to be different routes, or since they hit the same server, it will ignore the collection/core part? String myUrl = "http://localhost:8983/solr/core1"; and String myUrl = "http://localhost:8983/solr/core2"; Thanks! Renee -- View this message in context: http://lucene.472066.n3.nabble.com/using-HttpSolrServer-with-PoolingHttpClientConnectionManager-tp4322905.html Sent from the Solr - User mailing list archive at Nabble.com.