[TYPO3-Solr] Indexing custom Items

Jigal van Hemert jigal.van.hemert at typo3.org
Mon Sep 30 15:43:52 CEST 2013


Hi,

On 30-9-2013 14:45, hard.one Software GmbH wrote:
> I have setup indexing for custom tabels and everything works pretty
> fine. There is only one thing: If new entries are created by the
> frontend user, they are not added to the index queue.
> The engine is indexing other changes just fine if they are performed in
> the backend.
>
> Am I missing something?

Solr uses a hook in DataHandler (formerly known as TCEmain) to see if 
records are created/edited/deleted/... and adds them (or the pages they 
belong to in case of content elements) to the indexing queue.
Records edited/created by a frontend user will probably not use 
DataHandler and thus they are not picked up by solr.

DataHandler was designed to be used in backend context, but it works 
fine in most (if not all) cases as long as you create a backend user 
record for it. If you have a pibase extension you could use DataHandler 
to store records and still be compatible with solr.
If you use an extbase extension that won't be possible as the 
persistence layer in extbase handles the storage of records.

Examples for using DataHandler (TCEmain) can be found in [1]. The 
->start() method has an optional third parameter to pass an alternative 
BE user object.

[1] http://blog.tolleiv.de/2010/03/handling-data-in-typo3-with-tcemain/

-- 
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