Bug #17054 » class.tx_indexedsearch.php.diff

Administrator Admin, 2007-02-28 14:54

View differences:

pi/class.tx_indexedsearch.php 28 Feb 2007 13:40:31 -0000
820 820

  
821 821
				// Perform search for word:
822 822
			switch($theType)	{
823
//prs+ 28.02.2007
824
/*
825
 * can't see any difference in this cases, but Kaspar might know
823 826
				case '1':
824 827
					$wSel = "IW.baseword LIKE '%".$GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_words')."%'";
825 828
					$res = $this->execPHashListQuery($wSel,' AND is_stopword=0');
......
832 835
					$wSel = "IW.baseword LIKE '%".$GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_words')."'";
833 836
					$res = $this->execPHashListQuery($wSel,' AND is_stopword=0');
834 837
				break;
838
*/
839
				case '1':
840
				case '2':
841
				case '3':
842
					$wSel='match(IW.baseword) against("'.$GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_words').'")';
843
					$res = $this->execPHashListQuery($wSel,' AND is_stopword=0');
844
					break;
845
//prs- 28.02.2007				
835 846
				case '10':
836 847
					$wSel = 'IW.metaphone = '.$this->indexerObj->metaphone($sWord);
837 848
					$res = $this->execPHashListQuery($wSel,' AND is_stopword=0');
......
840 851
					$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
841 852
								'ISEC.phash',
842 853
								'index_section ISEC, index_fulltext IFT',
843
								'IFT.fulltextdata LIKE \'%'.$GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_fulltext').'%\' AND
854
//prs+ 28.02.2007
855
//								'IFT.fulltextdata LIKE \'%'.$GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_fulltext').'%\' AND
856
								'match(IFT.fulltextdata) against(\''.$GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_fulltext').'\') AND
844 857
									ISEC.phash = IFT.phash
845 858
									'.$this->sectionTableWhere(),
859
//prs- 28.02.2007								
846 860
								'ISEC.phash'
847 861
							);
848 862
					$wSel = '1=1';
(1-1/3)