search indexing logical bug

Author Message

Lior Solomon

Thursday 15 July 2004 1:21:34 am

I have a multiple sites configuration.
all the sites uses the same database.
the idea is that each site will use one "Library"(folder) of content, so if i edited an article on the library folder all the sites will be updated.

i created all the articles on the library folder, and used the add location to locate the articles in the different sites.
different sites meaning different siteacesses that uses the same db but each one of them has a different starting point(folder).
i was facing some search problem, so i dag in and discovered that the article is being indexed only for the "main" location, meaning the first place the article was published so the words are being indexed and related only to that location.
so now if i want to search something from site x , and this sites folders are full of articles add from the original location, actulay nothing is found.

i'm using ez version 3.3-6 with postgre db
PLEASE HELP this is a major regresion for my progress with ez systems. i believe there is something i can do.

Lior

Lior Solomon

Thursday 15 July 2004 7:59:21 am

ok since i dont get a lot of attention here
i will tell everyone what i discoverd hopfully someone will direct me if i'm write or wrong

when an article is being published it's been indexed. if that object is located among other nodes/folders still it has the same object id.

so if i try to search a folder full of articles that were assigned to this folder (from original place) i will get ZERO results!!!

meaning that if i have a siteaccess per folder with a naive intention to use same article as i do on my other siteaccess there is no support for that.

MEANING i have to use different databases for different siteaccess if i want to be able to search the articles per site.
no can anyone tell me how "Content Managment System" relates to this sad discovery?
well i do hope i'm wrong cause i count on Ez Crew that has been spending so much efforts into this wonderfull growing product.

Lior

Lior Solomon

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.