Hi, I've been developing a custom SearchComponent for Solr, which essentially is making a REST call to an internal service we have to get a list of Ids to use to build a FieldCacheTermsFilter. I'm making the call asynchronously during the prepare call, then getting the result during the process call, to try and keep the overall response time down. I've got it working functionally, but I'm not sure of the best practice for making the call in a separate thread. As it stands I'm implementing Runnable, but should I be looking at using a thread pool instead? Specifically, is there an ExecutorService already in use by Solr/Lucene (or Tomcat?) I can use to execute a FutureTask or similar?
Apologies if this is quite a basic question, I'm not too familiar with Java, I had a search around and couldn't find anything specific to this, and I think the solution may or may not be Solr specific. Any help is much appreciated. Thanks, Connor -- View this message in context: http://lucene.472066.n3.nabble.com/Spawning-an-additional-thread-in-Solr-custom-SearchComponent-best-practice-tp3773277p3773277.html Sent from the Lucene - Java Developer mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org