[TYPO3-Solr] Solr CONTENT object not working

Bas van der Togt bas at profinit.com
Tue Dec 16 16:36:50 CET 2014


Hello!

I wrote a configuration to index my custom table. The url is based on 
the related sys_categories (first category only).

My configuration:

plugin.tx_solr {
	index {
		queue {
			tx_example_domain_model_question = 1
			tx_example_domain_model_question {
				table = tx_example_domain_model_question

				fields {
					title = question

					content = answer

					category_stringM = SOLR_RELATION
					category_stringM {
						localField = categories
						multiValue = 1
					}

					url = CONTENT
					url {
						table = tx_example_domain_model_question
						select {
							selectFields = tx_example_domain_model_question.uid, 
sys_category.single_pid, sys_category.uid category
							leftjoin = sys_category_record_mm ON 
sys_category_record_mm.uid_foreign = 
tx_example_domain_model_question.uid LEFT JOIN sys_category ON 
sys_category.uid = sys_category_record_mm.uid_local
							pidInList = {$page.id.faq.storage}
							recursive = 1
							where.field = uid
							where.wrap = tx_example_domain_model_question.uid = |
							orderBy = sys_category.sorting ASC
							max = 1
						}

						renderObj = TEXT
						renderObj {
							typolink.parameter.cObject = CASE
							typolink.parameter.cObject {
								key.field = single_pid

								0 = TEXT
								0.value = 15

								default = TEXT
								default.field = single_pid
							}

							typolink.additionalParams.cObject = CASE
							typolink.additionalParams.cObject {
								key.field = single_pid

								0 = TEXT
								0.value = 
&tx_example_frequentlyaskedquestions[controller]=Question&tx_example_frequentlyaskedquestions[action]=categoryDetail&tx_example_frequentlyaskedquestions[category]={field:category}
								0.value.insertData = 1

								default = TEXT
								default.value =
							}
							typolink.section = q{field:uid}
							typolink.section.insertData = 1
							typolink.useCacheHash = 1
							typolink.returnLast = url
						}
					}
				}
			}
		}
	}
}

However it looks like i don't receive the uid in the select.
When i set the uid to a static value, for example 1, it works.
What am i doing wrong?

Regards,
Bas


More information about the TYPO3-project-solr mailing list