Thursday 15 July 2004 10:29:51 pm
well ezsearchengine.php module submits the following sql query:
this part creates the temp table
<i>$db->createTempTable( "CREATE TEMPORARY TABLE ezsearch_tmp_0 ( contentobject_id int primary key not null, published int )" ); </i>
and this one submits the search query:
<i>
$db->query( "INSERT INTO ezsearch_tmp_0 SELECT DISTINCT ezsearch_object_word_link.contentobject_id, ezsearch_object_word_link.published
FROM
ezcontentobject,
ezsearch_object_word_link
$subTreeTable,
ezcontentclass,
$subTreeTable,
ezcontentclass,
$subTreeTable,
ezcontentclass,
ezcontentobject_tree
WHERE
$searchDateQuery
$sectionQuery
$classQuery
$classAttributeQuery
$searchPartText
$subTreeSQL
ezcontentobject.id=ezsearch_object_word_link.contentobject_id and
ezcontentobject.contentclass_id = ezcontentclass.id and
ezcontentclass.version = '0' and
ezcontentobject.id = ezcontentobject_tree.contentobject_id</i>
<b>ezcontentobject_tree.node_id = ezcontentobject_tree.main_node_id and </b><i>
$sqlPermissionCheckingString" );
</i>
the bold part makes the query returns only the contentobjectid with main_node_id. that causes my search not to find any objects that were related to other nodes then the main location.
by putting this line into comment i will get duplicated results, cause it will find the object many times on other sub folders(nodes). now searching by SubTreeArray[] creteria on a certen folder(the one that is related to my siteaccess) will return only the objects that are under my siteaccess. VOULLA!!! i will submit that as an option on the suggestion forum.
thanks for nothing ;-) Lior
|