Hi Doron, Yes, this was great help, thanks! I've got my: 1. MatchTask (just like ReadTask, but with searcher.match(Query, new MatchCollector() ....)) 2. SearchMatchTask (just like SearchTask, but extends MatchTask), so I was able to use "SearchMatch" in the alg file where "Search" was before.
I need to compare search with HitCollector to matching with MatchCollector, and leave both of their their collect(...) methods empty in order to see how much time, if any, is shaved off with Paul's patch that simply skips scoring. Thus, I've modified ReadTask locally to use the search method with HitCollector instead of the one that returns Hits. I'll put both the new benchmark Tasks and my results in LUCENE-584 once I have something (tomorrow, most likely). Otis ----- Original Message ---- From: Doron Cohen <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Monday, April 2, 2007 8:20:58 PM Subject: Re: Benchmarking LUCENE-584 with contrib/benchmark Hi Otis, you could use the byTask package - add your-type-of-search-task. Suffix the new task class name by "Task" - e.g. NewNameTask - and then you can use the 'command' "NewName" in an alg file. I am not sure you can extend/reuse the existing ReadTask for this, because its implementation of search/retrieve/traverse assumes using certain Lucene's API's. Does this make sense? Regards, Doron Otis Gospodnetic <[EMAIL PROTECTED]> wrote on 02/04/2007 15:35:57: > Hi, > > I'm looking at benchmarking Paul's http://issues.apache. > org/jira/browse/LUCENE-584 code. > I'd like to compare either: > HitCollector.collect(doc, score) vs. MatchCollector.collect(doc) > or > IndexSearcher.search(Weight, Filter, HitCollector) vs. > IndexSearcher.match(Query, MatchCollector) > > ...and see what the performance difference is when one skips > scoring. I can cook up my own benchmark, but I'd rather try using > contrib/benchmark, if it can be used for this purpose. Can it? I > browsed around contrib/benchmark looking for a place where I could > plug in calls to IndexSearcher.match(Query, MatchCollector), and > found that the only search calls are in the StandardBenchmarker > class. From what I can tell, I can't really plug in any other calls > in there, can I? It looks like I simply need to write my own > MatcherBenchmarker and implement my own benchmark(File, > BenchmarkOptions) method. Once that's in place, I'd have to run one > benchmark with the StandardBenchmarker and the other one with my > MatcherBenchmarker and manually compare the numbers. > > Is that the right approach, or am I missing a shortcut? > > Thanks, > Otis --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]