Forums / Developer / Search Query in eZSearchEngine

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Search Query in eZSearchEngine

Author Message

Maxime Thomas

Monday 16 January 2006 8:15:49 am

Hi everybody,

Looking for some information on ez search engine, I've studied the mecanism of the ez engine and I did'nt understand what is doing this query in the seach function of the eZSearchEngine :

if ( $searchPartsArray == null )
            {
                 $db->createTempTable( "CREATE TEMPORARY TABLE ezsearch_tmp_0 ( contentobject_id int primary key not null, published int )" );
                 $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,
                                          ezcontentobject_tree
                                     WHERE
                                          $searchDateQuery
                                          $sectionQuery
                                          $classQuery
                                          $classAttributeQuery
                                          $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 and
                                          ezcontentobject_tree.node_id = ezcontentobject_tree.main_node_id
                                          $sqlPermissionCheckingString" );
                 $this->TempTablesCount = 1;
                 $i = $this->TempTablesCount;
            }

This means that this query is executed meanwhile there are no wordlinks in the ezsearch_object_word_link table. So, index are not used and mysql browses the whole table...

I think it is related to this bug.

http://ez.no/community/bugs/query_very_slow_in_ezsearch

Does anybody have an answer ?

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas