Hi David,

Yes, that would be good to have an example of index.

I just created an issue for this (http://framework.zend.com/issues/browse/ZF-1561). You could send index example via email or attach it to the issue.


With best regards,
   Alexander Veremyev.

[EMAIL PROTECTED] wrote:
Hi,Alexander,

I really appreciate you for the feedback. I have tested you script by adding 
setDefaultSearchField(), but no effect.

I could send you a small index to you by email for demonstration, and zip file 
is attached in another email for your test. I searched with the joined string 
in the index with a boolean operator below:

"project manager" AND shanghai

Zend_Search_Lucene gets 16 hits, while Luke Toolbox gets 5 hits. When I 
searched only the string below:

"project manager"

Zend_Search_Lucene and Luke Toolbox both get 11 hits.

BTW, my system environment is: Ubuntu 6.10/Lampp 1.5.3/Zend 1.0.0RC1/Luke 
Toolbox 0.7.

Kind regards,
David

----- Original Message ----- From: "Alexander Veremyev" <[EMAIL PROTECTED]>
To: "Partout" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Thursday, June 14, 2007 6:17 AM
Subject: Re: [fw-general] Has someone gotten the different results when using 
Luke and Zend_Search?


Oh. Just replied in e-mail.

I think the problem is in the default search field.
Zend_Search searches through all fields by default.

---------
Zend_Search_Lucene::setDefaultSearchField('contents');
...
$hits = $index->find($query);
---------
Should give the same result as Apache (Java) Lucene.

If no, then it's a bug.

With best regards,
   Alexander Veremyev.

Partout wrote:
And is there some expert who could help me to find the cause?
Thanks in advance! Et Merci beaucoop!

Best regards,
David


Partout wrote:
My question is about the zend_search_lucene. I have searched the index
with below: "business controller" AND shanghai
There is about 300 hits. But when I search with LUKE Toolbox again with
the same phrase string, there is about only 7 results, and that is correct
for my case.  And, there is only 14 documents in my index containing
"business controller"  phrase.

I need to know why the Luke toolbox's results is not the same with
zend_search_lucence. Is there some configuration needed? I use the Zend
1.0.0 RC1, and my demo script is below:

<?php
require_once 'Zend/Search/Lucene.php';
$query = "\"business controller\" AND Shanghai";
//Zend_Search_Lucene_Analysis_Analyzer::setDefault(new
Zend_Search_Lucene_Analysis_Analyzer_Common_TextNum_CaseInsensitive());
//Zend_Search_Lucene_Search_QueryParser::setDefaultOperator(Zend_Search_Lucene_Search_QueryParser::B_AND);
$index = Zend_Search_Lucene::open('index');
$hits = $index->find($query);
echo "result:".count($hits);
?>





Reply via email to