[TYPO3-Solr] Re: SOLR RELATION sys_categories display by parent category

Matt Clough matt at lubs.leeds.ac.uk
Wed Mar 2 17:50:49 CET 2016


To help solve this, I have created additional fields to be index which contain subsets of categories based on parent category..

An example:

The table name is tx_staffprofiles_domain_model_profile
The parent category for all department is called 'Departments' with a uid of 9

			departments_stringM = SOLR_MULTIVALUE
			departments_stringM {
				cObject = CONTENT
				cObject {
					table = tx_staffprofiles_domain_model_profile
					select {
						uidInList.field = uid
						pidInList = 0
						selectFields = sys_category.*
						join = sys_category_record_mm ON tx_staffprofiles_domain_model_profile.uid = sys_category_record_mm.uid_foreign JOIN sys_category ON sys_category.uid = sys_category_record_mm.uid_local
						where = sys_category_record_mm.tablenames = 'tx_staffprofiles_domain_model_profile' AND sys_category.parent = '9'
					}
		            renderObj = COA
            		renderObj {
              			10 = TEXT
              			10.field = title
              			10.wrap = |,
            		}
          		}
          		separator = ,
          		removeEmptyValues = 1
			}

Hope someone finds this useful.

Thanks

Matt


More information about the TYPO3-project-solr mailing list