[TYPO3-Solr] Custom Index on tt_content is not refreshe automatically

Jigal van Hemert jigal.van.hemert at typo3.org
Wed Oct 16 08:37:45 CEST 2013


Hi,

On 14-10-2013 14:55, Holger wrote:
> But why is there the functionality of creating custom indexes on tables,
> if I still need pages for the reindexing, if I wanted to index pages,
> I'd do that? Does tt_content not have all the necessary information?

tt_content is a special case. It is used by almost every TYPO3 
installation to store content elements which are displayed on pages.

All other types of records from extensions are displayed by a plugin on 
a page.

For this reason solr treats tt_content records differently from other 
(extension) records. Other records are indexed individually (according 
to their indexing queue configuration) and in the search results there 
is a link to a page with a plugin of that extension which can display 
that particular record. The behaviour for tt_content is different: the 
individual records aren't indexed, but instead the page where they are 
displayed is indexed.

In the record monitor of solr a check is done for the type of record:
- pages : the indexing queue record for that page is created/modified
- tt_content : the indexing queue record of the page where the content 
element lives is created/modified
- other tables : if there is a configuration for the indexing queue the 
indexing queue record for that item is created/modified

> And how is this solved in tt_news or in forum extensions?

I described that above.

> Since the indexing works when I create the index. I think I have to find
> a way to tell solr when something has to be updated or deleted from the
> index table.

No, tt_content is a special table. If you want individual records 
indexed the best solution is to use a different table. If you absolutely 
insist on using tt_content records for your use case you can write your 
own record monitor and take special action for the tt_content records 
which are not part of a page.

> Does anyone think, creating a trigger on tt_content table that updates
> tx_solr_indexqueue_item table is a good idea?
> If not, does anyone have a good idea for me? Any help is really apreciated.

I think I answered that above.

-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-solr mailing list