[TYPO3-Solr] Index-Configuration for custom table

Michael Stein der.stein at gmx.de
Tue May 6 14:47:21 CEST 2014


Am Wed, 23 Apr 2014 14:43:10 +0000 schrieb Michael Huber:

> sure, this is my configuration:
>  
> plugin.tx_solr.index.queue{
>     tabcars = 1 tabcars {
>       
>       table = tabcars
>       
>       fields {
>         abstract = txtCARS_Handelsname author = txtCARS_author
>         description = txtCARS_Handelsname title = txtCARS_Handelsname
>         
>         content = txtCARS_Handelsname
>                 
>         keywords = SOLR_MULTIVALUE keywords {
>           field = txtCARS_keywords
>         }
>         
>         url = TEXT url {
>           // Single-PageId: 206 typolink.parameter = 206
>           typolink.additionalParams =
>           &user_cardatenbank_pi1[carID]={field:pkCARS}
>           typolink.additionalParams.insertData = 1 typolink.returnLast =
>           url typolink.useCacheHash = 0 typolink.no_cache = 0
>         }
>         
>         sortTitle_stringS  = title type = TEXT type.value = tabcars
>       }
>     }
>   }
> 
> 
> 
> The database table „tabcars“ looks like this:
> - pkCARS -> primary key with id - txtCARS_Handelsname - txtCARS_keywords
> - txtCARS_author - dateCARS_TimeStamp -> timestamp
> 
> The columns structure of the table is very old and from another
> developer and it is very complicated to change it...
> 
> 
> 
> Am 23.04.2014 um 16:21 schrieb Olivier Dobberkau
> <olivier.dobberkau at dkd.de>:
> 
>> Am 23.04.14 10:41, schrieb Michael Huber:
>> 
>>> I’d like to index a custom table from my extension but can’t get
>>> things work.
>> 
>> can you show us the typoscript™?
>> 
>> olivier _______________________________________________
>> TYPO3-project-solr mailing list TYPO3-project-solr at lists.typo3.org
>> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-solr
>> 
>>

the fields must be rendered like any typoscript.
So the data is in this->cObj->data and available like this:

plugin.tx_solr.index.queue{
    tabcars = 1
    tabcars {
      table = tabcars
      fields {
        abstract = TEXT
        abstract.field = txtCARS_Handelsname
      }
    }
}

where txtCARS_Handelsname (this is the name of your database-field)


More information about the TYPO3-project-solr mailing list