Bug #45575
closedEpic #65814: Make Indexed search extbase plugin shine
indexed_search_mysql ignores "sections" settings
100%
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