tt-news-indexer: Recursive starting points
|Priority:||Could have||Due date:|
|Assignee:||Stefan Froemken||% Done:||
For larger tt-news-installation with several tt-news-SysFolders the indexer-configuration can be simplified significantly, if the indexer would support recursive starting points.
I've sent a patch to Magnus some weeks ago.
Updated by Christian Buelter about 1 year ago
- Status changed from New to Needs Feedback
- Priority changed from Should have to Could have
I agree, this could be interesting on larger sites with a lot of folders for news.
Could you provide a patch against the current trunk for that feature?
Updated by Jan Bartels about 1 year ago
- File patch_34077.patch added
I've prepared a single patch. The main idea is to move the functions getPagelist() and getPageRecords() of the class tx_kesearch_indexer_types_page to the base-class tx_kesearch_indexer_types, where they can be called from the class tx_kesearch_indexer_types_ttnews or tx_kesearch_indexer_types_tt_address. The patch doesn't contain indexers other than for the pages, tt_news and tt_address, as I can't test other indexers. This concept can be applied to other indexers as well (e.g. ke_yac (?) or custom indexers).
In the indexers you just have to replace the WHERE-clause for the pids
$where = 'pid IN (' . $this->indexerConfig['sysfolder'] . ') '; $where .= t3lib_befunc::BEenableFields($table,$inv=0); $where .= t3lib_befunc::deleteClause($table,$inv=0);
with this sequence:
$indexPids = $this->getPidList($this->indexerConfig['startingpoints_recursive'], $this->indexerConfig['sysfolder'], $table); $where = 'pid IN (' . implode(',', $indexPids) . ') '; $where .= t3lib_befunc::BEenableFields($table,$inv=0); $where .= t3lib_befunc::deleteClause($table,$inv=0);
Besides the displayCond of the field startingpoints_recursive of the tx_kesearch_indexerconfig record has to be extended in tca.php.
Updated by Stefan Froemken about 1 year ago
- Status changed from Needs Feedback to Resolved
- Assignee set to Stefan Froemken
- % Done changed from 0 to 100
I have committed your patch with little modifications to current trunk. I have given some params defaultvalues, added PHPDoc Annotations and corrected one return value.
Further I have added TestCases for the new/modified methods.