Sorry. I was repeated test. And now both way have same speed. -----Original Message----- From: Anton Potehin [mailto:[EMAIL PROTECTED] Sent: Friday, March 10, 2006 1:39 PM To: java-user@lucene.apache.org Subject: speed Importance: High
I try 2 way for get count results: 1) Query q = .... IndexSearcher is = .... int count = Is.search(q).length(); 2) Query q = .... IndexSearcher is = .... CountCollector collector = new CountCollector(); Is.search(q, collector); Int count = collector.getCount(); First way return results for 1.644 sec. Second way return results fot 3.088 sec. Why first way faster then second? Can I accelerate it? And how? Can you offer any ways for get number of results? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]