CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.6 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Feature #34077

tt-news-indexer: Recursive starting points

Added by Jan Bartels over 1 year ago. Updated about 1 year ago.

Status:Resolved Start date:2012-02-18
Priority:Could have Due date:
Assignee:Stefan Froemken % Done:

100%

Category:-
Target version:-
Votes: 1 (View)

Description

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.

patch_34077.patch (7.7 kB) Jan Bartels, 2012-04-23 00:07

History

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

See cumulative patch at #34495

Updated by Jan Bartels about 1 year ago

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.

Stefan

Also available in: Atom PDF