[TYPO3-Solr] Index-Configuration for custom table
mh at mculm.de
mh at mculm.de
Mon May 12 10:08:55 CEST 2014
Hi,
thanks for your advice to render the fields like any typoscript. I
tried but didn't get things work. Finally I figured out in Developer
Logs that there is an SQL-Error when trying to init the index queue:
INSERT INTO tx_solr_indexqueue_item (root, item_type, item_uid,
indexing_configuration, indexing_priority, changed) SELECT '6' as root,
'tabcars' AS item_type, uid AS item_uid, 'tabcars' as
indexing_configuration, 0 AS indexing_priority, AS changed FROM tabcars
WHERE pid IN(3,4,5,6,8)
The error occurs because there is no field "uid" in my table "tabcars",
the id field is named "pkCARS". Is there a way to configure which column
is the ID-field? I tried the following but i doesn't work either, the
problem is still the same:
tabcars = 1
tabcars {
table = tabcars
fields {
item_uid = TEXT
item_uid.field = pkCARS
...
}
}
Further more there is an error because of ", AS changed FROM tabcars" -
i think here should be a timestamp, how to configure this?
Am 06.05.2014 um 14:47 schrieb Michael Stein <der.stein at gmx.de>:
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)
_______________________________________________
TYPO3-project-solr mailing list
TYPO3-project-solr at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-solr
More information about the TYPO3-project-solr
mailing list