Bug #45575

Epic #65814: Make Indexed search extbase plugin shine

indexed_search_mysql ignores "sections" settings

Added by Quoc-Viet Phan almost 9 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Should have
Category:
Indexed Search
Target version:
-
Start date:
2013-02-18
Due date:
% Done:

100%

Estimated time:
0.00 h
TYPO3 Version:
6.0
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

If you use the extension indexed_search_mysql with V 6.0.x and want to use "sections" you will find that this will not work.
The reason is simple: the method (sectionTableWhere) in parent class is not use in the hook

Solution:
Change in typo3/sysext/indexed_search/MysqlFulltextIndexHook.php

in Function execFinalQuery_fulltext() :


$resource = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'index_fulltext.*, ISEC.*, IP.*',
'index_fulltext, index_section ISEC, index_phash IP' . $pageJoin,
'MATCH (' . $searchData['fulltextIndex'] . ') AGAINST (' . $GLOBALS['TYPO3_DB']->fullQuoteStr($searchData['searchString'], 'index_fulltext') . $searchBoolean . ') ' .
$this->pObj->mediaTypeWhere() . ' ' .
$this->pObj->languageWhere() .
$freeIndexUidClause . '
AND index_fulltext.phash = IP.phash
AND ISEC.phash = IP.phash
AND ' . $pageWhere,
'IP.phash,ISEC.phash,ISEC.phash_t3,ISEC.rl0,ISEC.rl1,ISEC.rl2,ISEC.page_id,ISEC.uniqid,IP.phash_grouping,IP.data_filename ,IP.data_page_id ,IP.data_page_reg1,IP.data_page_type,IP.data_page_mp,IP.gr_list,IP.item_type,IP.item_title,IP.item_description,IP.item_mtime,IP.tstamp,IP.item_size,IP.contentHash,IP.crdate,IP.parsetime,IP.sys_language_uid,IP.item_crdate,IP.cHashParams,IP.externalUrl,IP.recordUid,IP.freeIndexUid,IP.freeIndexSetId'
);

to


$resource = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'index_fulltext.*, ISEC.*, IP.*',
'index_fulltext, index_section ISEC, index_phash IP' . $pageJoin,
'MATCH (' . $searchData['fulltextIndex'] . ') AGAINST (' . $GLOBALS['TYPO3_DB']->fullQuoteStr($searchData['searchString'], 'index_fulltext') . $searchBoolean . ') ' .
$this->pObj->mediaTypeWhere() . ' ' .
$this->pObj->languageWhere() .
$freeIndexUidClause . '
AND index_fulltext.phash = IP.phash
AND ISEC.phash = IP.phash
AND ' . $pageWhere . $this->pObj->sectionTableWhere(),
'IP.phash,ISEC.phash,ISEC.phash_t3,ISEC.rl0,ISEC.rl1,ISEC.rl2,ISEC.page_id,ISEC.uniqid,IP.phash_grouping,IP.data_filename ,IP.data_page_id ,IP.data_page_reg1,IP.data_page_type,IP.data_page_mp,IP.gr_list,IP.item_type,IP.item_title,IP.item_description,IP.item_mtime,IP.tstamp,IP.item_size,IP.contentHash,IP.crdate,IP.parsetime,IP.sys_language_uid,IP.item_crdate,IP.cHashParams,IP.externalUrl,IP.recordUid,IP.freeIndexUid,IP.freeIndexSetId'
);


Files

MysqlFulltextIndexHook.php (8.19 KB) MysqlFulltextIndexHook.php Quoc-Viet Phan, 2013-02-18 14:54

Also available in: Atom PDF