[TYPO3-Solr] Indexing news and realurl

Ingo Renner ingo at typo3.org
Wed Sep 21 12:02:04 CEST 2011


Am 20.09.11 11:59, schrieb Heiko Kromm | Paints:

Hi Heiko,

> After clearing my realUrl cache I need to reindex my news-entries. Is there somthing I might use for. Perhaps the garbage collector?
> Or is it possible to create a typolink in searchresults if my result-item is a news, instead of showing the url which was saved by solr?

you could use tx_solr.search.results.fieldRenderingInstructions to 
overwrite the behavior of the url field...

Alternatively you could create a small extension to hook into the 
realurl clear cache process and then re-initialize the index queue, 
which will trigger the index queue worker to re-index the complete 
queue. Unfortunately it's currently not possible to re-init just a 
certain type like tt_news...


A re-init would work like this:

$site = tx_solr_Site::getSiteByPageId($pageId);
$indexQueue = t3lib_div::makeInstance('tx_solr_indexqueue_Queue');
$indexQueue->initialize($site);



HTH
Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2, Admin Google Summer of Code

TYPO3 - Open Source Enterprise Content Management System
http://typo3.org

Apache Solr for TYPO3 -
Open Source Enterprise Search meets Open Source Enterprise CMS
http://www.typo3-solr.com


More information about the TYPO3-project-solr mailing list