[TYPO3-Solr] Limit tt_news

Dmitry Dulepov dmitry.dulepov at gmail.com
Thu Apr 11 10:51:57 CEST 2013


Hi!

Hans-Peter M. wrote:
> is it possible to restrict the age of indexing for tt_news?
> eg i want only the news from the last 6 month.

additionalWhereClause is your friend :) Use something like:

tstamp>UNIX_TIMESTAMP()-6*30*24*60*60

Note: this will not remove old news from the index automatically.

> I have old news. But i don't want to offer them in the search results.

This is a different thing. You may remove the old items by sending a delete 
XML query to Solr. You need to make a condition using the value of 
"changed" field.

-- 
Dmitry Dulepov
TYPO3 CMS core & security teams member


More information about the TYPO3-project-solr mailing list