Closed RazielleS closed 1 year ago
Current implementation does not care about right return type if value is serialized or is fetched directly from record:
IMHO the return value can be set to mixed
or a little bit stricter list of possible value types.
solarium uses the values as follows:
- If you supply NULL as the value the field will be removed
- If you supply a numerically indexed array of values a multivalue field will be created.
- In all cases any existing (multi)value or child document(s) will be overwritten.
I have found some more occurrences of too strict return types, so I changed the title of this issue to address them all. I'll make a PR to change these.
Describe the bug We have an integer field to be indexed by the page indexer. Something like
plugin.tx_solr.index.queue.pages.fields.order_intS = tx_extension_some_field
. The field is of course of type int in the database.The method
\ApacheSolrForTypo3\Solr\IndexQueue\FrontendHelper\PageFieldMappingIndexer::resolveFieldValue
only allows arrays and strings as return values. But when it processes our field, it has type int. Thus throwing an exception. Can the return value of this method be changed accordingly?To Reproduce Steps to reproduce the behavior:
Expected behavior No exception because of wrong return type.
Used versions (please complete the following information):