[MGNLEESOLR-139] Bug in SingleSolrSearchResultTransformer when transforming search results Created: 29/Nov/19 Updated: 13/Dec/23 |
|
| Status: | Accepted |
| Project: | Solr Search Provider |
| Component/s: | None |
| Affects Version/s: | 5.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Viet Nguyen | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | y2k | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||
| Date of First Response: | |||||
| Epic Link: | Support | ||||
| Team: | |||||
| Description |
|
Follow SUPPORT-10649:
Investigation shown that "abstract" field was configured to use "text_general" fieldType: <field name="abstract" type="text_general"/> While text_general fieldType was configured as "multiValued": <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100" multiValued="true"> Also from Javadoc of Solr function getFieldValue of a SolrDocument may return a single value or a collection of values: Object org.apache.solr.common.SolrDocument.getFieldValue(String name) Get the value or collection of values for a given field. However when implementing function info.magnolia.search.solrsearchprovider.logic.result.SingleSolrSearchResultTransformer.transform(SolrDocument, Collection<?>) we casted a single String object to get its result: String anAbstract = (String) solrDocument.getFieldValue("abstract"); This is a bug when implementing the module, please fix it accordingly. Any workaround or suggestion are welcome! |