[TYPO3-Solr] several problems with defining the queue fields
Tim Werdin
t.werdin at web-vision.det.werdin
Thu May 3 15:11:38 CEST 2012
Hi everyone,
I'm building an extension for a customer of us and the search should be
handled by solr.
Problem 1:
I have a timestamp which should be shown as a normal date.
In the mail "SEVERE: org.apache.solr.common.SolrException: Error while
creating field" werner used the date type for the timestamp and only
according to the missing root template this throws an error.
The root template is inserted and I try the following TS
plugin.tx_solr.index.queue.wv_stx3.fields {
initialRegistration_dateS = initial_registration
}
When I start the Index Queue Worker it shows 0% and in the devlog I
found the following error:
Message: Querying Solr using POST
Extra data:
query url: http://localhost:8080/solr/core_en/update?wt=json
content: <add allowDups="false" overwritePending="true"
overwriteCommitted="true"><doc><field
name="id">0a277fd3c7da28be7df129a52793f5ab09b5d175/tx_wvstx3_domain_model_car/1</field><field
name="type">tx_wvstx3_domain_model_car</field><field
name="appKey">EXT:solr</field><field
name="site">http://www.autorate.de/cms</field><field
name="siteHash">0a277fd3c7da28be7df129a52793f5ab09b5d175</field><field
name="uid">1</field><field name="pid">67</field><field
name="created">2012-02-07T13:16:16Z</field><field
name="changed">2012-04-10T10:17:05Z</field><field
name="access">r:0</field><field name="language">0</field><field
name="title">370Z 3.7 V6 Automatik Pack, Navi, 19 Zoll, PDC,
1.Hand</field><field name="content">Gepflegter NISSAN 370Z PACK von uns
als Nissan-Vertragshändler aus 1.Hand und lückenlosem Scheckheft mit
Werksgarantie bis Juli 2012: Einparksensoren hinten optisch u.
akustisch, ...</field><field
name="manufacturer_stringS">Nissan</field><field
name="model_stringS">370Z 3.7 V6 Automatik Pack, Navi, 19 Zoll, PDC,
1.Hand</field><field name="leasingrate_stringS">51</field><field
name="initialRegistration_dateS">1333569600</field><field
name="price_stringS">28480.0000</field><field
name="body_stringS">Coupé</field><field
name="color_stringS">Metallic</field><field
name="mileage_stringS">90</field><field
name="capacity_stringS">300</field><field name="fuel_stringS">Super
Plus</field><field name="gear_stringS">Automatik</field><field
name="doors_stringS">5</field><field name="emissionClass_stringS">Euro
4</field><field
name="url">index.php?id=23&tx_wvstx3_car%5Bcar%5D=1&tx_wvstx3_car%5Baction%5D=show&tx_wvstx3_car%5Bcontroller%5D=Car&cHash=81b0c7691824c4fb8934c1c6bcb2c24d</field><field
name="sortTitle_stringS">370Z 3.7 V6 Automatik Pack, Navi, 19 Zoll,
PDC, 1.Hand</field></doc></add>
response: *_response: Apache_Solr_HttpTransport_Response Object
(
[_statusCode:Apache_Solr_HttpTransport_Response:private] => 400
[_statusMessage:Apache_Solr_HttpTransport_Response:private] => Bad Request
[_mimeType:Apache_Solr_HttpTransport_Response:private] => text/html
[_encoding:Apache_Solr_HttpTransport_Response:private] => utf-8
[_responseBody:Apache_Solr_HttpTransport_Response:private] =>
)
I don't realy understand where the error is.
I get the date to work properly with:
plugin.tx_solr.index.queue.wv_stx3.fields {
initialRegistration_stringS = SOLR_CONTENT
initialRegistration_stringS.field = initial_registration
initialRegistration_stringS {
strftime = %d.%m.%Y
}
}
but I think this is not the correcr approach.
Problem 2:
I have a field images in my database. This field holds a commaseperated
list of tx_dam uids with images.
images = 4,5,6,7 e.g.
I tried the following:
plugin.tx_solr.index.queue.wv_stx3.fields {
image_stringM = SOLR_RELATION
image_stringM {
localField = images
multiValue = 1
foreignLabelField = file_name
}
}
Which gives me the error message: PHP Catchable Fatal Error: Argument 1
passed to
tx_solr_contentobject_Relation::resolveForeignTableLabelField() must be
an array, null given, called in ...
Problem 3:
I have a relation to another table with leasing data and I get back the
leasing rate back but it isn't formated like I need it.
I have tried _stringS and _floatS as a string I get back e.g.
20000.0000 which is exactly what is in the database. When I use float I
get back 20000.0
But I need 20.000,00 € with stdWrap numberFormat and noTrimWrap this
wouldn't be any problem but unfortunatelly SOLR_RELATION doesn't
support stdWrap so how could I format my data?
plugin.tx_solr.index.queue.wv_stx3.fields {
leasingrate_stringS = SOLR_RELATION
leasingrate_stringS {
localField = leasing
}
}
Kind regards
Tim
More information about the TYPO3-project-solr
mailing list