Hi Jack,
the summary is only created from all hits displayed on one page.
Stefan
Am 23.02.2006 um 02:45 schrieb Jack Tang:
On 2/23/06, Doug Cutting <[EMAIL PROTECTED]> wrote:
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.
Hi Doug
Did I miss something?
SummaryThread[] threads = new SummaryThread[details.length];
here details.length is the size of one page hit items?
I thought it should be the value of all hits, right?
/Jack
I do not believe that a thread pool would be substantially faster.
Thread spawning is pretty cheap in most JVMs.
Doug
--
Keep Discovering ... ...
http://www.jroller.com/page/jmars
---------------------------------------------------------------
company: http://www.media-style.com
forum: http://www.text-mining.org
blog: http://www.find23.net