Hi Daniel,
Are you sure the testing method you use is correct?
Ex. are you sure .net version doesn't cache search result?
With best regards,
Alexander Veremyev.
Daniel Freudenberger wrote:
-->
Hello,
I've started playing around with zend_search_lucene in the morning and at
first, I was very impressed. After that I've started to index all of the
relevant items that are stored in the database so far.
The index now contains 28069 documents and the find() method takes ~0.4
seconds to return for a very simple search expression. I've tested the same
expression against the same index with the .net lucene port and the request
took about 0.001 to 0.005 seconds. I know, I should not compare php with any
.net language (in this case c#) but we're not talking about twice the speed
or better, we're talking about the factor 100-400.
I just hope I did something wrong or missed an important point in manual
about performance. Here's the imporant part of my code.
$iterations = 100;
$index = new Zend_Search_Lucene('c:\index');
$userQuery = Zend_Search_Lucene_Search_QueryParser::parse('fifa');
$begin = microtime(true);
for($i = 0; $i < $iterations; ++$i) {
$hits = $index->find($userQuery);
}
echo 'took: '.((microtime(true)-$begin)/$iterations).' seconds';
Best regards,
Daniel
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.476 / Virus Database: 269.10.22/921 - Release Date: 26.07.2007 23:16