lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cwalls <>
Subject Spawning an additional thread in Solr custom SearchComponent - best practice?
Date Fri, 24 Feb 2012 18:01:05 GMT

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


View this message in context:
Sent from the Lucene - Java Developer mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message