[TYPO3-Solr] Add new records to Index Queue for MM Table

Robert W rewebit at gmail.com
Fri Sep 2 12:23:50 CEST 2016


Hello,

I have been trying to work through this and am looking for input, to see if there is a better way to do this. We have an MM table which holds scheduling information (tx_schedule). There is a foreign key in tx_schedule (fk_video) which goes to a detail table containing the detail information about videos. We want to index the tx_schedule table, so that viewers can search to locate videos.

The tx_schedule table has been successfully setup in the ConstantsRoots.ts file and the records have been indexed. Using the Additional Where clause (plugin.tx_solr.index.queue.[indexConfig].additionalWhereClause) I have been able to filter out the tx_schedule entries to show only a unique set of videos, based on the fk_video. (each video shows once)

To handle the schedule import which happens through a manual or automatic process, $indexQueue->updateItem is called after each insert to the tx_schedule table. This was not enough to trigger the tx_schedule table to be indexed (and indexing was requested when the table was intially empty), therefore after the complete schedule is imported, there is a call to $indexQueue->initialize($Site, 'tx_schedule').

The call to $indexQueue->initialize($Site, 'tx_schedule'), appears to catch the second schedule import. Upon the 2nd schedule import, the records in tx_schedule are indexed, when the scheduler runs on the next cycle.

1.) Is this an acceptable way to configure this arrangement with an MM table which is updated through a possibly automated process?
2.) Is there perhaps a better way to uniquely index the rows in tx_schedule? (so each video only appears one time in the index)
3.) Last question, is there a way to code things, so that the very first schedule imported into the tx_schedule table fires off the indexing? (automatically with no admin/user intervention)


We are running:
TYPO3 6.2.25
solr 3.1.2
tika 2.0.0
solrfal 2.1.3 

Thank you,
Robert


More information about the TYPO3-project-solr mailing list