[MGNLEESOLR-87] Handle property arrays Created: 19/Oct/15  Updated: 15/Apr/16  Resolved: 03/Nov/15

Status: Closed
Project: Solr Search Provider
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.1

Type: Improvement Priority: Neutral
Reporter: Roland Polzer Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 2h 50m
Original Estimate: Not Specified

Template:
Patch included:
Yes
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)
Date of First Response:
Sprint: Kromeriz 17
Story Points: 1

 Description   

Please support property arrays

diff --git a/magnolia-solr-search-provider/src/main/java/info/magnolia/search/solrsearchprovider/logic/indexer/BasicSolrIndexService.java b/magnolia-solr-search-provider/src/main/java/info/magnolia/search/solrsearchprovider/logic/indexer/BasicSolrIndexService.java
index 0e89d06..08712df 100644
--- a/magnolia-solr-search-provider/src/main/java/info/magnolia/search/solrsearchprovider/logic/indexer/BasicSolrIndexService.java
+++ b/magnolia-solr-search-provider/src/main/java/info/magnolia/search/solrsearchprovider/logic/indexer/BasicSolrIndexService.java
@@ -154,9 +154,11 @@
                     } catch (RepositoryException e) {
                         log.error("Problem getting path while treating field mappings." + e);
                     }
-                } else {
-                    value = (String.valueOf(o));
-                }
+                } else if (o instanceof String[]){
+                	value = StringUtils.join(o, ", ");
+               	} else {
+               		value = (String.valueOf(o));
+               	}
             }
 
             if (value == null) {


 Comments   
Comment by Evzen Fochr [ 02/Nov/15 ]

Same patch must be applied on AbstractIndexService@getAllTextForNode

Generated at Mon Feb 12 10:59:58 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.