Changeset adc28f6
- Timestamp:
- 08/31/10 16:44:59 (21 months ago)
- Branches:
- ('master', '8434b8322dd6f8ff37c17bd45b94e7a826f86b53')('vitrine', 'afe109c61a407808bd54d88bcccb1cde726a010a')
- Children:
- f2cb64b2836c21c04a38954812e396eab23b9017
- Parents:
- f0daea643ebbade00cd85a4698420c4d1894a697
- git-author:
- Benoit Grégoire <benoitg@coeus.ca>2010-08-31 16:44:59-04:00
- git-committer:
- Benoit Grégoire <benoitg@coeus.ca>2010-08-31 16:44:59-04:00
- File:
-
- 1 edited
-
html/classes/SearchEngine.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
html/classes/SearchEngine.php
rf0daea6 radc28f6 620 620 $finalJoinTable = $finalTable; 621 621 $sql .= " vocabulary_terms AS {$finalTable} \n"; 622 $sql .= " JOIN vocabulary_terms AS {$initialLeftTable} \n";623 // $sql .= " JOIN vocabulary_terms AS {$finalJoinTable} \n";622 $sql .= " JOIN vocabulary_terms AS {$initialLeftTable} \n"; 623 // $sql .= " JOIN vocabulary_terms AS {$finalJoinTable} \n"; 624 624 } 625 625 if($navLevel>1) { … … 647 647 $joinCondArray=array(); 648 648 //navigableSourceToDest 649 $joinBackwards?$sourceToDestTypes=$navigableRelationships['navigable SourceToDest']:$sourceToDestTypes=$navigableRelationships['navigableSourceToDest'];649 $joinBackwards?$sourceToDestTypes=$navigableRelationships['navigableDestToSource']:$sourceToDestTypes=$navigableRelationships['navigableSourceToDest']; 650 650 if(count($sourceToDestTypes)>0){ 651 651 $tmpSql = null; … … 655 655 656 656 $internaljoinCondArray = array(); 657 657 658 658 foreach($sourceToDestTypes as $relationshipType) { 659 659 $internaljoinCondArray[] = "(navigated_relationship_level_{$navLevel}.vdex_7_4_1_relationship_type_source='$relationshipType[1]' AND navigated_relationship_level_{$navLevel}.vdex_7_4_2_relationship_type_value='$relationshipType[0]') \n"; … … 665 665 } 666 666 //navigableDestToSource 667 $joinBackwards?$destToSourceTypes=$navigableRelationships['navigableSourceToDest']:$destToSourceTypes=$navigableRelationships['navigable SourceToDest'];667 $joinBackwards?$destToSourceTypes=$navigableRelationships['navigableSourceToDest']:$destToSourceTypes=$navigableRelationships['navigableDestToSource']; 668 668 if(count($destToSourceTypes)>0){ 669 669 $tmpSql = null; … … 687 687 688 688 /* Re-joining with vocabulary_term is essential to exploit the nested-set structure later */ 689 $selectListArray[] = "navigated_relationship_level_{$navLevel}.vdex_7_4_2_relationship_type_value as RT";689 $selectListArray[] = "navigated_relationship_level_{$navLevel}.vdex_7_4_2_relationship_type_value as l{$navLevel}_RT"; 690 690 $selectListArray[] = "navigated_relationship_level_{$navLevel}.source_term_identifier as l{$navLevel}_STid, navigated_relationship_level_{$navLevel}.target_term_identifier as l{$navLevel}_TTid"; 691 691 $selectListArray[] = "navigated_terms_level_{$navLevel}.vdex_4_vocabulary_identifier as l{$navLevel}_voc, navigated_terms_level_{$navLevel}.vdex_6_1_identifier as l{$navLevel}_term"; 692 692 693 $sqlVocTermJoin = null; 693 694 $sqlVocTermJoin .= " LEFT JOIN vocabulary_terms AS {$rightTable} ON ( \n"; … … 715 716 /* Re-joining with vocabulary_term is essential to exploit the nested-set structure later */ 716 717 $selectListArray[] = "{$finalJoinTable}.vdex_4_vocabulary_identifier as final_voc, {$finalJoinTable}.vdex_6_1_identifier as final_term"; 718 //$selectListArray[] = "array_agg(".implode(', ',$vocIdcoalesceParts).")"; 717 719 $sqlFinalJoin = null; 718 720 $sqlFinalJoin .= " ON ( \n"; … … 760 762 $sql .= " WHERE initial_theme_limit_terms.vdex_4_vocabulary_identifier='rVoc1' AND initial_theme_limit_terms.vdex_6_1_identifier='rVoc1T2'\n"; 761 763 //$sql .= " WHERE vocabulary_terms.vdex_4_vocabulary_identifier='pivotVoc' AND vocabulary_terms.vdex_6_1_identifier='pivotVocT3'\n"; 762 pretty_print_r($sql); ob_flush();flush();764 pretty_print_r($sql);@ob_flush();flush(); 763 765 $db->ExecuterSql($sql, $rows, true); 764 766 //pretty_print_r($navigableRelationships); … … 772 774 } 773 775 else { 774 //Yes, that's an identity join, but we do need both names to be compatible with code above776 //Yes, that's an identity join, but we do need both names to be compatible with code above 775 777 $retval .= " vocabulary_terms AS theme_limit_terms JOIN vocabulary_terms AS initial_theme_limit_terms ON \n"; 776 778 $retval .= " (theme_limit_terms.vdex_6_1_identifier=initial_theme_limit_terms.vdex_6_1_identifier AND theme_limit_terms.vdex_4_vocabulary_identifier=initial_theme_limit_terms.vdex_4_vocabulary_identifier)\n"; 777 779 } 778 //$retval .= " JOIN vocabulary_terms AS initial_theme_limit_terms ON \n";780 //$retval .= " JOIN vocabulary_terms AS initial_theme_limit_terms ON \n"; 779 781 $retval .= ") ON (path_identifier=theme_limit_terms.vdex_6_1_identifier AND path_vdex_4_vocabulary_identifier=theme_limit_terms.vdex_4_vocabulary_identifier) \n"; 780 782 781 783 return $retval; 782 784 }
Note: See TracChangeset
for help on using the changeset viewer.
