Great :) Also, realize that certain queries (MultiTermQuery) spend lots of time in "rewrite" and (sometimes, anyway) comparatively small amounts of time in actually running the query. So it'd be nice to have a good way to let multiple threads participate in rewrite too.
Thread scheduling/prioritization is also important, so that a big slow query doesn't starve execution for fast queries. Ideally (unfortunately!) I think we'd want something like how the OS schedules processes, ie new processes run with higher priority than long running resource consuming processes. So a new query would get higher priority, but, if it runs for a long time, it's priority is reduced. Not sure how we should solve that one... Mike On Wed, Jan 5, 2011 at 10:09 PM, Li Li <fancye...@gmail.com> wrote: > we recently are interested in this problem. if we come up with a > patch, I'd like > to share it with everyone. > > 2011/1/4 Michael McCandless <luc...@mikemccandless.com>: >> 2011/1/4 Li Li <fancye...@gmail.com>: >>> I agree with you that we should not tie concurrency w/in a single search to >>> index segments. >>> That solution is just a hack. >>> will lucene 4 support multithreads search for a single query? >>> I haven't found any patch about this. >> >> Well, as things stand now, Lucene 4 will only support the "thread per >> segment" hack. The patch on LUCENE-2837 (still needs work) merges >> ParallelMultiSearcher into IndexSearcher, carrying over that hack. >> >> But this discussion seems like it could lead to a nice patch? (If >> someone has the time/energy/itch to cons one up). >> >> Just dividing up the docID space equally seems like a simple solution >> that'd work well... >> >> Mike >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org >> For additional commands, e-mail: dev-h...@lucene.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org > For additional commands, e-mail: dev-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org