lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Kaser <lucene_l...@iconparc.de>
Subject Parallel searching use ExecutorService and Collectors
Date Tue, 08 May 2012 11:31:53 GMT
Hi all,

I want to speed up my searches by using multiple CPU cores for one 
search. I saw that there is a possibility to use multithreaded search by 
passing an ExecutorService to the IndexSearcher:

     idxSearcher = new IndexSearcher(reader, 
Executors.newCachedThreadPool());

I call my search using:

     idxSearcher.search(query, filter, collector);

However, I found that this has no effect on search speed at all. After 
some digging, I found out that the multithreading apparently does not 
work when calling the search with a custom collector implementation, the 
source code even says:

      // TODO: should we make this
     // threaded...?  the Collector could be sync'd?
     // always use single thread:

Does anyone know, whether there is work currently going on to address 
this issue? If not, is there a workaround that allows me to use multiple 
threads for searching and still use my own collectors?

Best regards,
Christoph Kaser

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message