[TYPO3-english] EXT:solr – Use categories as hierarchical facets

Bert Bert
Tue Aug 11 09:10:30 CEST 2015


Hello Jigal,

Thanks for making clear...I understand now...

The snippet below works!

Thanks and regards!
-brt

.......
   index {
     fieldProcessingInstructions {
       category_stringM = categoryUidToHierarchy
     }
     queue {
       pages = 1
       pages.fields {
         altType_stringS = TEXT
         altType_stringS.value = Paginas
       }
       Bdl = 1
       Bdl {
         table = tx_news_domain_model_news
         additionalWhereClause = pid = {$pidBdl}
         fields {
           category_stringM = SOLR_RELATION
           category_stringM {
              localField = categories
              foreignLabelField = uid
              multiValue = 1
           }
           abstract = teaser
           title = title
           content = SOLR_CONTENT
           content {
             cObject = COA
             cObject {
               10 = TEXT
               10 {
                 field = bodytext
                 noTrimWrap = || |
               }
             }
           }
           url = TEXT
           url {
             typolink.parameter =  52
             typolink.additionalParams = &tx_news_pi1[news]={field:uid} 

             typolink.additionalParams.insertData = 1
             typolink.useCacheHash = 1
             typolink.returnLast = url
           }
           # add new field to Bdl
           altType_stringS = TEXT
           altType_stringS.value = Base de Datos Legal
         }
       } #end Bdl

       Blog = 1
       Blog < .Bdl
....




On 8/10/15 7:15 PM, Jigal van Hemert wrote:
> Hi,
>
> On 10/08/2015 14:59, Bert Hiddink [BENDOO e-work solutions] wrote:
>> I try to implement your snippet posted under
>> http://blog.steffen-ritter.net/2014/04/extsolr-use-categories-as-hierarchical-facets/.
>>
>>
>>
>> config.index_enable = 1
>>
>> plugin.tx_solr {
>>      solr {
>>        scheme = http
>>        host = abc:12345 at mysolrserver.org
>>        port = 8080
>>        path = /solr/core_es/
>>      }
>>      enableDebugMode = 1
>>      suggest = 1
>>      search.elevation = 1
>>
>>      index {
>>
>>       fieldProcessingInstructions {
>>         category_stringM = categoryUidToHierarchy
>>       }
>>
>>       queue {
>>        MYTYPE.fields {
>
> The idea was to replace "MYTYPE" with the name of the queue definition
> you want to add the categories to. In your case it would be "Bdl".
>
> Alternatively you could add the field definition to the Bdl queue
> definition below.
>
>>           category_stringM = SOLR_RELATION
>>           category_stringM {
>>             localField = categories
>>             foreignLabelField = uid
>>             multiValue = 1
>>           }
>>        }
>
>



More information about the TYPO3-english mailing list