Skip to content

Instantly share code, notes, and snippets.

@Mabahe
Last active December 19, 2015 23:59
Show Gist options
  • Save Mabahe/6038018 to your computer and use it in GitHub Desktop.
Save Mabahe/6038018 to your computer and use it in GitHub Desktop.
Solution for indexing sys_category in ext:solr in TYPO3 with unmerged https://review.typo3.org/#/c/22415/ and unfixed http://forge.typo3.org/issues/44961
plugin.tx_solr.index.queue {
pages.fields {
tags_textM = SOLR_MULTIVALUE
tags_textM {
cObject = CONTENT
cObject {
table = pages
select {
uidInList = this
pidInList = 0
selectFields = sys_category.*
join = sys_category_record_mm ON pages.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 = 'pages' AND sys_category.pid = {$uid.pages.tags}
}
renderObj = COA
renderObj {
10 = TEXT
10.field = title
10.wrap = |,
}
}
separator = ,
removeEmptyValues = 1
}
}
news.fields {
tags_textM = SOLR_MULTIVALUE
tags_textM {
cObject = CONTENT
cObject {
table = tx_news_domain_model_news
select {
uidInList.field = uid
pidInList = 0
selectFields = sys_category.*
join = sys_category_record_mm ON tx_news_domain_model_news.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_news_domain_model_news' AND sys_category.pid = {$uid.pages.tags}
}
renderObj = COA
renderObj {
10 = TEXT
10.field = title
10.wrap = |,
}
}
separator = ,
removeEmptyValues = 1
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment