[MGNLEESOLR-111] Multivalue JCR fields saved to Multivalue field in SOLR as String Created: 28/Apr/17 Updated: 02/Mar/23 |
|
| Status: | Open |
| Project: | Solr Search Provider |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Mariusz Chruscielewski | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | maintenance | ||
| 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: | |||||||||||||
| Visible to: | |
||||||||||||
| Epic Link: | Solr support issues | ||||||||||||
| Team: | |||||||||||||
| Description |
|
Hi, in my opinion, saving multivalue fields (JCR) to SOLR as String (separated by comma) is very not correct. If in SOLR schema field is configured as multivalue, it should be saved as array, but Magnolia Because of that info.magnolia.search.solrsearchprovider.logic.indexer.BasicSolrIndexService turns String[] into String: else if(o instanceof String[]) { value = StringUtils.join((String[])((String[])o), ", "); }Because of that value is stored in solr like: "articleOldUrls": [ instead of: "articleOldUrls": [ That makes solr search unusable, I can't do query: http://localhost:8983/solr/vinl_collection/select?q=articleOldUrls%3Ayet-another&wt=json&indent=true because it won't return any results. When I did some hacking, and passed String[] array to SolrInputDocument and then I saved it using standard magnoliaSolrBrigde, it works fine. I think this should be fixed. Regards |