lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cwalls <connor.wa...@skillpages.com>
Subject Spawning an additional thread in Solr custom SearchComponent - best practice?
Date Fri, 24 Feb 2012 18:01:05 GMT
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message