Project

General

Profile

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
// Perform search for word:
switch($theType) {
//prs+ 28.02.2007
/*
* can't see any difference in this cases, but Kaspar might know
case '1':
$wSel = "IW.baseword LIKE '%".$GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_words')."%'";
$res = $this->execPHashListQuery($wSel,' AND is_stopword=0');
......
$wSel = "IW.baseword LIKE '%".$GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_words')."'";
$res = $this->execPHashListQuery($wSel,' AND is_stopword=0');
break;
*/
case '1':
case '2':
case '3':
$wSel='match(IW.baseword) against("'.$GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_words').'")';
$res = $this->execPHashListQuery($wSel,' AND is_stopword=0');
break;
//prs- 28.02.2007
case '10':
$wSel = 'IW.metaphone = '.$this->indexerObj->metaphone($sWord);
$res = $this->execPHashListQuery($wSel,' AND is_stopword=0');
......
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'ISEC.phash',
'index_section ISEC, index_fulltext IFT',
'IFT.fulltextdata LIKE \'%'.$GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_fulltext').'%\' AND
//prs+ 28.02.2007
// 'IFT.fulltextdata LIKE \'%'.$GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_fulltext').'%\' AND
'match(IFT.fulltextdata) against(\''.$GLOBALS['TYPO3_DB']->quoteStr($sWord, 'index_fulltext').'\') AND
ISEC.phash = IFT.phash
'.$this->sectionTableWhere(),
//prs- 28.02.2007
'ISEC.phash'
);
$wSel = '1=1';
(1-1/3)