Jack Tang wrote:
In FetchedSegments class, below code shows how to get the hit summaries.

  public String[] getSummary(HitDetails[] details, Query query)
    throws IOException {
    SummaryThread[] threads = new SummaryThread[details.length];
    for (int i = 0; i < threads.length; i++) {
      threads[i] = new SummaryThread(details[i], query);
      threads[i].start();
    }
    ......
  }

It means if the hits are 1,000,000 items, then 1,000,000 threads
should be spawned.

A user interface typically only asks for 10-to-20 summaries at a time. I do not believe that a thread pool would be substantially faster. Thread spawning is pretty cheap in most JVMs.

Doug


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Nutch-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-developers

Reply via email to